sh: platform_pata support for R7780RP
authorPaul Mundt <lethal@linux-sh.org>
Wed, 6 Dec 2006 01:43:44 +0000 (10:43 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 6 Dec 2006 01:45:40 +0000 (10:45 +0900)
This adds a platform device for the directly connected
CF interface on R7780RP boards, for use with the
pata_platform libata driver.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/boards/renesas/r7780rp/setup.c

index c331caeb694b681658639d5a8e75a3f765afa36c..9f89c8de9db98ba9f5a4e0ad3f6478520af515a0 100644 (file)
@@ -44,8 +44,37 @@ static struct platform_device m66596_usb_host_device = {
        .resource       = m66596_usb_host_resources,
 };
 
+static struct resource cf_ide_resources[] = {
+       [0] = {
+               .start  = 0x1f0,
+               .end    = 0x1f0 + 8,
+               .flags  = IORESOURCE_IO,
+       },
+       [1] = {
+               .start  = 0x1f0 + 0x206,
+               .end    = 0x1f0 + 8 + 0x206 + 8,
+               .flags  = IORESOURCE_IO,
+       },
+       [2] = {
+#ifdef CONFIG_SH_R7780MP
+               .start  = 1,
+#else
+               .start  = 4,
+#endif
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device cf_ide_device  = {
+       .name           = "pata_platform",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(cf_ide_resources),
+       .resource       = cf_ide_resources,
+};
+
 static struct platform_device *r7780rp_devices[] __initdata = {
        &m66596_usb_host_device,
+       &cf_ide_device,
 };
 
 static int __init r7780rp_devices_setup(void)