[PATCH v9 12/12] ARM: EXYNOS: refactor of mach-exynos to use chipid information

Arnd Bergmann arnd at arndb.de
Thu Mar 30 07:01:42 PDT 2017


On Thu, Mar 30, 2017 at 3:17 PM, Pankaj Dubey <pankaj.dubey at samsung.com> wrote:

>   * register the standard cpu IO areas
>   */
> -static void __init exynos_map_io(void)
> +static int __init exynos_fdt_map_scu(unsigned long node, const char *uname,
> +               int depth, void *data)
>  {
> -       if (soc_is_exynos4())
> -               iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc));
> +       if (!of_flat_dt_is_compatible(node, "samsung,exynos4210") &&
> +                       !of_flat_dt_is_compatible(node, "samsung,exynos4212") &&
> +                       !of_flat_dt_is_compatible(node, "samsung,exynos4412"))
> +               return 0;
> +
> +       iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc));
> +       return 1;
>  }

This seems really overcomplicated. From what I can tell, this is only needed
to find the SCU address, but there are better ways to do that, either by
looking up the SCU in the DT at the time you actually need it,
or by calling scu_a9_get_base().

      Arnd



More information about the linux-arm-kernel mailing list