aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2012-05-28 22:03:09 -0400
committerArnd Bergmann <arnd@arndb.de>2012-05-31 20:03:58 -0400
commitf65c1982faca257053564e7ba6864ee9506f6a83 (patch)
treed41468ea85d27ecb429a759f764e3da44240b050 /arch
parent11a0b5f09c941ede301ed3eee59fd69c2b4850c2 (diff)
ARM: ux500: New DT:ed u8500_init_devices for one-by-one device enablement
During Device Tree enablement it is necessary to remove <hw_component>_add_<device> calls one at at time, as and when particular devices are DT enabled. This patch provides a temporary solution. Once the new *of_init_devices function has been fully unpopulated it will be removed again. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/board-mop500.c2
-rw-r--r--arch/arm/mach-ux500/board-mop500.h3
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c22
3 files changed, 26 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index d1bd2bac22f0..1718462622c5 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -859,7 +859,7 @@ static void __init u8500_init_machine(void)
859 else if (of_machine_is_compatible("st-ericsson,hrefv60+")) 859 else if (of_machine_is_compatible("st-ericsson,hrefv60+"))
860 hrefv60_pinmaps_init(); 860 hrefv60_pinmaps_init();
861 861
862 parent = u8500_init_devices(); 862 parent = u8500_of_init_devices();
863 863
864 for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) 864 for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
865 mop500_platform_devs[i]->dev.parent = parent; 865 mop500_platform_devs[i]->dev.parent = parent;
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h
index bc44c07c71a9..3be0cb8f8914 100644
--- a/arch/arm/mach-ux500/board-mop500.h
+++ b/arch/arm/mach-ux500/board-mop500.h
@@ -92,4 +92,7 @@ void __init hrefv60_pinmaps_init(void);
92void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info, 92void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,
93 unsigned n); 93 unsigned n);
94 94
95/* TODO: Once all pieces are DT:ed, remove completely. */
96struct device * __init u8500_of_init_devices(void);
97
95#endif 98#endif
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index 16169c4bf6ca..04244b081a47 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -222,6 +222,28 @@ struct device * __init u8500_init_devices(void)
222 platform_device_register_data(parent, 222 platform_device_register_data(parent,
223 "cpufreq-u8500", -1, NULL, 0); 223 "cpufreq-u8500", -1, NULL, 0);
224 224
225 for (i = 0; i < ARRAY_SIZE(platform_devs); i++)
226 platform_devs[i]->dev.parent = parent;
227
228 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
229
230 return parent;
231}
232
233/* TODO: Once all pieces are DT:ed, remove completely. */
234struct device * __init u8500_of_init_devices(void)
235{
236 struct device *parent;
237 int i;
238
239 parent = db8500_soc_device_init();
240
241 db8500_add_rtc(parent);
242 db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);
243
244 platform_device_register_data(parent,
245 "cpufreq-u8500", -1, NULL, 0);
246
225 for (i = 0; i < ARRAY_SIZE(of_platform_devs); i++) 247 for (i = 0; i < ARRAY_SIZE(of_platform_devs); i++)
226 of_platform_devs[i]->dev.parent = parent; 248 of_platform_devs[i]->dev.parent = parent;
227 249