diff options
author | Ian Molton <spyro@f2s.com> | 2008-08-19 08:01:28 -0400 |
---|---|---|
committer | Ian Molton <spyro@f2s.com> | 2008-08-19 08:44:07 -0400 |
commit | 0ec3cf69304d2e35ad29da3aa9ab43c3dd97677c (patch) | |
tree | 5c4cfa67f4f015da30aa7a49071c74f314c0c8d6 /arch/arm/mach-pxa/e740.c | |
parent | 7dc964148c2850e5df84fc17807ba48edb628c88 (diff) |
[ARM] eseries: move LCD defs into machine files
This patch removes the seperate files used for the LCD definitions on
e-series and places the definitions into the machine specific files.
Signed-off-by: Ian Molton <spyro@f2s.com>
Diffstat (limited to 'arch/arm/mach-pxa/e740.c')
-rw-r--r-- | arch/arm/mach-pxa/e740.c | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/e740.c b/arch/arm/mach-pxa/e740.c index 560a8a2ebff0..ef0c3c80e791 100644 --- a/arch/arm/mach-pxa/e740.c +++ b/arch/arm/mach-pxa/e740.c | |||
@@ -12,6 +12,11 @@ | |||
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/device.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/fb.h> | ||
18 | |||
19 | #include <video/w100fb.h> | ||
15 | 20 | ||
16 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
17 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
@@ -23,6 +28,80 @@ | |||
23 | #include "generic.h" | 28 | #include "generic.h" |
24 | #include "eseries.h" | 29 | #include "eseries.h" |
25 | 30 | ||
31 | |||
32 | /* ------------------------ e740 video support --------------------------- */ | ||
33 | |||
34 | static struct w100_gen_regs e740_lcd_regs = { | ||
35 | .lcd_format = 0x00008023, | ||
36 | .lcdd_cntl1 = 0x0f000000, | ||
37 | .lcdd_cntl2 = 0x0003ffff, | ||
38 | .genlcd_cntl1 = 0x00ffff03, | ||
39 | .genlcd_cntl2 = 0x003c0f03, | ||
40 | .genlcd_cntl3 = 0x000143aa, | ||
41 | }; | ||
42 | |||
43 | static struct w100_mode e740_lcd_mode = { | ||
44 | .xres = 240, | ||
45 | .yres = 320, | ||
46 | .left_margin = 20, | ||
47 | .right_margin = 28, | ||
48 | .upper_margin = 9, | ||
49 | .lower_margin = 8, | ||
50 | .crtc_ss = 0x80140013, | ||
51 | .crtc_ls = 0x81150110, | ||
52 | .crtc_gs = 0x80050005, | ||
53 | .crtc_vpos_gs = 0x000a0009, | ||
54 | .crtc_rev = 0x0040010a, | ||
55 | .crtc_dclk = 0xa906000a, | ||
56 | .crtc_gclk = 0x80050108, | ||
57 | .crtc_goe = 0x80050108, | ||
58 | .pll_freq = 57, | ||
59 | .pixclk_divider = 4, | ||
60 | .pixclk_divider_rotated = 4, | ||
61 | .pixclk_src = CLK_SRC_XTAL, | ||
62 | .sysclk_divider = 1, | ||
63 | .sysclk_src = CLK_SRC_PLL, | ||
64 | .crtc_ps1_active = 0x41060010, | ||
65 | }; | ||
66 | |||
67 | static struct w100_gpio_regs e740_w100_gpio_info = { | ||
68 | .init_data1 = 0x21002103, | ||
69 | .gpio_dir1 = 0xffffdeff, | ||
70 | .gpio_oe1 = 0x03c00643, | ||
71 | .init_data2 = 0x003f003f, | ||
72 | .gpio_dir2 = 0xffffffff, | ||
73 | .gpio_oe2 = 0x000000ff, | ||
74 | }; | ||
75 | |||
76 | static struct w100fb_mach_info e740_fb_info = { | ||
77 | .modelist = &e740_lcd_mode, | ||
78 | .num_modes = 1, | ||
79 | .regs = &e740_lcd_regs, | ||
80 | .gpio = &e740_w100_gpio_info, | ||
81 | .xtal_freq = 14318000, | ||
82 | .xtal_dbl = 1, | ||
83 | }; | ||
84 | |||
85 | static struct resource e740_fb_resources[] = { | ||
86 | [0] = { | ||
87 | .start = 0x0c000000, | ||
88 | .end = 0x0cffffff, | ||
89 | .flags = IORESOURCE_MEM, | ||
90 | }, | ||
91 | }; | ||
92 | |||
93 | static struct platform_device e740_fb_device = { | ||
94 | .name = "w100fb", | ||
95 | .id = -1, | ||
96 | .dev = { | ||
97 | .platform_data = &e740_fb_info, | ||
98 | }, | ||
99 | .num_resources = ARRAY_SIZE(e740_fb_resources), | ||
100 | .resource = e740_fb_resources, | ||
101 | }; | ||
102 | |||
103 | /* --------------------------- MFP Pin config -------------------------- */ | ||
104 | |||
26 | static unsigned long e740_pin_config[] __initdata = { | 105 | static unsigned long e740_pin_config[] __initdata = { |
27 | /* Chip selects */ | 106 | /* Chip selects */ |
28 | GPIO15_nCS_1, /* CS1 - Flash */ | 107 | GPIO15_nCS_1, /* CS1 - Flash */ |
@@ -62,9 +141,16 @@ static unsigned long e740_pin_config[] __initdata = { | |||
62 | GPIO0_GPIO | WAKEUP_ON_EDGE_RISE, | 141 | GPIO0_GPIO | WAKEUP_ON_EDGE_RISE, |
63 | }; | 142 | }; |
64 | 143 | ||
144 | /* ----------------------------------------------------------------------- */ | ||
145 | |||
146 | static struct platform_device *devices[] __initdata = { | ||
147 | &e740_fb_device, | ||
148 | }; | ||
149 | |||
65 | static void __init e740_init(void) | 150 | static void __init e740_init(void) |
66 | { | 151 | { |
67 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config)); | 152 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config)); |
153 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
68 | } | 154 | } |
69 | 155 | ||
70 | MACHINE_START(E740, "Toshiba e740") | 156 | MACHINE_START(E740, "Toshiba e740") |