diff options
Diffstat (limited to 'arch/arm/mach-ux500/cpu-db5500.c')
-rw-r--r-- | arch/arm/mach-ux500/cpu-db5500.c | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c index 18aa5c05c69e..bca47f32082f 100644 --- a/arch/arm/mach-ux500/cpu-db5500.c +++ b/arch/arm/mach-ux500/cpu-db5500.c | |||
@@ -147,13 +147,13 @@ static resource_size_t __initdata db5500_gpio_base[] = { | |||
147 | U5500_GPIOBANK7_BASE, | 147 | U5500_GPIOBANK7_BASE, |
148 | }; | 148 | }; |
149 | 149 | ||
150 | static void __init db5500_add_gpios(void) | 150 | static void __init db5500_add_gpios(struct device *parent) |
151 | { | 151 | { |
152 | struct nmk_gpio_platform_data pdata = { | 152 | struct nmk_gpio_platform_data pdata = { |
153 | /* No custom data yet */ | 153 | /* No custom data yet */ |
154 | }; | 154 | }; |
155 | 155 | ||
156 | dbx500_add_gpios(ARRAY_AND_SIZE(db5500_gpio_base), | 156 | dbx500_add_gpios(parent, ARRAY_AND_SIZE(db5500_gpio_base), |
157 | IRQ_DB5500_GPIO0, &pdata); | 157 | IRQ_DB5500_GPIO0, &pdata); |
158 | } | 158 | } |
159 | 159 | ||
@@ -212,14 +212,36 @@ static int usb_db5500_tx_dma_cfg[] = { | |||
212 | DB5500_DMA_DEV38_USB_OTG_OEP_8 | 212 | DB5500_DMA_DEV38_USB_OTG_OEP_8 |
213 | }; | 213 | }; |
214 | 214 | ||
215 | void __init u5500_init_devices(void) | 215 | static const char *db5500_read_soc_id(void) |
216 | { | 216 | { |
217 | db5500_add_gpios(); | 217 | return kasprintf(GFP_KERNEL, "u5500 currently unsupported\n"); |
218 | } | ||
219 | |||
220 | static struct device * __init db5500_soc_device_init(void) | ||
221 | { | ||
222 | const char *soc_id = db5500_read_soc_id(); | ||
223 | |||
224 | return ux500_soc_device_init(soc_id); | ||
225 | } | ||
226 | |||
227 | struct device * __init u5500_init_devices(void) | ||
228 | { | ||
229 | struct device *parent; | ||
230 | int i; | ||
231 | |||
232 | parent = db5500_soc_device_init(); | ||
233 | |||
234 | db5500_add_gpios(parent); | ||
218 | db5500_pmu_init(); | 235 | db5500_pmu_init(); |
219 | db5500_dma_init(); | 236 | db5500_dma_init(parent); |
220 | db5500_add_rtc(); | 237 | db5500_add_rtc(parent); |
221 | db5500_add_usb(usb_db5500_rx_dma_cfg, usb_db5500_tx_dma_cfg); | 238 | db5500_add_usb(parent, usb_db5500_rx_dma_cfg, usb_db5500_tx_dma_cfg); |
239 | |||
240 | for (i = 0; i < ARRAY_SIZE(db5500_platform_devs); i++) | ||
241 | db5500_platform_devs[i]->dev.parent = parent; | ||
222 | 242 | ||
223 | platform_add_devices(db5500_platform_devs, | 243 | platform_add_devices(db5500_platform_devs, |
224 | ARRAY_SIZE(db5500_platform_devs)); | 244 | ARRAY_SIZE(db5500_platform_devs)); |
245 | |||
246 | return parent; | ||
225 | } | 247 | } |