diff options
author | Linus Walleij <linus.walleij@stericsson.com> | 2010-07-17 07:34:25 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-18 15:44:16 -0400 |
commit | d161edfbf20597752e315e60e31026393680485a (patch) | |
tree | 7b08379ff9d5631d4109b2cec7c24a4bcc06a155 /arch/arm | |
parent | ef6f4b129bbbade7d06b0a9307b605cc78ca4b3b (diff) |
ARM: 6215/2: add character LCD platform data for RealView and Versatile
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>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-realview/realview_eb.c | 21 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_pb1176.c | 21 | ||||
-rw-r--r-- | arch/arm/mach-versatile/core.c | 16 |
3 files changed, 58 insertions, 0 deletions
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index b4500753e102..991c1f8390e2 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -331,6 +331,26 @@ static struct platform_device pmu_device = { | |||
331 | .resource = pmu_resources, | 331 | .resource = pmu_resources, |
332 | }; | 332 | }; |
333 | 333 | ||
334 | static struct resource char_lcd_resources[] = { | ||
335 | { | ||
336 | .start = REALVIEW_CHAR_LCD_BASE, | ||
337 | .end = (REALVIEW_CHAR_LCD_BASE + SZ_4K - 1), | ||
338 | .flags = IORESOURCE_MEM, | ||
339 | }, | ||
340 | { | ||
341 | .start = IRQ_EB_CHARLCD, | ||
342 | .end = IRQ_EB_CHARLCD, | ||
343 | .flags = IORESOURCE_IRQ, | ||
344 | }, | ||
345 | }; | ||
346 | |||
347 | static struct platform_device char_lcd_device = { | ||
348 | .name = "arm-charlcd", | ||
349 | .id = -1, | ||
350 | .num_resources = ARRAY_SIZE(char_lcd_resources), | ||
351 | .resource = char_lcd_resources, | ||
352 | }; | ||
353 | |||
334 | static void __init gic_init_irq(void) | 354 | static void __init gic_init_irq(void) |
335 | { | 355 | { |
336 | if (core_tile_eb11mp() || core_tile_a9mp()) { | 356 | if (core_tile_eb11mp() || core_tile_a9mp()) { |
@@ -449,6 +469,7 @@ static void __init realview_eb_init(void) | |||
449 | 469 | ||
450 | realview_flash_register(&realview_eb_flash_resource, 1); | 470 | realview_flash_register(&realview_eb_flash_resource, 1); |
451 | platform_device_register(&realview_i2c_device); | 471 | platform_device_register(&realview_i2c_device); |
472 | platform_device_register(&char_lcd_device); | ||
452 | eth_device_register(); | 473 | eth_device_register(); |
453 | realview_usb_register(realview_eb_isp1761_resources); | 474 | realview_usb_register(realview_eb_isp1761_resources); |
454 | 475 | ||
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index 1766debe741c..d2be12eb829e 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -281,6 +281,26 @@ static struct platform_device pmu_device = { | |||
281 | .resource = &pmu_resource, | 281 | .resource = &pmu_resource, |
282 | }; | 282 | }; |
283 | 283 | ||
284 | static struct resource char_lcd_resources[] = { | ||
285 | { | ||
286 | .start = REALVIEW_CHAR_LCD_BASE, | ||
287 | .end = (REALVIEW_CHAR_LCD_BASE + SZ_4K - 1), | ||
288 | .flags = IORESOURCE_MEM, | ||
289 | }, | ||
290 | { | ||
291 | .start = IRQ_PB1176_CHARLCD, | ||
292 | .end = IRQ_PB1176_CHARLCD, | ||
293 | .flags = IORESOURCE_IRQ, | ||
294 | }, | ||
295 | }; | ||
296 | |||
297 | static struct platform_device char_lcd_device = { | ||
298 | .name = "arm-charlcd", | ||
299 | .id = -1, | ||
300 | .num_resources = ARRAY_SIZE(char_lcd_resources), | ||
301 | .resource = char_lcd_resources, | ||
302 | }; | ||
303 | |||
284 | static void __init gic_init_irq(void) | 304 | static void __init gic_init_irq(void) |
285 | { | 305 | { |
286 | /* ARM1176 DevChip GIC, primary */ | 306 | /* ARM1176 DevChip GIC, primary */ |
@@ -343,6 +363,7 @@ static void __init realview_pb1176_init(void) | |||
343 | platform_device_register(&realview_i2c_device); | 363 | platform_device_register(&realview_i2c_device); |
344 | realview_usb_register(realview_pb1176_isp1761_resources); | 364 | realview_usb_register(realview_pb1176_isp1761_resources); |
345 | platform_device_register(&pmu_device); | 365 | platform_device_register(&pmu_device); |
366 | platform_device_register(&char_lcd_device); | ||
346 | 367 | ||
347 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 368 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { |
348 | struct amba_device *d = amba_devs[i]; | 369 | struct amba_device *d = amba_devs[i]; |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index f3a0e073e9ae..6ccd2618a97b 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -355,6 +355,21 @@ static struct mmci_platform_data mmc0_plat_data = { | |||
355 | .gpio_cd = -1, | 355 | .gpio_cd = -1, |
356 | }; | 356 | }; |
357 | 357 | ||
358 | static struct resource char_lcd_resources[] = { | ||
359 | { | ||
360 | .start = VERSATILE_CHAR_LCD_BASE, | ||
361 | .end = (VERSATILE_CHAR_LCD_BASE + SZ_4K - 1), | ||
362 | .flags = IORESOURCE_MEM, | ||
363 | }, | ||
364 | }; | ||
365 | |||
366 | static struct platform_device char_lcd_device = { | ||
367 | .name = "arm-charlcd", | ||
368 | .id = -1, | ||
369 | .num_resources = ARRAY_SIZE(char_lcd_resources), | ||
370 | .resource = char_lcd_resources, | ||
371 | }; | ||
372 | |||
358 | /* | 373 | /* |
359 | * Clock handling | 374 | * Clock handling |
360 | */ | 375 | */ |
@@ -853,6 +868,7 @@ void __init versatile_init(void) | |||
853 | platform_device_register(&versatile_flash_device); | 868 | platform_device_register(&versatile_flash_device); |
854 | platform_device_register(&versatile_i2c_device); | 869 | platform_device_register(&versatile_i2c_device); |
855 | platform_device_register(&smc91x_device); | 870 | platform_device_register(&smc91x_device); |
871 | platform_device_register(&char_lcd_device); | ||
856 | 872 | ||
857 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 873 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { |
858 | struct amba_device *d = amba_devs[i]; | 874 | struct amba_device *d = amba_devs[i]; |