]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
patch-mx1-add-devices
authorDarius Augulis <augulis.darius@gmail.com>
Fri, 14 Nov 2008 10:01:38 +0000 (11:01 +0100)
committerSascha Hauer <s.hauer@pengutronix.de>
Tue, 16 Dec 2008 13:58:41 +0000 (14:58 +0100)
Adds common devices to ARCH_MX1.

Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/arm/mach-mx1/devices.c
arch/arm/mach-mx1/devices.h

index aa7b0b08dfca83d506f58f038806d7bbf423bc68..ad4679b9087009188d0b6b63407de135c3c9c8e9 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved.
  * Copyright 2008 Sascha Hauer, kernel@pengutronix.de
  * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
+ * Copyright (c) 2008 Darius Augulis <darius.augulis@teltonika.lt>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
 #include <linux/gpio.h>
 #include <mach/hardware.h>
 
+static struct resource imx_csi_resources[] = {
+       [0] = {
+               .start  = 0x00224000,
+               .end    = 0x00224010,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = CSI_INT,
+               .end    = CSI_INT,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static u64 imx_csi_dmamask = 0xffffffffUL;
+
+struct platform_device imx_csi_device = {
+       .name           = "imx-csi",
+       .id             = 0, /* This is used to put cameras on this interface */
+       .dev            = {
+               .dma_mask = &imx_csi_dmamask,
+               .coherent_dma_mask = 0xffffffff,
+       },
+       .resource       = imx_csi_resources,
+       .num_resources  = ARRAY_SIZE(imx_csi_resources),
+};
+
+static struct resource imx_i2c_resources[] = {
+       [0] = {
+               .start  = 0x00217000,
+               .end    = 0x00217010,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = I2C_INT,
+               .end    = I2C_INT,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device imx_i2c_device = {
+       .name           = "imx-i2c",
+       .id             = 0,
+       .resource       = imx_i2c_resources,
+       .num_resources  = ARRAY_SIZE(imx_i2c_resources),
+};
+
 static struct resource imx_uart1_resources[] = {
        [0] = {
                .start  = UART1_BASE_ADDR,
@@ -84,6 +131,101 @@ struct platform_device imx_uart2_device = {
        .resource       = imx_uart2_resources,
 };
 
+static struct resource imx_rtc_resources[] = {
+       [0] = {
+               .start  = 0x00204000,
+               .end    = 0x00204024,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = RTC_INT,
+               .end    = RTC_INT,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [2] = {
+               .start  = RTC_SAMINT,
+               .end    = RTC_SAMINT,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device imx_rtc_device = {
+       .name           = "rtc-imx",
+       .id             = 0,
+       .resource       = imx_rtc_resources,
+       .num_resources  = ARRAY_SIZE(imx_rtc_resources),
+};
+
+static struct resource imx_wdt_resources[] = {
+       [0] = {
+               .start  = 0x00201000,
+               .end    = 0x00201008,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = WDT_INT,
+               .end    = WDT_INT,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device imx_wdt_device = {
+       .name           = "imx-wdt",
+       .id             = 0,
+       .resource       = imx_wdt_resources,
+       .num_resources  = ARRAY_SIZE(imx_wdt_resources),
+};
+
+static struct resource imx_usb_resources[] = {
+       [0] = {
+               .start  = 0x00212000,
+               .end    = 0x00212148,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = USBD_INT0,
+               .end    = USBD_INT0,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [2] = {
+               .start  = USBD_INT1,
+               .end    = USBD_INT1,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [3] = {
+               .start  = USBD_INT2,
+               .end    = USBD_INT2,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [4] = {
+               .start  = USBD_INT3,
+               .end    = USBD_INT3,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [5] = {
+               .start  = USBD_INT4,
+               .end    = USBD_INT4,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [6] = {
+               .start  = USBD_INT5,
+               .end    = USBD_INT5,
+               .flags  = IORESOURCE_IRQ,
+       },
+       [7] = {
+               .start  = USBD_INT6,
+               .end    = USBD_INT6,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device imx_usb_device = {
+       .name           = "imx_udc",
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(imx_usb_resources),
+       .resource       = imx_usb_resources,
+};
+
 /* GPIO port description */
 static struct mxc_gpio_port imx_gpio_ports[] = {
        [0] = {
index 408485b0acfec70ca0bee2f94a21601a9e5911ec..0da5d7cce3a22991fda072072e532635dc487049 100644 (file)
@@ -1,2 +1,7 @@
+extern struct platform_device imx_csi_device;
+extern struct platform_device imx_i2c_device;
 extern struct platform_device imx_uart1_device;
 extern struct platform_device imx_uart2_device;
+extern struct platform_device imx_rtc_device;
+extern struct platform_device imx_wdt_device;
+extern struct platform_device imx_usb_device;