diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2009-02-12 15:59:21 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-02-19 11:30:26 +0000 |
commit | 6be62ba215059258b68072d4553f765f9b34f3d1 (patch) | |
tree | 5c9f1d68c8db4c820ffb50585c6ef051d5b5c67e /arch/arm/mach-realview/core.c | |
parent | 533ad5e60c0a5ff3cef7583b5b1b0eee84c2bda6 (diff) |
[ARM] 5396/1: RealView: Use PATA_PLATFORM to access the CompactFlash
This driver adds the platform_device definitions to allow the use of
CompactFlash on the RealView PB11MPCore and PB-A8 platforms. Note that
the CompactFlash controller is expected to be initialised by the Boot
Monitor and support the True IDE mode.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-realview/core.c')
-rw-r--r-- | arch/arm/mach-realview/core.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 27b48be7367..51972ecfc50 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c @@ -29,6 +29,7 @@ #include <linux/clockchips.h> #include <linux/io.h> #include <linux/smc911x.h> +#include <linux/ata_platform.h> #include <asm/clkdev.h> #include <asm/system.h> @@ -150,6 +151,33 @@ int realview_eth_register(const char *name, struct resource *res) return platform_device_register(&realview_eth_device); } +static struct pata_platform_info pata_platform_data = { + .ioport_shift = 1, +}; + +static struct resource pata_resources[] = { + [0] = { + .start = REALVIEW_CF_BASE, + .end = REALVIEW_CF_BASE + 0xff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = REALVIEW_CF_BASE + 0x100, + .end = REALVIEW_CF_BASE + SZ_4K - 1, + .flags = IORESOURCE_MEM, + }, +}; + +struct platform_device realview_cf_device = { + .name = "pata_platform", + .id = -1, + .num_resources = ARRAY_SIZE(pata_resources), + .resource = pata_resources, + .dev = { + .platform_data = &pata_platform_data, + }, +}; + static struct resource realview_i2c_resource = { .start = REALVIEW_I2C_BASE, .end = REALVIEW_I2C_BASE + SZ_4K - 1, |