]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: ux500: Fork cpu-db8500 platform_devs for sequential DT enablement
authorLee Jones <lee.jones@linaro.org>
Thu, 19 Apr 2012 20:36:42 +0000 (21:36 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 1 May 2012 22:40:42 +0000 (00:40 +0200)
To aid in sequential one-by-one Device Tree enablement, we split
cpu-db8500's platform_devs structure into normal platform boot, where
we leave all devices to be added in tact and a DT version where we
will remove the devices as they are DT enabled.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/mach-ux500/cpu-db8500.c

index 9bd8163896cfa241a76839aa7be5830b3f052eaf..f44a12ccddf37d8cb110870674ee1ee66d91f71d 100644 (file)
@@ -121,6 +121,12 @@ static struct platform_device *platform_devs[] __initdata = {
        &db8500_prcmu_device,
 };
 
+static struct platform_device *of_platform_devs[] __initdata = {
+       &u8500_dma40_device,
+       &db8500_pmu_device,
+       &db8500_prcmu_device,
+};
+
 static resource_size_t __initdata db8500_gpio_base[] = {
        U8500_GPIOBANK0_BASE,
        U8500_GPIOBANK1_BASE,
@@ -199,10 +205,16 @@ struct device * __init u8500_init_devices(void)
        platform_device_register_data(parent,
                "cpufreq-u8500", -1, NULL, 0);
 
-       for (i = 0; i < ARRAY_SIZE(platform_devs); i++)
-               platform_devs[i]->dev.parent = parent;
+       for (i = 0; i < ARRAY_SIZE(of_platform_devs); i++)
+               of_platform_devs[i]->dev.parent = parent;
 
-       platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
+       /*
+        * Devices to be DT:ed:
+        *   u8500_dma40_device  = todo
+        *   db8500_pmu_device   = todo
+        *   db8500_prcmu_device = todo
+        */
+       platform_add_devices(of_platform_devs, ARRAY_SIZE(of_platform_devs));
 
        return parent;
 }