]> err.no Git - linux-2.6/blobdiff - arch/arm/mach-pxa/devices.c
Merge branch 'for-2.6.26' of git://git.kernel.dk/linux-2.6-block
[linux-2.6] / arch / arm / mach-pxa / devices.c
index bc04e87ed3b49a75e7dc2929779a656a36d633ff..d6c05b6eab359af09d97051bec813ccf67d8e61b 100644 (file)
@@ -10,6 +10,9 @@
 #include <asm/arch/mmc.h>
 #include <asm/arch/irda.h>
 #include <asm/arch/i2c.h>
+#include <asm/arch/ohci.h>
+#include <asm/arch/pxa27x_keypad.h>
+#include <asm/arch/camera.h>
 
 #include "devices.h"
 
@@ -395,6 +398,62 @@ struct platform_device pxa25x_device_assp = {
 
 #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
 
+static struct resource pxa27x_resource_keypad[] = {
+       [0] = {
+               .start  = 0x41500000,
+               .end    = 0x4150004c,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = IRQ_KEYPAD,
+               .end    = IRQ_KEYPAD,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device pxa27x_device_keypad = {
+       .name           = "pxa27x-keypad",
+       .id             = -1,
+       .resource       = pxa27x_resource_keypad,
+       .num_resources  = ARRAY_SIZE(pxa27x_resource_keypad),
+};
+
+void __init pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info)
+{
+       pxa_register_device(&pxa27x_device_keypad, info);
+}
+
+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[] = {
@@ -508,6 +567,37 @@ struct platform_device pxa27x_device_ssp3 = {
        .resource       = pxa27x_resource_ssp3,
        .num_resources  = ARRAY_SIZE(pxa27x_resource_ssp3),
 };
+
+static struct resource pxa27x_resource_camera[] = {
+       [0] = {
+               .start  = 0x50000000,
+               .end    = 0x50000fff,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = IRQ_CAMERA,
+               .end    = IRQ_CAMERA,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static u64 pxa27x_dma_mask_camera = DMA_BIT_MASK(32);
+
+static struct platform_device pxa27x_device_camera = {
+       .name           = "pxa27x-camera",
+       .id             = 0, /* This is used to put cameras on this interface */
+       .dev            = {
+               .dma_mask               = &pxa27x_dma_mask_camera,
+               .coherent_dma_mask      = 0xffffffff,
+       },
+       .num_resources  = ARRAY_SIZE(pxa27x_resource_camera),
+       .resource       = pxa27x_resource_camera,
+};
+
+void __init pxa_set_camera_info(struct pxacamera_platform_data *info)
+{
+       pxa_register_device(&pxa27x_device_camera, info);
+}
 #endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
 
 #ifdef CONFIG_PXA3xx
@@ -589,4 +679,43 @@ 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 */