ARM: 6283/1: Remove useless PCIO_BASE definitions
[pandora-kernel.git] / arch / arm / mach-imx / devices.c
index 84e6da6..9c271a7 100644 (file)
@@ -70,37 +70,6 @@ struct platform_device imx1_camera_device = {
        .num_resources  = ARRAY_SIZE(imx1_camera_resources),
 };
 
-#define DEFINE_IMX1_UART_DEVICE(n, baseaddr, irqrx, irqtx, irqrts)     \
-       static struct resource imx1_uart_resources ## n[] = {           \
-               {                                                       \
-                       .start = baseaddr,                              \
-                       .end = baseaddr + 0xd0,                         \
-                       .flags = IORESOURCE_MEM,                        \
-               }, {                                                    \
-                       .start = irqrx,                                 \
-                       .end = irqrx,                                   \
-                       .flags = IORESOURCE_IRQ,                        \
-               }, {                                                    \
-                       .start = irqtx,                                 \
-                       .end = irqtx,                                   \
-                       .flags = IORESOURCE_IRQ,                        \
-               }, {                                                    \
-                       .start = irqrts,                                \
-                       .end = irqrts,                                  \
-                       .flags = IORESOURCE_IRQ,                        \
-               },                                                      \
-       };                                                              \
-                                                                       \
-       struct platform_device imx1_uart_device ## n = {                \
-               .name = "imx-uart",                                     \
-               .id = n,                                                \
-               .num_resources = ARRAY_SIZE(imx1_uart_resources ## n),  \
-               .resource = imx1_uart_resources ## n,                   \
-       }
-
-DEFINE_IMX1_UART_DEVICE(0, MX1_UART1_BASE_ADDR, MX1_UART1_MINT_RX, MX1_UART1_MINT_TX, MX1_UART1_MINT_RTS);
-DEFINE_IMX1_UART_DEVICE(1, MX1_UART2_BASE_ADDR, MX1_UART2_MINT_RX, MX1_UART2_MINT_TX, MX1_UART2_MINT_RTS);
-
 static struct resource imx_rtc_resources[] = {
        {
                .start  = 0x00204000,
@@ -218,6 +187,38 @@ int __init imx1_register_gpios(void)
 #endif
 
 #if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27)
+
+#ifdef CONFIG_MACH_MX27
+static struct resource mx27_camera_resources[] = {
+       {
+              .start = MX27_CSI_BASE_ADDR,
+              .end = MX27_CSI_BASE_ADDR + 0x1f,
+              .flags = IORESOURCE_MEM,
+       }, {
+              .start = MX27_EMMA_PRP_BASE_ADDR,
+              .end = MX27_EMMA_PRP_BASE_ADDR + 0x1f,
+              .flags = IORESOURCE_MEM,
+       }, {
+              .start = MX27_INT_CSI,
+              .end = MX27_INT_CSI,
+              .flags = IORESOURCE_IRQ,
+       },{
+              .start = MX27_INT_EMMAPRP,
+              .end = MX27_INT_EMMAPRP,
+              .flags = IORESOURCE_IRQ,
+       },
+};
+struct platform_device mx27_camera_device = {
+       .name = "mx2-camera",
+       .id = 0,
+       .num_resources = ARRAY_SIZE(mx27_camera_resources),
+       .resource = mx27_camera_resources,
+       .dev = {
+               .coherent_dma_mask = 0xffffffff,
+       },
+};
+#endif
+
 /*
  * General Purpose Timer
  * - i.MX21: 3 timers
@@ -514,36 +515,6 @@ struct platform_device mxc_usbh2 = {
 DEFINE_IMX_SSI_DEVICE(0, 1, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1);
 DEFINE_IMX_SSI_DEVICE(1, 2, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1);
 
-#define DEFINE_IMX2x_UART_DEVICE(n, baseaddr, irq)                     \
-       static struct resource imx2x_uart_resources ## n[] = {          \
-               {                                                       \
-                       .start = baseaddr,                              \
-                       .end = baseaddr + 0xb5,                         \
-                       .flags = IORESOURCE_MEM,                        \
-               }, {                                                    \
-                       .start = irq,                                   \
-                       .end = irq,                                     \
-                       .flags = IORESOURCE_IRQ,                        \
-               },                                                      \
-       };                                                              \
-                                                                       \
-       struct platform_device imx2x_uart_device ## n = {               \
-               .name = "imx-uart",                                     \
-               .id = n,                                                \
-               .num_resources = ARRAY_SIZE(imx2x_uart_resources ## n), \
-               .resource = imx2x_uart_resources ## n,                  \
-       }
-
-DEFINE_IMX2x_UART_DEVICE(0, MX2x_UART1_BASE_ADDR, MX2x_INT_UART1);
-DEFINE_IMX2x_UART_DEVICE(1, MX2x_UART2_BASE_ADDR, MX2x_INT_UART2);
-DEFINE_IMX2x_UART_DEVICE(2, MX2x_UART3_BASE_ADDR, MX2x_INT_UART3);
-DEFINE_IMX2x_UART_DEVICE(3, MX2x_UART4_BASE_ADDR, MX2x_INT_UART4);
-
-#ifdef CONFIG_MACH_MX27
-DEFINE_IMX2x_UART_DEVICE(4, MX27_UART5_BASE_ADDR, MX27_INT_UART5);
-DEFINE_IMX2x_UART_DEVICE(5, MX27_UART6_BASE_ADDR, MX27_INT_UART6);
-#endif
-
 /* GPIO port description */
 #define DEFINE_MXC_GPIO_PORT_IRQ(SOC, n, _irq)                         \
        {                                                               \
@@ -615,4 +586,24 @@ struct platform_device mx21_usbhc_device = {
        .resource       = mx21_usbhc_resources,
 };
 #endif
+
+static struct resource imx_kpp_resources[] = {
+       {
+               .start  = MX2x_KPP_BASE_ADDR,
+               .end    = MX2x_KPP_BASE_ADDR + 0xf,
+               .flags  = IORESOURCE_MEM
+       }, {
+               .start  = MX2x_INT_KPP,
+               .end    = MX2x_INT_KPP,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device imx_kpp_device = {
+       .name = "imx-keypad",
+       .id = -1,
+       .num_resources = ARRAY_SIZE(imx_kpp_resources),
+       .resource = imx_kpp_resources,
+};
+
 #endif