aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2440
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2007-10-16 04:28:56 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:16 -0400
commit09fe75f6f934597f765748342ca6fb378ee7ecdb (patch)
tree55a3ab7bf52400be136ec533cd5ebda4336fcd07 /arch/arm/mach-s3c2440
parent110c1fa75463c4f327e9fc491e9a27e938800d96 (diff)
s3c2410fb: multi-display support
This patch adds a new structure to describe and handle more than one panel (display mode) for the s3c2410 framebuffer. This structure is added after the pxafb driver. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm/mach-s3c2440')
-rw-r--r--arch/arm/mach-s3c2440/mach-rx3715.c38
-rw-r--r--arch/arm/mach-s3c2440/mach-smdk2440.c41
2 files changed, 33 insertions, 46 deletions
diff --git a/arch/arm/mach-s3c2440/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c
index b59e6d39f2f2..c83078878497 100644
--- a/arch/arm/mach-s3c2440/mach-rx3715.c
+++ b/arch/arm/mach-s3c2440/mach-rx3715.c
@@ -110,7 +110,7 @@ static struct s3c2410_uartcfg rx3715_uartcfgs[] = {
110 110
111/* framebuffer lcd controller information */ 111/* framebuffer lcd controller information */
112 112
113static struct s3c2410fb_mach_info rx3715_lcdcfg __initdata = { 113static struct s3c2410fb_display rx3715_lcdcfg __initdata = {
114 .regs = { 114 .regs = {
115 .lcdcon1 = S3C2410_LCDCON1_TFT16BPP | \ 115 .lcdcon1 = S3C2410_LCDCON1_TFT16BPP | \
116 S3C2410_LCDCON1_TFT | \ 116 S3C2410_LCDCON1_TFT | \
@@ -133,6 +133,20 @@ static struct s3c2410fb_mach_info rx3715_lcdcfg __initdata = {
133 S3C2410_LCDCON5_HWSWP, 133 S3C2410_LCDCON5_HWSWP,
134 }, 134 },
135 135
136 .width = 240,
137 .height = 320,
138
139 .xres = 240,
140 .yres = 320,
141 .bpp = 16,
142};
143
144static struct s3c2410fb_mach_info rx3715_fb_info __initdata = {
145
146 .displays = &rx3715_lcdcfg,
147 .num_displays = 1,
148 .default_display = 0,
149
136 .lpcsel = 0xf82, 150 .lpcsel = 0xf82,
137 151
138 .gpccon = 0xaa955699, 152 .gpccon = 0xaa955699,
@@ -146,26 +160,6 @@ static struct s3c2410fb_mach_info rx3715_lcdcfg __initdata = {
146 .gpdup_mask = 0xffffffff, 160 .gpdup_mask = 0xffffffff,
147 161
148 .fixed_syncs = 1, 162 .fixed_syncs = 1,
149 .width = 240,
150 .height = 320,
151
152 .xres = {
153 .min = 240,
154 .max = 240,
155 .defval = 240,
156 },
157
158 .yres = {
159 .max = 320,
160 .min = 320,
161 .defval = 320,
162 },
163
164 .bpp = {
165 .min = 16,
166 .max = 16,
167 .defval = 16,
168 },
169}; 163};
170 164
171static struct mtd_partition rx3715_nand_part[] = { 165static struct mtd_partition rx3715_nand_part[] = {
@@ -224,7 +218,7 @@ static void __init rx3715_init_machine(void)
224#endif 218#endif
225 s3c2410_pm_init(); 219 s3c2410_pm_init();
226 220
227 s3c24xx_fb_set_platdata(&rx3715_lcdcfg); 221 s3c24xx_fb_set_platdata(&rx3715_fb_info);
228 platform_add_devices(rx3715_devices, ARRAY_SIZE(rx3715_devices)); 222 platform_add_devices(rx3715_devices, ARRAY_SIZE(rx3715_devices));
229} 223}
230 224
diff --git a/arch/arm/mach-s3c2440/mach-smdk2440.c b/arch/arm/mach-s3c2440/mach-smdk2440.c
index 670115b8a12e..f7dac7d54064 100644
--- a/arch/arm/mach-s3c2440/mach-smdk2440.c
+++ b/arch/arm/mach-s3c2440/mach-smdk2440.c
@@ -103,7 +103,7 @@ static struct s3c2410_uartcfg smdk2440_uartcfgs[] __initdata = {
103 103
104/* LCD driver info */ 104/* LCD driver info */
105 105
106static struct s3c2410fb_mach_info smdk2440_lcd_cfg __initdata = { 106static struct s3c2410fb_display smdk2440_lcd_cfg __initdata = {
107 .regs = { 107 .regs = {
108 108
109 .lcdcon1 = S3C2410_LCDCON1_TFT16BPP | 109 .lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
@@ -129,6 +129,21 @@ static struct s3c2410fb_mach_info smdk2440_lcd_cfg __initdata = {
129 S3C2410_LCDCON5_HWSWP, 129 S3C2410_LCDCON5_HWSWP,
130 }, 130 },
131 131
132 .type = S3C2410_LCDCON1_TFT16BPP,
133
134 .width = 240,
135 .height = 320,
136
137 .xres = 240,
138 .yres = 320,
139 .bpp = 16,
140};
141
142static struct s3c2410fb_mach_info smdk2440_fb_info __initdata = {
143 .displays = &smdk2440_lcd_cfg,
144 .num_displays = 1,
145 .default_display = 0,
146
132#if 0 147#if 0
133 /* currently setup by downloader */ 148 /* currently setup by downloader */
134 .gpccon = 0xaa940659, 149 .gpccon = 0xaa940659,
@@ -142,28 +157,6 @@ static struct s3c2410fb_mach_info smdk2440_lcd_cfg __initdata = {
142#endif 157#endif
143 158
144 .lpcsel = ((0xCE6) & ~7) | 1<<4, 159 .lpcsel = ((0xCE6) & ~7) | 1<<4,
145 .type = S3C2410_LCDCON1_TFT16BPP,
146
147 .width = 240,
148 .height = 320,
149
150 .xres = {
151 .min = 240,
152 .max = 240,
153 .defval = 240,
154 },
155
156 .yres = {
157 .min = 320,
158 .max = 320,
159 .defval = 320,
160 },
161
162 .bpp = {
163 .min = 16,
164 .max = 16,
165 .defval = 16,
166 },
167}; 160};
168 161
169static struct platform_device *smdk2440_devices[] __initdata = { 162static struct platform_device *smdk2440_devices[] __initdata = {
@@ -183,7 +176,7 @@ static void __init smdk2440_map_io(void)
183 176
184static void __init smdk2440_machine_init(void) 177static void __init smdk2440_machine_init(void)
185{ 178{
186 s3c24xx_fb_set_platdata(&smdk2440_lcd_cfg); 179 s3c24xx_fb_set_platdata(&smdk2440_fb_info);
187 180
188 platform_add_devices(smdk2440_devices, ARRAY_SIZE(smdk2440_devices)); 181 platform_add_devices(smdk2440_devices, ARRAY_SIZE(smdk2440_devices));
189 smdk_machine_init(); 182 smdk_machine_init();