aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-w90x900/dev.c55
-rw-r--r--arch/arm/mach-w90x900/mach-nuc950evb.c44
-rw-r--r--arch/arm/mach-w90x900/nuc910.c1
-rw-r--r--arch/arm/mach-w90x900/nuc950.c2
4 files changed, 41 insertions, 61 deletions
diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c
index b2eda4dc1c34..73b3ecaf81c1 100644
--- a/arch/arm/mach-w90x900/dev.c
+++ b/arch/arm/mach-w90x900/dev.c
@@ -36,6 +36,7 @@
36#include <mach/nuc900_spi.h> 36#include <mach/nuc900_spi.h>
37#include <mach/map.h> 37#include <mach/map.h>
38#include <mach/fb.h> 38#include <mach/fb.h>
39#include <mach/regs-ldm.h>
39 40
40#include "cpu.h" 41#include "cpu.h"
41 42
@@ -382,7 +383,44 @@ struct platform_device nuc900_device_kpi = {
382 .resource = nuc900_kpi_resource, 383 .resource = nuc900_kpi_resource,
383}; 384};
384 385
385#ifdef CONFIG_FB_NUC900 386/* LCD controller*/
387
388static struct nuc900fb_display __initdata nuc900_lcd_info[] = {
389 /* Giantplus Technology GPM1040A0 320x240 Color TFT LCD */
390 [0] = {
391 .type = LCM_DCCS_VA_SRC_RGB565,
392 .width = 320,
393 .height = 240,
394 .xres = 320,
395 .yres = 240,
396 .bpp = 16,
397 .pixclock = 200000,
398 .left_margin = 34,
399 .right_margin = 54,
400 .hsync_len = 10,
401 .upper_margin = 18,
402 .lower_margin = 4,
403 .vsync_len = 1,
404 .dccs = 0x8e00041a,
405 .devctl = 0x060800c0,
406 .fbctrl = 0x00a000a0,
407 .scale = 0x04000400,
408 },
409};
410
411static struct nuc900fb_mach_info nuc900_fb_info __initdata = {
412#if defined(CONFIG_GPM1040A0_320X240)
413 .displays = &nuc900_lcd_info[0],
414#else
415 .displays = nuc900_lcd_info,
416#endif
417 .num_displays = ARRAY_SIZE(nuc900_lcd_info),
418 .default_display = 0,
419 .gpio_dir = 0x00000004,
420 .gpio_dir_mask = 0xFFFFFFFD,
421 .gpio_data = 0x00000004,
422 .gpio_data_mask = 0xFFFFFFFD,
423};
386 424
387static struct resource nuc900_lcd_resource[] = { 425static struct resource nuc900_lcd_resource[] = {
388 [0] = { 426 [0] = {
@@ -406,23 +444,10 @@ struct platform_device nuc900_device_lcd = {
406 .dev = { 444 .dev = {
407 .dma_mask = &nuc900_device_lcd_dmamask, 445 .dma_mask = &nuc900_device_lcd_dmamask,
408 .coherent_dma_mask = -1, 446 .coherent_dma_mask = -1,
447 .platform_data = &nuc900_fb_info,
409 } 448 }
410}; 449};
411 450
412void nuc900_fb_set_platdata(struct nuc900fb_mach_info *pd)
413{
414 struct nuc900fb_mach_info *npd;
415
416 npd = kmalloc(sizeof(*npd), GFP_KERNEL);
417 if (npd) {
418 memcpy(npd, pd, sizeof(*npd));
419 nuc900_device_lcd.dev.platform_data = npd;
420 } else {
421 printk(KERN_ERR "no memory for LCD platform data\n");
422 }
423}
424#endif
425
426/* AUDIO controller*/ 451/* AUDIO controller*/
427static u64 nuc900_device_audio_dmamask = -1; 452static u64 nuc900_device_audio_dmamask = -1;
428static struct resource nuc900_ac97_resource[] = { 453static struct resource nuc900_ac97_resource[] = {
diff --git a/arch/arm/mach-w90x900/mach-nuc950evb.c b/arch/arm/mach-w90x900/mach-nuc950evb.c
index b3edc3cccf52..04d295f89eb0 100644
--- a/arch/arm/mach-w90x900/mach-nuc950evb.c
+++ b/arch/arm/mach-w90x900/mach-nuc950evb.c
@@ -20,51 +20,10 @@
20#include <asm/mach/map.h> 20#include <asm/mach/map.h>
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>
22#include <mach/map.h> 22#include <mach/map.h>
23#include <mach/regs-ldm.h>
24#include <mach/fb.h> 23#include <mach/fb.h>
25 24
26#include "nuc950.h" 25#include "nuc950.h"
27 26
28#ifdef CONFIG_FB_NUC900
29/* LCD Controller */
30static struct nuc900fb_display __initdata nuc950_lcd_info[] = {
31 /* Giantplus Technology GPM1040A0 320x240 Color TFT LCD */
32 [0] = {
33 .type = LCM_DCCS_VA_SRC_RGB565,
34 .width = 320,
35 .height = 240,
36 .xres = 320,
37 .yres = 240,
38 .bpp = 16,
39 .pixclock = 200000,
40 .left_margin = 34,
41 .right_margin = 54,
42 .hsync_len = 10,
43 .upper_margin = 18,
44 .lower_margin = 4,
45 .vsync_len = 1,
46 .dccs = 0x8e00041a,
47 .devctl = 0x060800c0,
48 .fbctrl = 0x00a000a0,
49 .scale = 0x04000400,
50 },
51};
52
53static struct nuc900fb_mach_info nuc950_fb_info __initdata = {
54#if defined(CONFIG_GPM1040A0_320X240)
55 .displays = &nuc950_lcd_info[0],
56#else
57 .displays = nuc950_lcd_info,
58#endif
59 .num_displays = ARRAY_SIZE(nuc950_lcd_info),
60 .default_display = 0,
61 .gpio_dir = 0x00000004,
62 .gpio_dir_mask = 0xFFFFFFFD,
63 .gpio_data = 0x00000004,
64 .gpio_data_mask = 0xFFFFFFFD,
65};
66#endif
67
68static void __init nuc950evb_map_io(void) 27static void __init nuc950evb_map_io(void)
69{ 28{
70 nuc950_map_io(); 29 nuc950_map_io();
@@ -74,9 +33,6 @@ static void __init nuc950evb_map_io(void)
74static void __init nuc950evb_init(void) 33static void __init nuc950evb_init(void)
75{ 34{
76 nuc950_board_init(); 35 nuc950_board_init();
77#ifdef CONFIG_FB_NUC900
78 nuc900_fb_set_platdata(&nuc950_fb_info);
79#endif
80} 36}
81 37
82MACHINE_START(W90P950EVB, "W90P950EVB") 38MACHINE_START(W90P950EVB, "W90P950EVB")
diff --git a/arch/arm/mach-w90x900/nuc910.c b/arch/arm/mach-w90x900/nuc910.c
index 656f03b3b629..cd4977678b85 100644
--- a/arch/arm/mach-w90x900/nuc910.c
+++ b/arch/arm/mach-w90x900/nuc910.c
@@ -26,6 +26,7 @@
26static struct platform_device *nuc910_dev[] __initdata = { 26static struct platform_device *nuc910_dev[] __initdata = {
27 &nuc900_device_ts, 27 &nuc900_device_ts,
28 &nuc900_device_rtc, 28 &nuc900_device_rtc,
29 &nuc900_device_lcd,
29}; 30};
30 31
31/* define specific CPU platform io map */ 32/* define specific CPU platform io map */
diff --git a/arch/arm/mach-w90x900/nuc950.c b/arch/arm/mach-w90x900/nuc950.c
index 4d1f1ab044c4..5704f74a50ee 100644
--- a/arch/arm/mach-w90x900/nuc950.c
+++ b/arch/arm/mach-w90x900/nuc950.c
@@ -26,9 +26,7 @@
26static struct platform_device *nuc950_dev[] __initdata = { 26static struct platform_device *nuc950_dev[] __initdata = {
27 &nuc900_device_kpi, 27 &nuc900_device_kpi,
28 &nuc900_device_fmi, 28 &nuc900_device_fmi,
29#ifdef CONFIG_FB_NUC900
30 &nuc900_device_lcd, 29 &nuc900_device_lcd,
31#endif
32}; 30};
33 31
34/* define specific CPU platform io map */ 32/* define specific CPU platform io map */