aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/cpu-db8500.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ux500/cpu-db8500.c')
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c42
1 files changed, 35 insertions, 7 deletions
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index d992d2b44907..16169c4bf6ca 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -34,8 +34,8 @@ static struct map_desc u8500_uart_io_desc[] __initdata = {
34 __IO_DEV_DESC(U8500_UART0_BASE, SZ_4K), 34 __IO_DEV_DESC(U8500_UART0_BASE, SZ_4K),
35 __IO_DEV_DESC(U8500_UART2_BASE, SZ_4K), 35 __IO_DEV_DESC(U8500_UART2_BASE, SZ_4K),
36}; 36};
37 37/* U8500 and U9540 common io_desc */
38static struct map_desc u8500_io_desc[] __initdata = { 38static struct map_desc u8500_common_io_desc[] __initdata = {
39 /* SCU base also covers GIC CPU BASE and TWD with its 4K page */ 39 /* SCU base also covers GIC CPU BASE and TWD with its 4K page */
40 __IO_DEV_DESC(U8500_SCU_BASE, SZ_4K), 40 __IO_DEV_DESC(U8500_SCU_BASE, SZ_4K),
41 __IO_DEV_DESC(U8500_GIC_DIST_BASE, SZ_4K), 41 __IO_DEV_DESC(U8500_GIC_DIST_BASE, SZ_4K),
@@ -49,12 +49,23 @@ static struct map_desc u8500_io_desc[] __initdata = {
49 __IO_DEV_DESC(U8500_CLKRST5_BASE, SZ_4K), 49 __IO_DEV_DESC(U8500_CLKRST5_BASE, SZ_4K),
50 __IO_DEV_DESC(U8500_CLKRST6_BASE, SZ_4K), 50 __IO_DEV_DESC(U8500_CLKRST6_BASE, SZ_4K),
51 51
52 __IO_DEV_DESC(U8500_PRCMU_BASE, SZ_4K),
53 __IO_DEV_DESC(U8500_GPIO0_BASE, SZ_4K), 52 __IO_DEV_DESC(U8500_GPIO0_BASE, SZ_4K),
54 __IO_DEV_DESC(U8500_GPIO1_BASE, SZ_4K), 53 __IO_DEV_DESC(U8500_GPIO1_BASE, SZ_4K),
55 __IO_DEV_DESC(U8500_GPIO2_BASE, SZ_4K), 54 __IO_DEV_DESC(U8500_GPIO2_BASE, SZ_4K),
56 __IO_DEV_DESC(U8500_GPIO3_BASE, SZ_4K), 55 __IO_DEV_DESC(U8500_GPIO3_BASE, SZ_4K),
56};
57
58/* U8500 IO map specific description */
59static struct map_desc u8500_io_desc[] __initdata = {
60 __IO_DEV_DESC(U8500_PRCMU_BASE, SZ_4K),
57 __IO_DEV_DESC(U8500_PRCMU_TCDM_BASE, SZ_4K), 61 __IO_DEV_DESC(U8500_PRCMU_TCDM_BASE, SZ_4K),
62
63};
64
65/* U9540 IO map specific description */
66static struct map_desc u9540_io_desc[] __initdata = {
67 __IO_DEV_DESC(U8500_PRCMU_BASE, SZ_4K + SZ_8K),
68 __IO_DEV_DESC(U8500_PRCMU_TCDM_BASE, SZ_4K + SZ_8K),
58}; 69};
59 70
60void __init u8500_map_io(void) 71void __init u8500_map_io(void)
@@ -66,7 +77,12 @@ void __init u8500_map_io(void)
66 77
67 ux500_map_io(); 78 ux500_map_io();
68 79
69 iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc)); 80 iotable_init(u8500_common_io_desc, ARRAY_SIZE(u8500_common_io_desc));
81
82 if (cpu_is_u9540())
83 iotable_init(u9540_io_desc, ARRAY_SIZE(u9540_io_desc));
84 else
85 iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc));
70 86
71 _PRCMU_BASE = __io_address(U8500_PRCMU_BASE); 87 _PRCMU_BASE = __io_address(U8500_PRCMU_BASE);
72} 88}
@@ -121,6 +137,12 @@ static struct platform_device *platform_devs[] __initdata = {
121 &db8500_prcmu_device, 137 &db8500_prcmu_device,
122}; 138};
123 139
140static struct platform_device *of_platform_devs[] __initdata = {
141 &u8500_dma40_device,
142 &db8500_pmu_device,
143 &db8500_prcmu_device,
144};
145
124static resource_size_t __initdata db8500_gpio_base[] = { 146static resource_size_t __initdata db8500_gpio_base[] = {
125 U8500_GPIOBANK0_BASE, 147 U8500_GPIOBANK0_BASE,
126 U8500_GPIOBANK1_BASE, 148 U8500_GPIOBANK1_BASE,
@@ -200,10 +222,16 @@ struct device * __init u8500_init_devices(void)
200 platform_device_register_data(parent, 222 platform_device_register_data(parent,
201 "cpufreq-u8500", -1, NULL, 0); 223 "cpufreq-u8500", -1, NULL, 0);
202 224
203 for (i = 0; i < ARRAY_SIZE(platform_devs); i++) 225 for (i = 0; i < ARRAY_SIZE(of_platform_devs); i++)
204 platform_devs[i]->dev.parent = parent; 226 of_platform_devs[i]->dev.parent = parent;
205 227
206 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); 228 /*
229 * Devices to be DT:ed:
230 * u8500_dma40_device = todo
231 * db8500_pmu_device = todo
232 * db8500_prcmu_device = todo
233 */
234 platform_add_devices(of_platform_devs, ARRAY_SIZE(of_platform_devs));
207 235
208 return parent; 236 return parent;
209} 237}