[PATCH v9 12/12] ARM: EXYNOS: refactor of mach-exynos to use chipid information
From: arnd@arndb.de (Arnd Bergmann)
Date: 2017-03-30 14:01:42
Also in:
linux-samsung-soc
From: arnd@arndb.de (Arnd Bergmann)
Date: 2017-03-30 14:01:42
Also in:
linux-samsung-soc
On Thu, Mar 30, 2017 at 3:17 PM, Pankaj Dubey [off-list ref] 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