From fbf1eadf950da1f5f5ed2e454d2f191f90fe1ebe Mon Sep 17 00:00:00 2001 From: Rabin Vincent Date: Wed, 29 Sep 2010 19:46:32 +0530 Subject: ux500: rework device registration Change the Ux500 devices to be dynamically allocated and added by calling functions instead of referencing structures, thereby allowing 5500 and other derivatives' support to be added without having to duplicate structures, use fixup functions, or use compile-time macros. Signed-off-by: Rabin Vincent Signed-off-by: Linus Walleij --- arch/arm/mach-ux500/board-u5500.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'arch/arm/mach-ux500/board-u5500.c') diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c index 1ca094a..9a5db95 100644 --- a/arch/arm/mach-ux500/board-u5500.c +++ b/arch/arm/mach-ux500/board-u5500.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -17,17 +18,20 @@ #include #include -static struct amba_device *amba_board_devs[] __initdata = { - &ux500_uart0_device, - &ux500_uart1_device, - &ux500_uart2_device, -}; +#include "devices-db5500.h" + +static void __init u5500_uart_init(void) +{ + db5500_add_uart0(); + db5500_add_uart1(); + db5500_add_uart2(); +} static void __init u5500_init_machine(void) { u5500_init_devices(); - amba_add_devices(amba_board_devs, ARRAY_SIZE(amba_board_devs)); + u5500_uart_init(); } MACHINE_START(U8500, "ST-Ericsson U5500 Platform") -- cgit v1.1