Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6
[pandora-kernel.git] / arch / arm / mach-pxa / devices.c
index 8e10db1..08b4103 100644 (file)
@@ -4,12 +4,14 @@
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 
+#include <asm/pmu.h>
 #include <mach/udc.h>
+#include <mach/pxa3xx-u2d.h>
 #include <mach/pxafb.h>
 #include <mach/mmc.h>
 #include <mach/irda.h>
 #include <mach/ohci.h>
-#include <mach/pxa27x_keypad.h>
+#include <plat/pxa27x_keypad.h>
 #include <mach/pxa2xx_spi.h>
 #include <mach/camera.h>
 #include <mach/audio.h>
@@ -31,6 +33,19 @@ void __init pxa_register_device(struct platform_device *dev, void *data)
                dev_err(&dev->dev, "unable to register device: %d\n", ret);
 }
 
+static struct resource pxa_resource_pmu = {
+       .start  = IRQ_PMU,
+       .end    = IRQ_PMU,
+       .flags  = IORESOURCE_IRQ,
+};
+
+struct platform_device pxa_device_pmu = {
+       .name           = "arm-pmu",
+       .id             = ARM_PMU_DEVICE_CPU,
+       .resource       = &pxa_resource_pmu,
+       .num_resources  = 1,
+};
+
 static struct resource pxamci_resources[] = {
        [0] = {
                .start  = 0x41100000,
@@ -120,6 +135,33 @@ struct platform_device pxa27x_device_udc = {
        }
 };
 
+#ifdef CONFIG_PXA3xx
+static struct resource pxa3xx_u2d_resources[] = {
+       [0] = {
+               .start  = 0x54100000,
+               .end    = 0x54100fff,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = IRQ_USB2,
+               .end    = IRQ_USB2,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device pxa3xx_device_u2d = {
+       .name           = "pxa3xx-u2d",
+       .id             = -1,
+       .resource       = pxa3xx_u2d_resources,
+       .num_resources  = ARRAY_SIZE(pxa3xx_u2d_resources),
+};
+
+void __init pxa3xx_set_u2d_info(struct pxa3xx_u2d_platform_data *info)
+{
+       pxa_register_device(&pxa3xx_device_u2d, info);
+}
+#endif /* CONFIG_PXA3xx */
+
 static struct resource pxafb_resources[] = {
        [0] = {
                .start  = 0x44000000,