[U-Boot] [PATCH V2 4/7] video: exynos_fimd: Add framework to disable FIMD sysmmu

Simon Glass sjg at chromium.org
Thu Dec 19 21:39:40 CET 2013


Hi Ajay,

On 12 November 2013 05:27, Ajay Kumar <ajaykumar.rs at samsung.com> wrote:
> On Exynos5420 and newer versions, the FIMD sysmmus are in
> "on state" by default.
> We have to disable them in order to make FIMD DMA work.
> This patch adds the required framework to exynos_fimd driver,
> and disables FIMD sysmmu on Exynos5420.
>
> Signed-off-by: Ajay Kumar <ajaykumar.rs at samsung.com>

Acked-by: Simon Glass <sjg at chromium.org>

See a nit below if you re-issue this series.

> ---
>  arch/arm/dts/exynos5420.dtsi                 |  7 +++++++
>  doc/device-tree-bindings/video/exynos-fb.txt |  4 ++++
>  drivers/video/exynos_fimd.c                  | 24 ++++++++++++++++++++++++
>  3 files changed, 35 insertions(+)
>
> diff --git a/arch/arm/dts/exynos5420.dtsi b/arch/arm/dts/exynos5420.dtsi
> index ca6c605..7443953 100644
> --- a/arch/arm/dts/exynos5420.dtsi
> +++ b/arch/arm/dts/exynos5420.dtsi
> @@ -71,4 +71,11 @@
>                 reg = <0x12E20000 0x100>;
>                 interrupts = <0 203 0>;
>         };
> +
> +       fimd at 14400000 {
> +               /* sysmmu is not used in U-Boot */
> +               samsung,disable-sysmmu;
> +               samsung,sysmmu-fimdm0 = <0x14640000>;
> +               samsung,sysmmu-fimdm1 = <0x14680000>;
> +       };
>  };
> diff --git a/doc/device-tree-bindings/video/exynos-fb.txt b/doc/device-tree-bindings/video/exynos-fb.txt
> index bb7441c..9ba2c47 100644
> --- a/doc/device-tree-bindings/video/exynos-fb.txt
> +++ b/doc/device-tree-bindings/video/exynos-fb.txt
> @@ -55,6 +55,10 @@ Board(panel specific):
>         samsung,pclk-name: parent clock identifier: 1(MPLL), 2(EPLL), 3(VPLL)
>         samsung,sclk-div: parent_clock/source_clock ratio
>         samsung,dual-lcd-enabled: 1 if you support two LCD, else 0
> +       samsung,disable-sysmmu: present if you want to disable the sysmmu
> +                       (needed for Exynos5420 and newer versions)
> +       samsung,sysmmu-fimdm0: Address of sysmmufimdm0 MMU_CTRL
> +       samsung,sysmmu-fimdm1: Address of sysmmufimdm1 MMU_CTRL

Is this a kernel binding?

>
>  Example:
>  SOC specific part:
> diff --git a/drivers/video/exynos_fimd.c b/drivers/video/exynos_fimd.c
> index f962c4f..bffc8fa 100644
> --- a/drivers/video/exynos_fimd.c
> +++ b/drivers/video/exynos_fimd.c
> @@ -257,6 +257,7 @@ void exynos_fimd_lcd_init(vidinfo_t *vid)
>         unsigned int offset;
>  #ifdef CONFIG_OF_CONTROL
>         unsigned int node;
> +       u32 *sysmmufimdm0, *sysmmufimdm1;
>
>         node = fdtdec_next_compatible(gd->fdt_blob,
>                                         0, COMPAT_SAMSUNG_EXYNOS_FIMD);
> @@ -267,6 +268,29 @@ void exynos_fimd_lcd_init(vidinfo_t *vid)
>                                                                 node, "reg");
>         if (fimd_ctrl == NULL)
>                 debug("Can't get the FIMD base address\n");
> +
> +       if (fdtdec_get_bool(gd->fdt_blob, node, "samsung,disable-sysmmu")) {
> +               /*
> +               * The reset value for FIMD SYSMMU register MMU_CTRL is 3
> +               * on Exynos5420 and newer versions.
> +               * This means FIMD SYSMMU is on by default on Exynos5420
> +               * and newer versions.
> +               * Since in u-boot we don't use SYSMMU, we should disable
> +               * those FIMD SYSMMU.
> +               */
> +               sysmmufimdm0 = (u32 *)fdtdec_get_int(gd->fdt_blob, node,
> +                                               "samsung,sysmmu-fimdm0", 0);

fdtdec_get_addr() might be better.

> +               if (!sysmmufimdm0)
> +                       debug("Can't get sysmmufimdm0");
> +
> +               sysmmufimdm1 = (u32 *)fdtdec_get_int(gd->fdt_blob, node,
> +                                               "samsung,sysmmu-fimdm1", 0);
> +               if (!sysmmufimdm1)
> +                       debug("Can't get sysmmufimdm1");
> +
> +               writel(0x0, sysmmufimdm0);
> +               writel(0x0, sysmmufimdm1);
> +       }
>  #else
>         fimd_ctrl = (struct exynos_fb *)samsung_get_base_fimd();
>  #endif
> --
> 1.7.12.4
>

Regards,
Simon


More information about the U-Boot mailing list