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-mop500-sdi.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'arch/arm/mach-ux500/board-mop500-sdi.c') diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c index 2fbaa2013fdb..be5e8ccb97cc 100644 --- a/arch/arm/mach-ux500/board-mop500-sdi.c +++ b/arch/arm/mach-ux500/board-mop500-sdi.c @@ -16,6 +16,7 @@ #include #include +#include "devices-db8500.h" #include "pins-db8500.h" #include "board-mop500.h" @@ -108,7 +109,7 @@ void mop500_sdi_tc35892_init(void) gpio_direction_output(GPIO_SDMMC_1V8_3V_SEL, 1); gpio_direction_output(GPIO_SDMMC_EN, 0); - amba_device_register(&u8500_sdi0_device, &iomem_resource); + db8500_add_sdi0(&mop500_sdi0_data); } /* @@ -140,15 +141,11 @@ void mop500_sdi_init(void) { nmk_config_pins(mop500_sdi_pins, ARRAY_SIZE(mop500_sdi_pins)); - u8500_sdi0_device.dev.platform_data = &mop500_sdi0_data; - u8500_sdi2_device.dev.platform_data = &mop500_sdi2_data; - u8500_sdi4_device.dev.platform_data = &mop500_sdi4_data; - if (!cpu_is_u8500ed()) { nmk_config_pins(mop500_sdi2_pins, ARRAY_SIZE(mop500_sdi2_pins)); - amba_device_register(&u8500_sdi2_device, &iomem_resource); + db8500_add_sdi2(&mop500_sdi2_data); } /* On-board eMMC */ - amba_device_register(&u8500_sdi4_device, &iomem_resource); + db8500_add_sdi4(&mop500_sdi4_data); } -- cgit v1.2.3