aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-realview
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-realview')
-rw-r--r--arch/arm/mach-realview/Kconfig2
-rw-r--r--arch/arm/mach-realview/core.c55
-rw-r--r--arch/arm/mach-realview/core.h2
-rw-r--r--arch/arm/mach-realview/include/mach/board-pba8.h2
-rw-r--r--arch/arm/mach-realview/include/mach/platform.h6
-rw-r--r--arch/arm/mach-realview/include/mach/system.h2
-rw-r--r--arch/arm/mach-realview/realview_eb.c16
-rw-r--r--arch/arm/mach-realview/realview_pb1176.c15
-rw-r--r--arch/arm/mach-realview/realview_pb11mp.c25
-rw-r--r--arch/arm/mach-realview/realview_pba8.c25
10 files changed, 110 insertions, 40 deletions
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig
index ad911854eb4c..b6ec10627776 100644
--- a/arch/arm/mach-realview/Kconfig
+++ b/arch/arm/mach-realview/Kconfig
@@ -35,6 +35,7 @@ config MACH_REALVIEW_PB11MP
35 bool "Support RealView/PB11MPCore platform" 35 bool "Support RealView/PB11MPCore platform"
36 select CPU_V6 36 select CPU_V6
37 select ARM_GIC 37 select ARM_GIC
38 select HAVE_PATA_PLATFORM
38 help 39 help
39 Include support for the ARM(R) RealView MPCore Platform Baseboard. 40 Include support for the ARM(R) RealView MPCore Platform Baseboard.
40 PB11MPCore is a platform with an on-board ARM11MPCore and has 41 PB11MPCore is a platform with an on-board ARM11MPCore and has
@@ -51,6 +52,7 @@ config MACH_REALVIEW_PBA8
51 bool "Support RealView/PB-A8 platform" 52 bool "Support RealView/PB-A8 platform"
52 select CPU_V7 53 select CPU_V7
53 select ARM_GIC 54 select ARM_GIC
55 select HAVE_PATA_PLATFORM
54 help 56 help
55 Include support for the ARM(R) RealView Cortex-A8 Platform Baseboard. 57 Include support for the ARM(R) RealView Cortex-A8 Platform Baseboard.
56 PB-A8 is a platform with an on-board Cortex-A8 and has support for 58 PB-A8 is a platform with an on-board Cortex-A8 and has support for
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index bd2aa4f16141..d6766685cfc7 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -29,6 +29,7 @@
29#include <linux/clockchips.h> 29#include <linux/clockchips.h>
30#include <linux/io.h> 30#include <linux/io.h>
31#include <linux/smc911x.h> 31#include <linux/smc911x.h>
32#include <linux/ata_platform.h>
32 33
33#include <asm/clkdev.h> 34#include <asm/clkdev.h>
34#include <asm/system.h> 35#include <asm/system.h>
@@ -150,6 +151,44 @@ int realview_eth_register(const char *name, struct resource *res)
150 return platform_device_register(&realview_eth_device); 151 return platform_device_register(&realview_eth_device);
151} 152}
152 153
154struct platform_device realview_usb_device = {
155 .name = "isp1760",
156 .num_resources = 2,
157};
158
159int realview_usb_register(struct resource *res)
160{
161 realview_usb_device.resource = res;
162 return platform_device_register(&realview_usb_device);
163}
164
165static struct pata_platform_info pata_platform_data = {
166 .ioport_shift = 1,
167};
168
169static struct resource pata_resources[] = {
170 [0] = {
171 .start = REALVIEW_CF_BASE,
172 .end = REALVIEW_CF_BASE + 0xff,
173 .flags = IORESOURCE_MEM,
174 },
175 [1] = {
176 .start = REALVIEW_CF_BASE + 0x100,
177 .end = REALVIEW_CF_BASE + SZ_4K - 1,
178 .flags = IORESOURCE_MEM,
179 },
180};
181
182struct platform_device realview_cf_device = {
183 .name = "pata_platform",
184 .id = -1,
185 .num_resources = ARRAY_SIZE(pata_resources),
186 .resource = pata_resources,
187 .dev = {
188 .platform_data = &pata_platform_data,
189 },
190};
191
153static struct resource realview_i2c_resource = { 192static struct resource realview_i2c_resource = {
154 .start = REALVIEW_I2C_BASE, 193 .start = REALVIEW_I2C_BASE,
155 .end = REALVIEW_I2C_BASE + SZ_4K - 1, 194 .end = REALVIEW_I2C_BASE + SZ_4K - 1,
@@ -158,11 +197,25 @@ static struct resource realview_i2c_resource = {
158 197
159struct platform_device realview_i2c_device = { 198struct platform_device realview_i2c_device = {
160 .name = "versatile-i2c", 199 .name = "versatile-i2c",
161 .id = -1, 200 .id = 0,
162 .num_resources = 1, 201 .num_resources = 1,
163 .resource = &realview_i2c_resource, 202 .resource = &realview_i2c_resource,
164}; 203};
165 204
205static struct i2c_board_info realview_i2c_board_info[] = {
206 {
207 I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1),
208 .type = "ds1338",
209 },
210};
211
212static int __init realview_i2c_init(void)
213{
214 return i2c_register_board_info(0, realview_i2c_board_info,
215 ARRAY_SIZE(realview_i2c_board_info));
216}
217arch_initcall(realview_i2c_init);
218
166#define REALVIEW_SYSMCI (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_MCI_OFFSET) 219#define REALVIEW_SYSMCI (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_MCI_OFFSET)
167 220
168static unsigned int realview_mmc_status(struct device *dev) 221static unsigned int realview_mmc_status(struct device *dev)
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
index 44269b162d49..21c08637683b 100644
--- a/arch/arm/mach-realview/core.h
+++ b/arch/arm/mach-realview/core.h
@@ -45,6 +45,7 @@ static struct amba_device name##_device = { \
45} 45}
46 46
47extern struct platform_device realview_flash_device; 47extern struct platform_device realview_flash_device;
48extern struct platform_device realview_cf_device;
48extern struct platform_device realview_i2c_device; 49extern struct platform_device realview_i2c_device;
49extern struct mmc_platform_data realview_mmc0_plat_data; 50extern struct mmc_platform_data realview_mmc0_plat_data;
50extern struct mmc_platform_data realview_mmc1_plat_data; 51extern struct mmc_platform_data realview_mmc1_plat_data;
@@ -62,5 +63,6 @@ extern void realview_leds_event(led_event_t ledevt);
62extern void realview_timer_init(unsigned int timer_irq); 63extern void realview_timer_init(unsigned int timer_irq);
63extern int realview_flash_register(struct resource *res, u32 num); 64extern int realview_flash_register(struct resource *res, u32 num);
64extern int realview_eth_register(const char *name, struct resource *res); 65extern int realview_eth_register(const char *name, struct resource *res);
66extern int realview_usb_register(struct resource *res);
65 67
66#endif 68#endif
diff --git a/arch/arm/mach-realview/include/mach/board-pba8.h b/arch/arm/mach-realview/include/mach/board-pba8.h
index c8bed8f58bab..307f97b16e5b 100644
--- a/arch/arm/mach-realview/include/mach/board-pba8.h
+++ b/arch/arm/mach-realview/include/mach/board-pba8.h
@@ -45,8 +45,6 @@
45#define REALVIEW_PBA8_DMC_BASE 0x100E0000 /* DMC configuration */ 45#define REALVIEW_PBA8_DMC_BASE 0x100E0000 /* DMC configuration */
46#define REALVIEW_PBA8_SMC_BASE 0x100E1000 /* SMC configuration */ 46#define REALVIEW_PBA8_SMC_BASE 0x100E1000 /* SMC configuration */
47#define REALVIEW_PBA8_CAN_BASE 0x100E2000 /* CAN bus */ 47#define REALVIEW_PBA8_CAN_BASE 0x100E2000 /* CAN bus */
48#define REALVIEW_PBA8_CF_BASE 0x18000000 /* Compact flash */
49#define REALVIEW_PBA8_CF_MEM_BASE 0x18003000 /* SMC for Compact flash */
50#define REALVIEW_PBA8_GIC_CPU_BASE 0x1E000000 /* Generic interrupt controller CPU interface */ 48#define REALVIEW_PBA8_GIC_CPU_BASE 0x1E000000 /* Generic interrupt controller CPU interface */
51#define REALVIEW_PBA8_FLASH0_BASE 0x40000000 49#define REALVIEW_PBA8_FLASH0_BASE 0x40000000
52#define REALVIEW_PBA8_FLASH0_SIZE SZ_64M 50#define REALVIEW_PBA8_FLASH0_SIZE SZ_64M
diff --git a/arch/arm/mach-realview/include/mach/platform.h b/arch/arm/mach-realview/include/mach/platform.h
index 793a3a332712..c8f50835fed2 100644
--- a/arch/arm/mach-realview/include/mach/platform.h
+++ b/arch/arm/mach-realview/include/mach/platform.h
@@ -204,6 +204,12 @@
204#define REALVIEW_LT_BASE 0x80000000 /* Logic Tile expansion */ 204#define REALVIEW_LT_BASE 0x80000000 /* Logic Tile expansion */
205 205
206/* 206/*
207 * CompactFlash
208 */
209#define REALVIEW_CF_BASE 0x18000000 /* CompactFlash */
210#define REALVIEW_CF_MEM_BASE 0x18003000 /* SMC for CompactFlash */
211
212/*
207 * Disk on Chip 213 * Disk on Chip
208 */ 214 */
209#define REALVIEW_DOC_BASE 0x2C000000 215#define REALVIEW_DOC_BASE 0x2C000000
diff --git a/arch/arm/mach-realview/include/mach/system.h b/arch/arm/mach-realview/include/mach/system.h
index a2f61c78adbf..1a15a441e027 100644
--- a/arch/arm/mach-realview/include/mach/system.h
+++ b/arch/arm/mach-realview/include/mach/system.h
@@ -34,7 +34,7 @@ static inline void arch_idle(void)
34 cpu_do_idle(); 34 cpu_do_idle();
35} 35}
36 36
37static inline void arch_reset(char mode) 37static inline void arch_reset(char mode, const char *cmd)
38{ 38{
39 void __iomem *hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_RESETCTL_OFFSET; 39 void __iomem *hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_RESETCTL_OFFSET;
40 unsigned int val; 40 unsigned int val;
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index bed39ed97613..c20fbef122b3 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -264,6 +264,19 @@ static int eth_device_register(void)
264 return realview_eth_register(name, realview_eb_eth_resources); 264 return realview_eth_register(name, realview_eb_eth_resources);
265} 265}
266 266
267static struct resource realview_eb_isp1761_resources[] = {
268 [0] = {
269 .start = REALVIEW_EB_USB_BASE,
270 .end = REALVIEW_EB_USB_BASE + SZ_128K - 1,
271 .flags = IORESOURCE_MEM,
272 },
273 [1] = {
274 .start = IRQ_EB_USB,
275 .end = IRQ_EB_USB,
276 .flags = IORESOURCE_IRQ,
277 },
278};
279
267static void __init gic_init_irq(void) 280static void __init gic_init_irq(void)
268{ 281{
269 if (core_tile_eb11mp() || core_tile_a9mp()) { 282 if (core_tile_eb11mp() || core_tile_a9mp()) {
@@ -323,6 +336,8 @@ static void realview_eb11mp_fixup(void)
323 /* platform devices */ 336 /* platform devices */
324 realview_eb_eth_resources[1].start = IRQ_EB11MP_ETH; 337 realview_eb_eth_resources[1].start = IRQ_EB11MP_ETH;
325 realview_eb_eth_resources[1].end = IRQ_EB11MP_ETH; 338 realview_eb_eth_resources[1].end = IRQ_EB11MP_ETH;
339 realview_eb_isp1761_resources[1].start = IRQ_EB11MP_USB;
340 realview_eb_isp1761_resources[1].end = IRQ_EB11MP_USB;
326} 341}
327 342
328static void __init realview_eb_timer_init(void) 343static void __init realview_eb_timer_init(void)
@@ -366,6 +381,7 @@ static void __init realview_eb_init(void)
366 realview_flash_register(&realview_eb_flash_resource, 1); 381 realview_flash_register(&realview_eb_flash_resource, 1);
367 platform_device_register(&realview_i2c_device); 382 platform_device_register(&realview_i2c_device);
368 eth_device_register(); 383 eth_device_register();
384 realview_usb_register(realview_eb_isp1761_resources);
369 385
370 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 386 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
371 struct amba_device *d = amba_devs[i]; 387 struct amba_device *d = amba_devs[i];
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index 8f0683c22140..a64b84a7a3df 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -222,6 +222,19 @@ static struct resource realview_pb1176_smsc911x_resources[] = {
222 }, 222 },
223}; 223};
224 224
225static struct resource realview_pb1176_isp1761_resources[] = {
226 [0] = {
227 .start = REALVIEW_PB1176_USB_BASE,
228 .end = REALVIEW_PB1176_USB_BASE + SZ_128K - 1,
229 .flags = IORESOURCE_MEM,
230 },
231 [1] = {
232 .start = IRQ_PB1176_USB,
233 .end = IRQ_PB1176_USB,
234 .flags = IORESOURCE_IRQ,
235 },
236};
237
225static void __init gic_init_irq(void) 238static void __init gic_init_irq(void)
226{ 239{
227 /* ARM1176 DevChip GIC, primary */ 240 /* ARM1176 DevChip GIC, primary */
@@ -260,6 +273,8 @@ static void __init realview_pb1176_init(void)
260 273
261 realview_flash_register(&realview_pb1176_flash_resource, 1); 274 realview_flash_register(&realview_pb1176_flash_resource, 1);
262 realview_eth_register(NULL, realview_pb1176_smsc911x_resources); 275 realview_eth_register(NULL, realview_pb1176_smsc911x_resources);
276 platform_device_register(&realview_i2c_device);
277 realview_usb_register(realview_pb1176_isp1761_resources);
263 278
264 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 279 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
265 struct amba_device *d = amba_devs[i]; 280 struct amba_device *d = amba_devs[i];
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index 3ebdb2dadd6f..ea1e60eca359 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -230,31 +230,19 @@ static struct resource realview_pb11mp_smsc911x_resources[] = {
230 }, 230 },
231}; 231};
232 232
233struct resource realview_pb11mp_cf_resources[] = { 233static struct resource realview_pb11mp_isp1761_resources[] = {
234 [0] = { 234 [0] = {
235 .start = REALVIEW_PB11MP_CF_BASE, 235 .start = REALVIEW_PB11MP_USB_BASE,
236 .end = REALVIEW_PB11MP_CF_BASE + SZ_4K - 1, 236 .end = REALVIEW_PB11MP_USB_BASE + SZ_128K - 1,
237 .flags = IORESOURCE_MEM, 237 .flags = IORESOURCE_MEM,
238 }, 238 },
239 [1] = { 239 [1] = {
240 .start = REALVIEW_PB11MP_CF_MEM_BASE, 240 .start = IRQ_TC11MP_USB,
241 .end = REALVIEW_PB11MP_CF_MEM_BASE + SZ_4K - 1, 241 .end = IRQ_TC11MP_USB,
242 .flags = IORESOURCE_MEM,
243 },
244 [2] = {
245 .start = -1, /* FIXME: Find correct irq */
246 .end = -1,
247 .flags = IORESOURCE_IRQ, 242 .flags = IORESOURCE_IRQ,
248 }, 243 },
249}; 244};
250 245
251struct platform_device realview_pb11mp_cf_device = {
252 .name = "compactflash",
253 .id = 0,
254 .num_resources = ARRAY_SIZE(realview_pb11mp_cf_resources),
255 .resource = realview_pb11mp_cf_resources,
256};
257
258static void __init gic_init_irq(void) 246static void __init gic_init_irq(void)
259{ 247{
260 unsigned int pldctrl; 248 unsigned int pldctrl;
@@ -308,7 +296,8 @@ static void __init realview_pb11mp_init(void)
308 ARRAY_SIZE(realview_pb11mp_flash_resource)); 296 ARRAY_SIZE(realview_pb11mp_flash_resource));
309 realview_eth_register(NULL, realview_pb11mp_smsc911x_resources); 297 realview_eth_register(NULL, realview_pb11mp_smsc911x_resources);
310 platform_device_register(&realview_i2c_device); 298 platform_device_register(&realview_i2c_device);
311 platform_device_register(&realview_pb11mp_cf_device); 299 platform_device_register(&realview_cf_device);
300 realview_usb_register(realview_pb11mp_isp1761_resources);
312 301
313 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 302 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
314 struct amba_device *d = amba_devs[i]; 303 struct amba_device *d = amba_devs[i];
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c
index 34c94435d2d8..d6ac1eb86576 100644
--- a/arch/arm/mach-realview/realview_pba8.c
+++ b/arch/arm/mach-realview/realview_pba8.c
@@ -221,31 +221,19 @@ static struct resource realview_pba8_smsc911x_resources[] = {
221 }, 221 },
222}; 222};
223 223
224struct resource realview_pba8_cf_resources[] = { 224static struct resource realview_pba8_isp1761_resources[] = {
225 [0] = { 225 [0] = {
226 .start = REALVIEW_PBA8_CF_BASE, 226 .start = REALVIEW_PBA8_USB_BASE,
227 .end = REALVIEW_PBA8_CF_BASE + SZ_4K - 1, 227 .end = REALVIEW_PBA8_USB_BASE + SZ_128K - 1,
228 .flags = IORESOURCE_MEM, 228 .flags = IORESOURCE_MEM,
229 }, 229 },
230 [1] = { 230 [1] = {
231 .start = REALVIEW_PBA8_CF_MEM_BASE, 231 .start = IRQ_PBA8_USB,
232 .end = REALVIEW_PBA8_CF_MEM_BASE + SZ_4K - 1, 232 .end = IRQ_PBA8_USB,
233 .flags = IORESOURCE_MEM,
234 },
235 [2] = {
236 .start = -1, /* FIXME: Find correct irq */
237 .end = -1,
238 .flags = IORESOURCE_IRQ, 233 .flags = IORESOURCE_IRQ,
239 }, 234 },
240}; 235};
241 236
242struct platform_device realview_pba8_cf_device = {
243 .name = "compactflash",
244 .id = 0,
245 .num_resources = ARRAY_SIZE(realview_pba8_cf_resources),
246 .resource = realview_pba8_cf_resources,
247};
248
249static void __init gic_init_irq(void) 237static void __init gic_init_irq(void)
250{ 238{
251 /* ARM PB-A8 on-board GIC */ 239 /* ARM PB-A8 on-board GIC */
@@ -276,7 +264,8 @@ static void __init realview_pba8_init(void)
276 ARRAY_SIZE(realview_pba8_flash_resource)); 264 ARRAY_SIZE(realview_pba8_flash_resource));
277 realview_eth_register(NULL, realview_pba8_smsc911x_resources); 265 realview_eth_register(NULL, realview_pba8_smsc911x_resources);
278 platform_device_register(&realview_i2c_device); 266 platform_device_register(&realview_i2c_device);
279 platform_device_register(&realview_pba8_cf_device); 267 platform_device_register(&realview_cf_device);
268 realview_usb_register(realview_pba8_isp1761_resources);
280 269
281 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 270 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
282 struct amba_device *d = amba_devs[i]; 271 struct amba_device *d = amba_devs[i];