diff options
Diffstat (limited to 'arch/arm/mach-ux500/cpu-db5500.c')
-rw-r--r-- | arch/arm/mach-ux500/cpu-db5500.c | 53 |
1 files changed, 50 insertions, 3 deletions
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c index af04e0891a78..c9dc2eff3cb2 100644 --- a/arch/arm/mach-ux500/cpu-db5500.c +++ b/arch/arm/mach-ux500/cpu-db5500.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
12 | 12 | ||
13 | #include <asm/mach/map.h> | 13 | #include <asm/mach/map.h> |
14 | #include <asm/pmu.h> | ||
14 | 15 | ||
15 | #include <plat/gpio.h> | 16 | #include <plat/gpio.h> |
16 | 17 | ||
@@ -18,8 +19,10 @@ | |||
18 | #include <mach/devices.h> | 19 | #include <mach/devices.h> |
19 | #include <mach/setup.h> | 20 | #include <mach/setup.h> |
20 | #include <mach/irqs.h> | 21 | #include <mach/irqs.h> |
22 | #include <mach/usb.h> | ||
21 | 23 | ||
22 | #include "devices-db5500.h" | 24 | #include "devices-db5500.h" |
25 | #include "ste-dma40-db5500.h" | ||
23 | 26 | ||
24 | static struct map_desc u5500_uart_io_desc[] __initdata = { | 27 | static struct map_desc u5500_uart_io_desc[] __initdata = { |
25 | __IO_DEV_DESC(U5500_UART0_BASE, SZ_4K), | 28 | __IO_DEV_DESC(U5500_UART0_BASE, SZ_4K), |
@@ -43,6 +46,26 @@ static struct map_desc u5500_io_desc[] __initdata = { | |||
43 | __IO_DEV_DESC(U5500_PRCMU_BASE, SZ_4K), | 46 | __IO_DEV_DESC(U5500_PRCMU_BASE, SZ_4K), |
44 | }; | 47 | }; |
45 | 48 | ||
49 | static struct resource db5500_pmu_resources[] = { | ||
50 | [0] = { | ||
51 | .start = IRQ_DB5500_PMU0, | ||
52 | .end = IRQ_DB5500_PMU0, | ||
53 | .flags = IORESOURCE_IRQ, | ||
54 | }, | ||
55 | [1] = { | ||
56 | .start = IRQ_DB5500_PMU1, | ||
57 | .end = IRQ_DB5500_PMU1, | ||
58 | .flags = IORESOURCE_IRQ, | ||
59 | }, | ||
60 | }; | ||
61 | |||
62 | static struct platform_device db5500_pmu_device = { | ||
63 | .name = "arm-pmu", | ||
64 | .id = ARM_PMU_DEVICE_CPU, | ||
65 | .num_resources = ARRAY_SIZE(db5500_pmu_resources), | ||
66 | .resource = db5500_pmu_resources, | ||
67 | }; | ||
68 | |||
46 | static struct resource mbox0_resources[] = { | 69 | static struct resource mbox0_resources[] = { |
47 | { | 70 | { |
48 | .name = "mbox_peer", | 71 | .name = "mbox_peer", |
@@ -127,7 +150,8 @@ static struct platform_device mbox2_device = { | |||
127 | .num_resources = ARRAY_SIZE(mbox2_resources), | 150 | .num_resources = ARRAY_SIZE(mbox2_resources), |
128 | }; | 151 | }; |
129 | 152 | ||
130 | static struct platform_device *u5500_platform_devs[] __initdata = { | 153 | static struct platform_device *db5500_platform_devs[] __initdata = { |
154 | &db5500_pmu_device, | ||
131 | &mbox0_device, | 155 | &mbox0_device, |
132 | &mbox1_device, | 156 | &mbox1_device, |
133 | &mbox2_device, | 157 | &mbox2_device, |
@@ -166,12 +190,35 @@ void __init u5500_map_io(void) | |||
166 | iotable_init(u5500_io_desc, ARRAY_SIZE(u5500_io_desc)); | 190 | iotable_init(u5500_io_desc, ARRAY_SIZE(u5500_io_desc)); |
167 | } | 191 | } |
168 | 192 | ||
193 | static int usb_db5500_rx_dma_cfg[] = { | ||
194 | DB5500_DMA_DEV4_USB_OTG_IEP_1_9, | ||
195 | DB5500_DMA_DEV5_USB_OTG_IEP_2_10, | ||
196 | DB5500_DMA_DEV6_USB_OTG_IEP_3_11, | ||
197 | DB5500_DMA_DEV20_USB_OTG_IEP_4_12, | ||
198 | DB5500_DMA_DEV21_USB_OTG_IEP_5_13, | ||
199 | DB5500_DMA_DEV22_USB_OTG_IEP_6_14, | ||
200 | DB5500_DMA_DEV23_USB_OTG_IEP_7_15, | ||
201 | DB5500_DMA_DEV38_USB_OTG_IEP_8 | ||
202 | }; | ||
203 | |||
204 | static int usb_db5500_tx_dma_cfg[] = { | ||
205 | DB5500_DMA_DEV4_USB_OTG_OEP_1_9, | ||
206 | DB5500_DMA_DEV5_USB_OTG_OEP_2_10, | ||
207 | DB5500_DMA_DEV6_USB_OTG_OEP_3_11, | ||
208 | DB5500_DMA_DEV20_USB_OTG_OEP_4_12, | ||
209 | DB5500_DMA_DEV21_USB_OTG_OEP_5_13, | ||
210 | DB5500_DMA_DEV22_USB_OTG_OEP_6_14, | ||
211 | DB5500_DMA_DEV23_USB_OTG_OEP_7_15, | ||
212 | DB5500_DMA_DEV38_USB_OTG_OEP_8 | ||
213 | }; | ||
214 | |||
169 | void __init u5500_init_devices(void) | 215 | void __init u5500_init_devices(void) |
170 | { | 216 | { |
171 | db5500_add_gpios(); | 217 | db5500_add_gpios(); |
172 | db5500_dma_init(); | 218 | db5500_dma_init(); |
173 | db5500_add_rtc(); | 219 | db5500_add_rtc(); |
220 | db5500_add_usb(usb_db5500_rx_dma_cfg, usb_db5500_tx_dma_cfg); | ||
174 | 221 | ||
175 | platform_add_devices(u5500_platform_devs, | 222 | platform_add_devices(db5500_platform_devs, |
176 | ARRAY_SIZE(u5500_platform_devs)); | 223 | ARRAY_SIZE(db5500_platform_devs)); |
177 | } | 224 | } |