Updated pcmcia driver with pb1200 and db1200 support.
[linux-3.10.git] / arch / mips / au1000 / common / platform.c
index 0c3fd72..0f29815 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/init.h>
 #include <linux/resource.h>
 
-#include <asm/mach-au1x00/au1000.h>
+#include <asm/mach-au1x00/au1xxx.h>
 
 /* OHCI (USB full speed host controller) */
 static struct resource au1xxx_usb_ohci_resources[] = {
@@ -154,7 +154,6 @@ static struct platform_device au1xxx_usb_otg_device = {
        .resource       = au1xxx_usb_otg_resources,
 };
 
-/*** AU1200 LCD controller ***/
 static struct resource au1200_lcd_resources[] = {
        [0] = {
                .start          = LCD_PHYS_ADDR,
@@ -168,6 +167,19 @@ static struct resource au1200_lcd_resources[] = {
        }
 };
 
+static struct resource au1200_ide0_resources[] = {
+       [0] = {
+               .start          = AU1XXX_ATA_PHYS_ADDR,
+               .end            = AU1XXX_ATA_PHYS_ADDR + AU1XXX_ATA_PHYS_LEN,
+               .flags          = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start          = AU1XXX_ATA_INT,
+               .end            = AU1XXX_ATA_INT,
+               .flags          = IORESOURCE_IRQ,
+       }
+};
+
 static u64 au1200_lcd_dmamask = ~(u32)0;
 
 static struct platform_device au1200_lcd_device = {
@@ -180,10 +192,29 @@ static struct platform_device au1200_lcd_device = {
        .num_resources  = ARRAY_SIZE(au1200_lcd_resources),
        .resource       = au1200_lcd_resources,
 };
-#endif
+
+
+static u64 ide0_dmamask = ~(u32)0;
+
+static struct platform_device au1200_ide0_device = {
+       .name           = "au1200-ide",
+       .id             = 0,
+       .dev = {
+               .dma_mask               = &ide0_dmamask,
+               .coherent_dma_mask      = 0xffffffff,
+       },
+       .num_resources = ARRAY_SIZE(au1200_ide0_resources),
+       .resource       = au1200_ide0_resources,
+};
+
+static struct platform_device au1x00_pcmcia_device = {
+       .name           = "au1x00-pcmcia",
+       .id             = 0,
+};
 
 static struct platform_device *au1xxx_platform_devices[] __initdata = {
        &au1xxx_usb_ohci_device,
+       &au1x00_pcmcia_device,
 #ifdef CONFIG_FB_AU1100
        &au1100_lcd_device,
 #endif
@@ -194,6 +225,7 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = {
        &au1xxx_usb_gdt_device,
        &au1xxx_usb_otg_device,
        &au1200_lcd_device,
+       &au1200_ide0_device,
 #endif
 };