]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
omap2 device file update to support HDQ/1-wire for OMAP2430/3430
authorMadhusudhan Chikkature Rajashekar <madhu.cr@ti.com>
Tue, 18 Dec 2007 09:33:49 +0000 (15:03 +0530)
committerTony Lindgren <tony@atomide.com>
Thu, 24 Jan 2008 22:38:28 +0000 (14:38 -0800)
This patch adds HDQ base address defines and registers hdq as platform device.

Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/devices.c

index 0a0703a9497b2127ae7f7c79fedf044361ef8547..87de30d194b0ba02d090de1bf99f2a92c847355f 100644 (file)
@@ -249,6 +249,38 @@ static void omap_init_sha1_md5(void)
 static inline void omap_init_sha1_md5(void) { }
 #endif
 
+#if defined(CONFIG_HDQ_MASTER_OMAP) || defined(CONFIG_HDQ_MASTER_OMAP_MODULE)
+#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3430)
+#define OMAP_HDQ_BASE  0x480B2000
+#endif
+static struct resource omap_hdq_resources[] = {
+       {
+               .start          = OMAP_HDQ_BASE,
+               .end            = OMAP_HDQ_BASE + 0x1C,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = INT_24XX_HDQ_IRQ,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+static struct platform_device omap_hdq_dev = {
+       .name = "omap_hdq",
+       .id = 0,
+       .dev = {
+               .platform_data = NULL,
+       },
+       .num_resources  = ARRAY_SIZE(omap_hdq_resources),
+       .resource       = omap_hdq_resources,
+};
+static inline void omap_hdq_init(void)
+{
+       (void) platform_device_register(&omap_hdq_dev);
+}
+#else
+static inline void omap_hdq_init(void) {}
+#endif
+
 /*-------------------------------------------------------------------------*/
 
 static int __init omap2_init_devices(void)
@@ -259,6 +291,7 @@ static int __init omap2_init_devices(void)
        omap_init_camera();
        omap_init_mbox();
        omap_init_mcspi();
+       omap_hdq_init();
        omap_init_sti();
        omap_init_sha1_md5();