Skip to content

Commit

Permalink
ARM: ux500: New DT:ed u8500_init_devices for one-by-one device enable…
Browse files Browse the repository at this point in the history
…ment

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>
  • Loading branch information
Lee Jones authored and Arnd Bergmann committed Jun 1, 2012
1 parent 11a0b5f commit f65c198
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-ux500/board-mop500.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ static void __init u8500_init_machine(void)
else if (of_machine_is_compatible("st-ericsson,hrefv60+"))
hrefv60_pinmaps_init();

parent = u8500_init_devices();
parent = u8500_of_init_devices();

for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
mop500_platform_devs[i]->dev.parent = parent;
Expand Down
3 changes: 3 additions & 0 deletions arch/arm/mach-ux500/board-mop500.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,7 @@ void __init hrefv60_pinmaps_init(void);
void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,
unsigned n);

/* TODO: Once all pieces are DT:ed, remove completely. */
struct device * __init u8500_of_init_devices(void);

#endif
22 changes: 22 additions & 0 deletions arch/arm/mach-ux500/cpu-db8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,28 @@ struct device * __init u8500_init_devices(void)
db8500_add_gpios(parent);
db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);

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;

platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));

return parent;
}

/* TODO: Once all pieces are DT:ed, remove completely. */
struct device * __init u8500_of_init_devices(void)
{
struct device *parent;
int i;

parent = db8500_soc_device_init();

db8500_add_rtc(parent);
db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);

platform_device_register_data(parent,
"cpufreq-u8500", -1, NULL, 0);

Expand Down

0 comments on commit f65c198

Please sign in to comment.