]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/au1000/common/platform.c
Pull acpi_os_free into release branch
[linux-2.6-omap-h63xx.git] / arch / mips / au1000 / common / platform.c
index 0f29815003fa9363da21604a23b5b531f68eedff..8fd203d4a339bd2a9f2626e9375432b6432793ae 100644 (file)
@@ -8,6 +8,7 @@
  * warranty of any kind, whether express or implied.
  */
 #include <linux/device.h>
+#include <linux/platform_device.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/resource.h>
@@ -18,7 +19,7 @@
 static struct resource au1xxx_usb_ohci_resources[] = {
        [0] = {
                .start          = USB_OHCI_BASE,
-               .end            = USB_OHCI_BASE + USB_OHCI_LEN,
+               .end            = USB_OHCI_BASE + USB_OHCI_LEN - 1,
                .flags          = IORESOURCE_MEM,
        },
        [1] = {
@@ -114,6 +115,24 @@ static struct resource au1xxx_usb_gdt_resources[] = {
        },
 };
 
+static struct resource au1xxx_mmc_resources[] = {
+       [0] = {
+               .start          = SD0_PHYS_ADDR,
+               .end            = SD0_PHYS_ADDR + 0x40,
+               .flags          = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start          = SD1_PHYS_ADDR,
+               .end            = SD1_PHYS_ADDR + 0x40,
+               .flags          = IORESOURCE_MEM,
+       },
+       [2] = {
+               .start          = AU1200_SD_INT,
+               .end            = AU1200_SD_INT,
+               .flags          = IORESOURCE_IRQ,
+       }
+};
+
 static u64 udc_dmamask = ~(u32)0;
 
 static struct platform_device au1xxx_usb_gdt_device = {
@@ -207,11 +226,50 @@ static struct platform_device au1200_ide0_device = {
        .resource       = au1200_ide0_resources,
 };
 
+static u64 au1xxx_mmc_dmamask =  ~(u32)0;
+
+static struct platform_device au1xxx_mmc_device = {
+       .name = "au1xxx-mmc",
+       .id = 0,
+       .dev = {
+               .dma_mask               = &au1xxx_mmc_dmamask,
+               .coherent_dma_mask      = 0xffffffff,
+       },
+       .num_resources  = ARRAY_SIZE(au1xxx_mmc_resources),
+       .resource       = au1xxx_mmc_resources,
+};
+#endif /* #ifdef CONFIG_SOC_AU1200 */
+
 static struct platform_device au1x00_pcmcia_device = {
        .name           = "au1x00-pcmcia",
        .id             = 0,
 };
 
+#ifdef CONFIG_MIPS_DB1200
+
+static struct resource smc91x_resources[] = {
+       [0] = {
+               .name   = "smc91x-regs",
+               .start  = AU1XXX_SMC91111_PHYS_ADDR,
+               .end    = AU1XXX_SMC91111_PHYS_ADDR + 0xfffff,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = AU1XXX_SMC91111_IRQ,
+               .end    = AU1XXX_SMC91111_IRQ,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device smc91x_device = {
+       .name           = "smc91x",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(smc91x_resources),
+       .resource       = smc91x_resources,
+};
+
+#endif
+
 static struct platform_device *au1xxx_platform_devices[] __initdata = {
        &au1xxx_usb_ohci_device,
        &au1x00_pcmcia_device,
@@ -219,13 +277,15 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = {
        &au1100_lcd_device,
 #endif
 #ifdef CONFIG_SOC_AU1200
-#if 0  /* fixme */
        &au1xxx_usb_ehci_device,
-#endif
        &au1xxx_usb_gdt_device,
        &au1xxx_usb_otg_device,
        &au1200_lcd_device,
        &au1200_ide0_device,
+       &au1xxx_mmc_device,
+#endif
+#ifdef CONFIG_MIPS_DB1200
+       &smc91x_device,
 #endif
 };