aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-vexpress/v2m.c
diff options
context:
space:
mode:
authorNick Bowler <nbowler@elliptictech.com>2011-01-21 09:51:06 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-01-25 11:19:12 -0500
commit95c34f831f0e06cda6dc0a26b4f693ed105c394d (patch)
tree5ca911d2c9ef1a822e686b2e55e099957738ee08 /arch/arm/mach-vexpress/v2m.c
parentbaaece224570a935210a59257b5d9073e99843ea (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/arm/mach-vexpress/v2m.c')
-rw-r--r--arch/arm/mach-vexpress/v2m.c25
1 files changed, 25 insertions, 0 deletions
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
253static struct pata_platform_info v2m_pata_data = {
254 .ioport_shift = 2,
255};
256
257static 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
269static 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
253static unsigned int v2m_mmci_status(struct device *dev) 277static 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