Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a17dba8df9848c548912fbe9bf4b28c5a67c5413
Commit:     a17dba8df9848c548912fbe9bf4b28c5a67c5413
Parent:     69f4f331a0f78470f0bc42ba8db8d6cdd9cae4a9
Author:     Russell King <[EMAIL PROTECTED]>
AuthorDate: Sat Apr 21 15:55:06 2007 +0100
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Thu May 3 14:16:55 2007 +0100

    [ARM] Add platform support for PATA on RiscPC
    
    Add pata_platform device for RiscPC, thereby converting the primary
    IDE channel on the machine to PATA.
    
    Acked-by: Jeff Garzik <[EMAIL PROTECTED]>
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
---
 arch/arm/mach-rpc/riscpc.c |   35 +++++++++++++++++++++++++++++++++++
 drivers/ata/Kconfig        |    2 +-
 2 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
index 208a2b5..570cf93 100644
--- a/arch/arm/mach-rpc/riscpc.c
+++ b/arch/arm/mach-rpc/riscpc.c
@@ -17,6 +17,7 @@
 #include <linux/sched.h>
 #include <linux/device.h>
 #include <linux/serial_8250.h>
+#include <linux/pata_platform.h>
 
 #include <asm/elf.h>
 #include <asm/io.h>
@@ -159,11 +160,45 @@ static struct platform_device serial_device = {
        },
 };
 
+static struct pata_platform_info pata_platform_data = {
+       .ioport_shift           = 2,
+};
+
+static struct resource pata_resources[] = {
+       [0] = {
+               .start          = 0x030107c0,
+               .end            = 0x030107df,
+               .flags          = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start          = 0x03010fd8,
+               .end            = 0x03010fdb,
+               .flags          = IORESOURCE_MEM,
+       },
+       [2] = {
+               .start          = IRQ_HARDDISK,
+               .end            = IRQ_HARDDISK,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device pata_device = {
+       .name                   = "pata_platform",
+       .id                     = -1,
+       .num_resources          = ARRAY_SIZE(pata_resources),
+       .resource               = pata_resources,
+       .dev                    = {
+               .platform_data  = &pata_platform_data,
+               .coherent_dma_mask = ~0,        /* grumble */
+       },
+};
+
 static struct platform_device *devs[] __initdata = {
        &iomd_device,
        &kbd_device,
        &serial_device,
        &acornfb_device,
+       &pata_device,
 };
 
 static int __init rpc_init(void)
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 7bdbe5a..e0820e8 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -545,7 +545,7 @@ config PATA_WINBOND_VLB
 
 config PATA_PLATFORM
        tristate "Generic platform device PATA support"
-       depends on EMBEDDED
+       depends on EMBEDDED || ARCH_RPC
        help
          This option enables support for generic directly connected ATA
          devices commonly found on embedded systems.
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to