x86: revert assign IRQs to hpet timer
[safe/jmp/linux-2.6] / arch / arm / mach-pxa / devices.c
index 75949eb..bfccb80 100644 (file)
@@ -10,6 +10,7 @@
 #include <asm/arch/mmc.h>
 #include <asm/arch/irda.h>
 #include <asm/arch/i2c.h>
+#include <asm/arch/ohci.h>
 
 #include "devices.h"
 
@@ -51,7 +52,7 @@ static u64 pxamci_dmamask = 0xffffffffUL;
 
 struct platform_device pxa_device_mci = {
        .name           = "pxa2xx-mci",
-       .id             = -1,
+       .id             = 0,
        .dev            = {
                .dma_mask = &pxamci_dmamask,
                .coherent_dma_mask = 0xffffffff,
@@ -395,6 +396,37 @@ struct platform_device pxa25x_device_assp = {
 
 #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
 
+static u64 pxa27x_ohci_dma_mask = DMA_BIT_MASK(32);
+
+static struct resource pxa27x_resource_ohci[] = {
+       [0] = {
+               .start  = 0x4C000000,
+               .end    = 0x4C00ff6f,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = IRQ_USBH1,
+               .end    = IRQ_USBH1,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device pxa27x_device_ohci = {
+       .name           = "pxa27x-ohci",
+       .id             = -1,
+       .dev            = {
+               .dma_mask = &pxa27x_ohci_dma_mask,
+               .coherent_dma_mask = DMA_BIT_MASK(32),
+       },
+       .num_resources  = ARRAY_SIZE(pxa27x_resource_ohci),
+       .resource       = pxa27x_resource_ohci,
+};
+
+void __init pxa_set_ohci_info(struct pxaohci_platform_data *info)
+{
+       pxa_register_device(&pxa27x_device_ohci, info);
+}
+
 static u64 pxa27x_ssp1_dma_mask = DMA_BIT_MASK(32);
 
 static struct resource pxa27x_resource_ssp1[] = {
@@ -549,4 +581,83 @@ struct platform_device pxa3xx_device_ssp4 = {
        .resource       = pxa3xx_resource_ssp4,
        .num_resources  = ARRAY_SIZE(pxa3xx_resource_ssp4),
 };
+
+static struct resource pxa3xx_resources_mci2[] = {
+       [0] = {
+               .start  = 0x42000000,
+               .end    = 0x42000fff,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = IRQ_MMC2,
+               .end    = IRQ_MMC2,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [2] = {
+               .start  = 93,
+               .end    = 93,
+               .flags  = IORESOURCE_DMA,
+       },
+       [3] = {
+               .start  = 94,
+               .end    = 94,
+               .flags  = IORESOURCE_DMA,
+       },
+};
+
+struct platform_device pxa3xx_device_mci2 = {
+       .name           = "pxa2xx-mci",
+       .id             = 1,
+       .dev            = {
+               .dma_mask = &pxamci_dmamask,
+               .coherent_dma_mask =    0xffffffff,
+       },
+       .num_resources  = ARRAY_SIZE(pxa3xx_resources_mci2),
+       .resource       = pxa3xx_resources_mci2,
+};
+
+void __init pxa3xx_set_mci2_info(struct pxamci_platform_data *info)
+{
+       pxa_register_device(&pxa3xx_device_mci2, info);
+}
+
+static struct resource pxa3xx_resources_mci3[] = {
+       [0] = {
+               .start  = 0x42500000,
+               .end    = 0x42500fff,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = IRQ_MMC3,
+               .end    = IRQ_MMC3,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [2] = {
+               .start  = 100,
+               .end    = 100,
+               .flags  = IORESOURCE_DMA,
+       },
+       [3] = {
+               .start  = 101,
+               .end    = 101,
+               .flags  = IORESOURCE_DMA,
+       },
+};
+
+struct platform_device pxa3xx_device_mci3 = {
+       .name           = "pxa2xx-mci",
+       .id             = 2,
+       .dev            = {
+               .dma_mask = &pxamci_dmamask,
+               .coherent_dma_mask = 0xffffffff,
+       },
+       .num_resources  = ARRAY_SIZE(pxa3xx_resources_mci3),
+       .resource       = pxa3xx_resources_mci3,
+};
+
+void __init pxa3xx_set_mci3_info(struct pxamci_platform_data *info)
+{
+       pxa_register_device(&pxa3xx_device_mci3, info);
+}
+
 #endif /* CONFIG_PXA3xx */