diff options
author | James Morris <jmorris@namei.org> | 2010-03-31 08:39:27 +1100 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-03-31 08:39:27 +1100 |
commit | d25d6fa1a95f465ff1ec4458ca15e30b2c8dffec (patch) | |
tree | 7362b182dedd825fc762ef7706830837e42943af /arch/arm/mach-w90x900/dev.c | |
parent | 225a9be24d799aa16d543c31fb09f0c9ed1d9caa (diff) | |
parent | 2eaa9cfdf33b8d7fb7aff27792192e0019ae8fc6 (diff) |
Merge branch 'master' into next
Diffstat (limited to 'arch/arm/mach-w90x900/dev.c')
-rw-r--r-- | arch/arm/mach-w90x900/dev.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c index ec711f4b401..48876122df9 100644 --- a/arch/arm/mach-w90x900/dev.c +++ b/arch/arm/mach-w90x900/dev.c @@ -34,6 +34,7 @@ #include <mach/regs-serial.h> #include <mach/nuc900_spi.h> #include <mach/map.h> +#include <mach/fb.h> #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 = { |