Skip to content

Commit d161edf

Browse files
Linus WalleijRussell King
authored andcommitted
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>
1 parent ef6f4b1 commit d161edf

3 files changed

Lines changed: 58 additions & 0 deletions

File tree

‎arch/arm/mach-realview/realview_eb.c‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,26 @@ static struct platform_device pmu_device = {
331331
.resource = pmu_resources,
332332
};
333333

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+
334354
static void __init gic_init_irq(void)
335355
{
336356
if (core_tile_eb11mp() || core_tile_a9mp()) {
@@ -449,6 +469,7 @@ static void __init realview_eb_init(void)
449469

450470
realview_flash_register(&realview_eb_flash_resource, 1);
451471
platform_device_register(&realview_i2c_device);
472+
platform_device_register(&char_lcd_device);
452473
eth_device_register();
453474
realview_usb_register(realview_eb_isp1761_resources);
454475

‎arch/arm/mach-realview/realview_pb1176.c‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,26 @@ static struct platform_device pmu_device = {
281281
.resource = &pmu_resource,
282282
};
283283

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+
284304
static void __init gic_init_irq(void)
285305
{
286306
/* ARM1176 DevChip GIC, primary */
@@ -343,6 +363,7 @@ static void __init realview_pb1176_init(void)
343363
platform_device_register(&realview_i2c_device);
344364
realview_usb_register(realview_pb1176_isp1761_resources);
345365
platform_device_register(&pmu_device);
366+
platform_device_register(&char_lcd_device);
346367

347368
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
348369
struct amba_device *d = amba_devs[i];

‎arch/arm/mach-versatile/core.c‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,21 @@ static struct mmci_platform_data mmc0_plat_data = {
355355
.gpio_cd = -1,
356356
};
357357

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+
358373
/*
359374
* Clock handling
360375
*/
@@ -853,6 +868,7 @@ void __init versatile_init(void)
853868
platform_device_register(&versatile_flash_device);
854869
platform_device_register(&versatile_i2c_device);
855870
platform_device_register(&smc91x_device);
871+
platform_device_register(&char_lcd_device);
856872

857873
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
858874
struct amba_device *d = amba_devs[i];

0 commit comments

Comments
 (0)