aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-realview/Kconfig2
-rw-r--r--arch/arm/mach-realview/core.c28
-rw-r--r--arch/arm/mach-realview/core.h1
-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/realview_pb11mp.c27
-rw-r--r--arch/arm/mach-realview/realview_pba8.c27
7 files changed, 39 insertions, 54 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 27b48be73676..51972ecfc506 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,33 @@ 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
154static struct pata_platform_info pata_platform_data = {
155 .ioport_shift = 1,
156};
157
158static struct resource pata_resources[] = {
159 [0] = {
160 .start = REALVIEW_CF_BASE,
161 .end = REALVIEW_CF_BASE + 0xff,
162 .flags = IORESOURCE_MEM,
163 },
164 [1] = {
165 .start = REALVIEW_CF_BASE + 0x100,
166 .end = REALVIEW_CF_BASE + SZ_4K - 1,
167 .flags = IORESOURCE_MEM,
168 },
169};
170
171struct platform_device realview_cf_device = {
172 .name = "pata_platform",
173 .id = -1,
174 .num_resources = ARRAY_SIZE(pata_resources),
175 .resource = pata_resources,
176 .dev = {
177 .platform_data = &pata_platform_data,
178 },
179};
180
153static struct resource realview_i2c_resource = { 181static struct resource realview_i2c_resource = {
154 .start = REALVIEW_I2C_BASE, 182 .start = REALVIEW_I2C_BASE,
155 .end = REALVIEW_I2C_BASE + SZ_4K - 1, 183 .end = REALVIEW_I2C_BASE + SZ_4K - 1,
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
index 44269b162d49..0ba1bfb1fe6b 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;
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/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index 3ebdb2dadd6f..ff50ec2e4320 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -230,31 +230,6 @@ static struct resource realview_pb11mp_smsc911x_resources[] = {
230 }, 230 },
231}; 231};
232 232
233struct resource realview_pb11mp_cf_resources[] = {
234 [0] = {
235 .start = REALVIEW_PB11MP_CF_BASE,
236 .end = REALVIEW_PB11MP_CF_BASE + SZ_4K - 1,
237 .flags = IORESOURCE_MEM,
238 },
239 [1] = {
240 .start = REALVIEW_PB11MP_CF_MEM_BASE,
241 .end = REALVIEW_PB11MP_CF_MEM_BASE + SZ_4K - 1,
242 .flags = IORESOURCE_MEM,
243 },
244 [2] = {
245 .start = -1, /* FIXME: Find correct irq */
246 .end = -1,
247 .flags = IORESOURCE_IRQ,
248 },
249};
250
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) 233static void __init gic_init_irq(void)
259{ 234{
260 unsigned int pldctrl; 235 unsigned int pldctrl;
@@ -308,7 +283,7 @@ static void __init realview_pb11mp_init(void)
308 ARRAY_SIZE(realview_pb11mp_flash_resource)); 283 ARRAY_SIZE(realview_pb11mp_flash_resource));
309 realview_eth_register(NULL, realview_pb11mp_smsc911x_resources); 284 realview_eth_register(NULL, realview_pb11mp_smsc911x_resources);
310 platform_device_register(&realview_i2c_device); 285 platform_device_register(&realview_i2c_device);
311 platform_device_register(&realview_pb11mp_cf_device); 286 platform_device_register(&realview_cf_device);
312 287
313 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 288 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
314 struct amba_device *d = amba_devs[i]; 289 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..c6147cba2578 100644
--- a/arch/arm/mach-realview/realview_pba8.c
+++ b/arch/arm/mach-realview/realview_pba8.c
@@ -221,31 +221,6 @@ static struct resource realview_pba8_smsc911x_resources[] = {
221 }, 221 },
222}; 222};
223 223
224struct resource realview_pba8_cf_resources[] = {
225 [0] = {
226 .start = REALVIEW_PBA8_CF_BASE,
227 .end = REALVIEW_PBA8_CF_BASE + SZ_4K - 1,
228 .flags = IORESOURCE_MEM,
229 },
230 [1] = {
231 .start = REALVIEW_PBA8_CF_MEM_BASE,
232 .end = REALVIEW_PBA8_CF_MEM_BASE + SZ_4K - 1,
233 .flags = IORESOURCE_MEM,
234 },
235 [2] = {
236 .start = -1, /* FIXME: Find correct irq */
237 .end = -1,
238 .flags = IORESOURCE_IRQ,
239 },
240};
241
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) 224static void __init gic_init_irq(void)
250{ 225{
251 /* ARM PB-A8 on-board GIC */ 226 /* ARM PB-A8 on-board GIC */
@@ -276,7 +251,7 @@ static void __init realview_pba8_init(void)
276 ARRAY_SIZE(realview_pba8_flash_resource)); 251 ARRAY_SIZE(realview_pba8_flash_resource));
277 realview_eth_register(NULL, realview_pba8_smsc911x_resources); 252 realview_eth_register(NULL, realview_pba8_smsc911x_resources);
278 platform_device_register(&realview_i2c_device); 253 platform_device_register(&realview_i2c_device);
279 platform_device_register(&realview_pba8_cf_device); 254 platform_device_register(&realview_cf_device);
280 255
281 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { 256 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
282 struct amba_device *d = amba_devs[i]; 257 struct amba_device *d = amba_devs[i];