aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/board-mop500-sdi.c
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2010-09-29 10:16:32 -0400
committerLinus Walleij <linus.walleij@stericsson.com>2010-12-08 07:14:06 -0500
commitfbf1eadf950da1f5f5ed2e454d2f191f90fe1ebe (patch)
treea45df8b1d1e8e5bd76f524cff01dcf9e35d82f0a /arch/arm/mach-ux500/board-mop500-sdi.c
parent1bde668c8afa279d81b8f26b2120b906f38f7822 (diff)
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 <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500-sdi.c')
-rw-r--r--arch/arm/mach-ux500/board-mop500-sdi.c11
1 files changed, 4 insertions, 7 deletions
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 @@
16#include <mach/devices.h> 16#include <mach/devices.h>
17#include <mach/hardware.h> 17#include <mach/hardware.h>
18 18
19#include "devices-db8500.h"
19#include "pins-db8500.h" 20#include "pins-db8500.h"
20#include "board-mop500.h" 21#include "board-mop500.h"
21 22
@@ -108,7 +109,7 @@ void mop500_sdi_tc35892_init(void)
108 gpio_direction_output(GPIO_SDMMC_1V8_3V_SEL, 1); 109 gpio_direction_output(GPIO_SDMMC_1V8_3V_SEL, 1);
109 gpio_direction_output(GPIO_SDMMC_EN, 0); 110 gpio_direction_output(GPIO_SDMMC_EN, 0);
110 111
111 amba_device_register(&u8500_sdi0_device, &iomem_resource); 112 db8500_add_sdi0(&mop500_sdi0_data);
112} 113}
113 114
114/* 115/*
@@ -140,15 +141,11 @@ void mop500_sdi_init(void)
140{ 141{
141 nmk_config_pins(mop500_sdi_pins, ARRAY_SIZE(mop500_sdi_pins)); 142 nmk_config_pins(mop500_sdi_pins, ARRAY_SIZE(mop500_sdi_pins));
142 143
143 u8500_sdi0_device.dev.platform_data = &mop500_sdi0_data;
144 u8500_sdi2_device.dev.platform_data = &mop500_sdi2_data;
145 u8500_sdi4_device.dev.platform_data = &mop500_sdi4_data;
146
147 if (!cpu_is_u8500ed()) { 144 if (!cpu_is_u8500ed()) {
148 nmk_config_pins(mop500_sdi2_pins, ARRAY_SIZE(mop500_sdi2_pins)); 145 nmk_config_pins(mop500_sdi2_pins, ARRAY_SIZE(mop500_sdi2_pins));
149 amba_device_register(&u8500_sdi2_device, &iomem_resource); 146 db8500_add_sdi2(&mop500_sdi2_data);
150 } 147 }
151 148
152 /* On-board eMMC */ 149 /* On-board eMMC */
153 amba_device_register(&u8500_sdi4_device, &iomem_resource); 150 db8500_add_sdi4(&mop500_sdi4_data);
154} 151}