[ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / mach-rpc / riscpc.c
index 208a2b5dba1b009b4515463812a2b686c287db3e..ce8470fea8873c4dd14fc262479779ff08b01a31 100644 (file)
 #include <linux/sched.h>
 #include <linux/device.h>
 #include <linux/serial_8250.h>
+#include <linux/ata_platform.h>
 
 #include <asm/elf.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
-#include <asm/hardware.h>
+#include <mach/hardware.h>
 #include <asm/page.h>
 #include <asm/domain.h>
 #include <asm/setup.h>
@@ -86,7 +87,7 @@ static void __init rpc_map_io(void)
        /*
         * Turn off floppy.
         */
-       outb(0xc, 0x3f2);
+       writeb(0xc, PCIO_BASE + (0x3f2 << 2));
 
        /*
         * RiscPC can't handle half-word loads and stores
@@ -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)