]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ARM: 6215/2: add character LCD platform data for RealView and Versatile
authorLinus Walleij <linus.walleij@stericsson.com>
Sat, 17 Jul 2010 11:34:25 +0000 (12:34 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 18 Jul 2010 19:44:16 +0000 (20:44 +0100)
This adds some platform data for the character LCD found in the
RealView and Versatile reference designs from ARM.

Signed-off-by: Linus Walleij <triad@df.lth.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-realview/realview_eb.c
arch/arm/mach-realview/realview_pb1176.c
arch/arm/mach-versatile/core.c

index b4500753e102d2df1c163e170fbe28bcc3c86cfc..991c1f8390e2a8eccfbbfae39ccab3768a7badbe 100644 (file)
@@ -331,6 +331,26 @@ static struct platform_device pmu_device = {
        .resource               = pmu_resources,
 };
 
+static struct resource char_lcd_resources[] = {
+       {
+               .start = REALVIEW_CHAR_LCD_BASE,
+               .end   = (REALVIEW_CHAR_LCD_BASE + SZ_4K - 1),
+               .flags = IORESOURCE_MEM,
+       },
+       {
+               .start  = IRQ_EB_CHARLCD,
+               .end    = IRQ_EB_CHARLCD,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device char_lcd_device = {
+       .name           =       "arm-charlcd",
+       .id             =       -1,
+       .num_resources  =       ARRAY_SIZE(char_lcd_resources),
+       .resource       =       char_lcd_resources,
+};
+
 static void __init gic_init_irq(void)
 {
        if (core_tile_eb11mp() || core_tile_a9mp()) {
@@ -449,6 +469,7 @@ static void __init realview_eb_init(void)
 
        realview_flash_register(&realview_eb_flash_resource, 1);
        platform_device_register(&realview_i2c_device);
+       platform_device_register(&char_lcd_device);
        eth_device_register();
        realview_usb_register(realview_eb_isp1761_resources);
 
index 1766debe741cf98d7460fac959fe9e3921ed0b02..d2be12eb829eb3b759be8a37bc8020df9f01d253 100644 (file)
@@ -281,6 +281,26 @@ static struct platform_device pmu_device = {
        .resource               = &pmu_resource,
 };
 
+static struct resource char_lcd_resources[] = {
+       {
+               .start = REALVIEW_CHAR_LCD_BASE,
+               .end   = (REALVIEW_CHAR_LCD_BASE + SZ_4K - 1),
+               .flags = IORESOURCE_MEM,
+       },
+       {
+               .start  = IRQ_PB1176_CHARLCD,
+               .end    = IRQ_PB1176_CHARLCD,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device char_lcd_device = {
+       .name           =       "arm-charlcd",
+       .id             =       -1,
+       .num_resources  =       ARRAY_SIZE(char_lcd_resources),
+       .resource       =       char_lcd_resources,
+};
+
 static void __init gic_init_irq(void)
 {
        /* ARM1176 DevChip GIC, primary */
@@ -343,6 +363,7 @@ static void __init realview_pb1176_init(void)
        platform_device_register(&realview_i2c_device);
        realview_usb_register(realview_pb1176_isp1761_resources);
        platform_device_register(&pmu_device);
+       platform_device_register(&char_lcd_device);
 
        for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
                struct amba_device *d = amba_devs[i];
index f3a0e073e9aeb991096ba6067e3c41d89b4903d2..6ccd2618a97b7b66c82ccb92825b793142138cc6 100644 (file)
@@ -355,6 +355,21 @@ static struct mmci_platform_data mmc0_plat_data = {
        .gpio_cd        = -1,
 };
 
+static struct resource char_lcd_resources[] = {
+       {
+               .start = VERSATILE_CHAR_LCD_BASE,
+               .end   = (VERSATILE_CHAR_LCD_BASE + SZ_4K - 1),
+               .flags = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device char_lcd_device = {
+       .name           =       "arm-charlcd",
+       .id             =       -1,
+       .num_resources  =       ARRAY_SIZE(char_lcd_resources),
+       .resource       =       char_lcd_resources,
+};
+
 /*
  * Clock handling
  */
@@ -853,6 +868,7 @@ void __init versatile_init(void)
        platform_device_register(&versatile_flash_device);
        platform_device_register(&versatile_i2c_device);
        platform_device_register(&smc91x_device);
+       platform_device_register(&char_lcd_device);
 
        for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
                struct amba_device *d = amba_devs[i];