aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-w90x900/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-w90x900/dev.c')
-rw-r--r--arch/arm/mach-w90x900/dev.c42
1 files changed, 42 insertions, 0 deletions
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 @@
34#include <mach/regs-serial.h> 34#include <mach/regs-serial.h>
35#include <mach/nuc900_spi.h> 35#include <mach/nuc900_spi.h>
36#include <mach/map.h> 36#include <mach/map.h>
37#include <mach/fb.h>
37 38
38#include "cpu.h" 39#include "cpu.h"
39 40
@@ -380,6 +381,47 @@ struct platform_device nuc900_device_kpi = {
380 .resource = nuc900_kpi_resource, 381 .resource = nuc900_kpi_resource,
381}; 382};
382 383
384#ifdef CONFIG_FB_NUC900
385
386static struct resource nuc900_lcd_resource[] = {
387 [0] = {
388 .start = W90X900_PA_LCD,
389 .end = W90X900_PA_LCD + W90X900_SZ_LCD - 1,
390 .flags = IORESOURCE_MEM,
391 },
392 [1] = {
393 .start = IRQ_LCD,
394 .end = IRQ_LCD,
395 .flags = IORESOURCE_IRQ,
396 }
397};
398
399static u64 nuc900_device_lcd_dmamask = -1;
400struct platform_device nuc900_device_lcd = {
401 .name = "nuc900-lcd",
402 .id = -1,
403 .num_resources = ARRAY_SIZE(nuc900_lcd_resource),
404 .resource = nuc900_lcd_resource,
405 .dev = {
406 .dma_mask = &nuc900_device_lcd_dmamask,
407 .coherent_dma_mask = -1,
408 }
409};
410
411void nuc900_fb_set_platdata(struct nuc900fb_mach_info *pd)
412{
413 struct nuc900fb_mach_info *npd;
414
415 npd = kmalloc(sizeof(*npd), GFP_KERNEL);
416 if (npd) {
417 memcpy(npd, pd, sizeof(*npd));
418 nuc900_device_lcd.dev.platform_data = npd;
419 } else {
420 printk(KERN_ERR "no memory for LCD platform data\n");
421 }
422}
423#endif
424
383/*Here should be your evb resourse,such as LCD*/ 425/*Here should be your evb resourse,such as LCD*/
384 426
385static struct platform_device *nuc900_public_dev[] __initdata = { 427static struct platform_device *nuc900_public_dev[] __initdata = {