diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-09-03 03:20:04 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-09-14 04:22:38 -0400 |
commit | 44432407d9f5e4b2e56c7eccb65d98cad4bba191 (patch) | |
tree | fdd88fc9bd5a1473e611e87958d2115b02631ac8 /arch/sh/boards/mach-se/7724/setup.c | |
parent | 01ac25b59f08c0bb56dd301f024eabd542205a42 (diff) |
fbdev: sh_mobile_lcdcfb: Support multiple video modes in platform data
This is a preparation for HDMI hotplug support. This patch just moves all
platform defined video modes for the sh_mobile_lcdcfb driver to separate
arrays and switches all users to use element 0 of that array, so, this patch
doesn't introduce any functional changes and as such should not cause any
regressions.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/mach-se/7724/setup.c')
-rw-r--r-- | arch/sh/boards/mach-se/7724/setup.c | 54 |
1 files changed, 34 insertions, 20 deletions
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 552ebd9ba82b..3099c36759ad 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c | |||
@@ -144,16 +144,42 @@ static struct platform_device nor_flash_device = { | |||
144 | }; | 144 | }; |
145 | 145 | ||
146 | /* LCDC */ | 146 | /* LCDC */ |
147 | const static struct fb_videomode lcdc_720p_modes[] = { | ||
148 | { | ||
149 | .name = "LB070WV1", | ||
150 | .sync = 0, /* hsync and vsync are active low */ | ||
151 | .xres = 1280; | ||
152 | .yres = 720; | ||
153 | .left_margin = 220; | ||
154 | .right_margin = 110; | ||
155 | .hsync_len = 40; | ||
156 | .upper_margin = 20; | ||
157 | .lower_margin = 5; | ||
158 | .vsync_len = 5; | ||
159 | }, | ||
160 | }; | ||
161 | |||
162 | const static struct fb_videomode lcdc_vga_modes[] = { | ||
163 | { | ||
164 | .name = "LB070WV1", | ||
165 | .sync = 0, /* hsync and vsync are active low */ | ||
166 | .xres = 640; | ||
167 | .yres = 480; | ||
168 | .left_margin = 105; | ||
169 | .right_margin = 50; | ||
170 | .hsync_len = 96; | ||
171 | .upper_margin = 33; | ||
172 | .lower_margin = 10; | ||
173 | .vsync_len = 2; | ||
174 | }, | ||
175 | }; | ||
176 | |||
147 | static struct sh_mobile_lcdc_info lcdc_info = { | 177 | static struct sh_mobile_lcdc_info lcdc_info = { |
148 | .clock_source = LCDC_CLK_EXTERNAL, | 178 | .clock_source = LCDC_CLK_EXTERNAL, |
149 | .ch[0] = { | 179 | .ch[0] = { |
150 | .chan = LCDC_CHAN_MAINLCD, | 180 | .chan = LCDC_CHAN_MAINLCD, |
151 | .bpp = 16, | 181 | .bpp = 16, |
152 | .clock_divider = 1, | 182 | .clock_divider = 1, |
153 | .lcd_cfg = { | ||
154 | .name = "LB070WV1", | ||
155 | .sync = 0, /* hsync and vsync are active low */ | ||
156 | }, | ||
157 | .lcd_size_cfg = { /* 7.0 inch */ | 183 | .lcd_size_cfg = { /* 7.0 inch */ |
158 | .width = 152, | 184 | .width = 152, |
159 | .height = 91, | 185 | .height = 91, |
@@ -909,24 +935,12 @@ static int __init devices_setup(void) | |||
909 | 935 | ||
910 | if (sw & SW41_B) { | 936 | if (sw & SW41_B) { |
911 | /* 720p */ | 937 | /* 720p */ |
912 | lcdc_info.ch[0].lcd_cfg.xres = 1280; | 938 | lcdc_info.ch[0].lcd_cfg = lcdc_720p_modes; |
913 | lcdc_info.ch[0].lcd_cfg.yres = 720; | 939 | lcdc_info.ch[0].num_cfg = ARRAY_SIZE(lcdc_720p_modes); |
914 | lcdc_info.ch[0].lcd_cfg.left_margin = 220; | ||
915 | lcdc_info.ch[0].lcd_cfg.right_margin = 110; | ||
916 | lcdc_info.ch[0].lcd_cfg.hsync_len = 40; | ||
917 | lcdc_info.ch[0].lcd_cfg.upper_margin = 20; | ||
918 | lcdc_info.ch[0].lcd_cfg.lower_margin = 5; | ||
919 | lcdc_info.ch[0].lcd_cfg.vsync_len = 5; | ||
920 | } else { | 940 | } else { |
921 | /* VGA */ | 941 | /* VGA */ |
922 | lcdc_info.ch[0].lcd_cfg.xres = 640; | 942 | lcdc_info.ch[0].lcd_cfg = lcdc_vga_modes; |
923 | lcdc_info.ch[0].lcd_cfg.yres = 480; | 943 | lcdc_info.ch[0].num_cfg = ARRAY_SIZE(lcdc_vga_modes); |
924 | lcdc_info.ch[0].lcd_cfg.left_margin = 105; | ||
925 | lcdc_info.ch[0].lcd_cfg.right_margin = 50; | ||
926 | lcdc_info.ch[0].lcd_cfg.hsync_len = 96; | ||
927 | lcdc_info.ch[0].lcd_cfg.upper_margin = 33; | ||
928 | lcdc_info.ch[0].lcd_cfg.lower_margin = 10; | ||
929 | lcdc_info.ch[0].lcd_cfg.vsync_len = 2; | ||
930 | } | 944 | } |
931 | 945 | ||
932 | if (sw & SW41_A) { | 946 | if (sw & SW41_A) { |