From 8661970875d7d27e4de233d357327fffdb4a5e3d Mon Sep 17 00:00:00 2001 From: Wang Qiang Date: Wed, 10 Mar 2010 15:21:47 -0800 Subject: NUC900 LCD Controller Driver An LCD controller driver for nuc900s. The Linux LOGO is just fine and the FB-Test application was ok, too. Signed-off-by: Wang Qiang Cc: Wang Zongshun Cc: Russell King Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/arm/mach-w90x900/dev.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'arch/arm/mach-w90x900/dev.c') diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c index ec711f4b4019..48876122df91 100644 --- a/arch/arm/mach-w90x900/dev.c +++ b/arch/arm/mach-w90x900/dev.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "cpu.h" @@ -380,6 +381,47 @@ struct platform_device nuc900_device_kpi = { .resource = nuc900_kpi_resource, }; +#ifdef CONFIG_FB_NUC900 + +static struct resource nuc900_lcd_resource[] = { + [0] = { + .start = W90X900_PA_LCD, + .end = W90X900_PA_LCD + W90X900_SZ_LCD - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_LCD, + .end = IRQ_LCD, + .flags = IORESOURCE_IRQ, + } +}; + +static u64 nuc900_device_lcd_dmamask = -1; +struct platform_device nuc900_device_lcd = { + .name = "nuc900-lcd", + .id = -1, + .num_resources = ARRAY_SIZE(nuc900_lcd_resource), + .resource = nuc900_lcd_resource, + .dev = { + .dma_mask = &nuc900_device_lcd_dmamask, + .coherent_dma_mask = -1, + } +}; + +void nuc900_fb_set_platdata(struct nuc900fb_mach_info *pd) +{ + struct nuc900fb_mach_info *npd; + + npd = kmalloc(sizeof(*npd), GFP_KERNEL); + if (npd) { + memcpy(npd, pd, sizeof(*npd)); + nuc900_device_lcd.dev.platform_data = npd; + } else { + printk(KERN_ERR "no memory for LCD platform data\n"); + } +} +#endif + /*Here should be your evb resourse,such as LCD*/ static struct platform_device *nuc900_public_dev[] __initdata = { -- cgit v1.2.3