diff options
author | Nick Bowler <nbowler@elliptictech.com> | 2011-01-21 09:51:06 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-25 11:19:12 -0500 |
commit | 95c34f831f0e06cda6dc0a26b4f693ed105c394d (patch) | |
tree | 5ca911d2c9ef1a822e686b2e55e099957738ee08 /arch | |
parent | baaece224570a935210a59257b5d9073e99843ea (diff) |
ARM: 6633/1: vexpress: register platform PATA device.
The compactflash device on this platform is not usable simply because it
is never registered with the kernel. Fix that up.
Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/v2m.c | 25 |
2 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 5cff165b7eb0..70a017042ef0 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -269,6 +269,7 @@ config ARCH_VEXPRESS | |||
269 | select GENERIC_CLOCKEVENTS | 269 | select GENERIC_CLOCKEVENTS |
270 | select HAVE_CLK | 270 | select HAVE_CLK |
271 | select HAVE_SCHED_CLOCK | 271 | select HAVE_SCHED_CLOCK |
272 | select HAVE_PATA_PLATFORM | ||
272 | select ICST | 273 | select ICST |
273 | select PLAT_VERSATILE | 274 | select PLAT_VERSATILE |
274 | help | 275 | help |
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 1edae65a0e72..f35d646a1bf1 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/io.h> | 7 | #include <linux/io.h> |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/platform_device.h> | 9 | #include <linux/platform_device.h> |
10 | #include <linux/ata_platform.h> | ||
10 | #include <linux/smsc911x.h> | 11 | #include <linux/smsc911x.h> |
11 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
12 | #include <linux/sysdev.h> | 13 | #include <linux/sysdev.h> |
@@ -249,6 +250,29 @@ static struct platform_device v2m_flash_device = { | |||
249 | .dev.platform_data = &v2m_flash_data, | 250 | .dev.platform_data = &v2m_flash_data, |
250 | }; | 251 | }; |
251 | 252 | ||
253 | static struct pata_platform_info v2m_pata_data = { | ||
254 | .ioport_shift = 2, | ||
255 | }; | ||
256 | |||
257 | static struct resource v2m_pata_resources[] = { | ||
258 | { | ||
259 | .start = V2M_CF, | ||
260 | .end = V2M_CF + 0xff, | ||
261 | .flags = IORESOURCE_MEM, | ||
262 | }, { | ||
263 | .start = V2M_CF + 0x100, | ||
264 | .end = V2M_CF + SZ_4K - 1, | ||
265 | .flags = IORESOURCE_MEM, | ||
266 | }, | ||
267 | }; | ||
268 | |||
269 | static struct platform_device v2m_cf_device = { | ||
270 | .name = "pata_platform", | ||
271 | .id = -1, | ||
272 | .resource = v2m_pata_resources, | ||
273 | .num_resources = ARRAY_SIZE(v2m_pata_resources), | ||
274 | .dev.platform_data = &v2m_pata_data, | ||
275 | }; | ||
252 | 276 | ||
253 | static unsigned int v2m_mmci_status(struct device *dev) | 277 | static unsigned int v2m_mmci_status(struct device *dev) |
254 | { | 278 | { |
@@ -363,6 +387,7 @@ static int __init v2m_init(void) | |||
363 | platform_device_register(&v2m_pcie_i2c_device); | 387 | platform_device_register(&v2m_pcie_i2c_device); |
364 | platform_device_register(&v2m_ddc_i2c_device); | 388 | platform_device_register(&v2m_ddc_i2c_device); |
365 | platform_device_register(&v2m_flash_device); | 389 | platform_device_register(&v2m_flash_device); |
390 | platform_device_register(&v2m_cf_device); | ||
366 | platform_device_register(&v2m_eth_device); | 391 | platform_device_register(&v2m_eth_device); |
367 | platform_device_register(&v2m_usb_device); | 392 | platform_device_register(&v2m_usb_device); |
368 | 393 | ||