aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2005-10-28 10:31:47 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-10-28 10:31:47 -0400
commit57718976141c2929bddd6219efb32c2abea8360c (patch)
tree80204c47b9ac6e23eeefc1305cd729a930216cc5 /arch/arm
parent58c8d570f30d65836b53903fbdf355707a19aa52 (diff)
[ARM] 3047/1: SMDK2440 - add framebuffer platform data
Patch from Ben Dooks Add platform data for framebuffer for the onboard LCD module Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-s3c2410/mach-smdk2440.c70
1 files changed, 70 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2410/mach-smdk2440.c b/arch/arm/mach-s3c2410/mach-smdk2440.c
index 722ef46b630a..6950e61b7914 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2440.c
+++ b/arch/arm/mach-s3c2410/mach-smdk2440.c
@@ -19,6 +19,7 @@
19 * 10-Mar-2005 LCVR Replaced S3C2410_VA by S3C24XX_VA 19 * 10-Mar-2005 LCVR Replaced S3C2410_VA by S3C24XX_VA
20 * 14-Mar-2005 BJD void __iomem fixes 20 * 14-Mar-2005 BJD void __iomem fixes
21 * 20-Sep-2005 BJD Added static to non-exported items 21 * 20-Sep-2005 BJD Added static to non-exported items
22 * 26-Oct-2005 BJD Added framebuffer data
22*/ 23*/
23 24
24#include <linux/kernel.h> 25#include <linux/kernel.h>
@@ -41,7 +42,10 @@
41//#include <asm/debug-ll.h> 42//#include <asm/debug-ll.h>
42#include <asm/arch/regs-serial.h> 43#include <asm/arch/regs-serial.h>
43#include <asm/arch/regs-gpio.h> 44#include <asm/arch/regs-gpio.h>
45#include <asm/arch/regs-lcd.h>
46
44#include <asm/arch/idle.h> 47#include <asm/arch/idle.h>
48#include <asm/arch/fb.h>
45 49
46#include "s3c2410.h" 50#include "s3c2410.h"
47#include "s3c2440.h" 51#include "s3c2440.h"
@@ -86,6 +90,70 @@ static struct s3c2410_uartcfg smdk2440_uartcfgs[] = {
86 } 90 }
87}; 91};
88 92
93/* LCD driver info */
94
95static struct s3c2410fb_mach_info smdk2440_lcd_cfg __initdata = {
96 .regs = {
97
98 .lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
99 S3C2410_LCDCON1_TFT |
100 S3C2410_LCDCON1_CLKVAL(0x04),
101
102 .lcdcon2 = S3C2410_LCDCON2_VBPD(7) |
103 S3C2410_LCDCON2_LINEVAL(319) |
104 S3C2410_LCDCON2_VFPD(6) |
105 S3C2410_LCDCON2_VSPW(3),
106
107 .lcdcon3 = S3C2410_LCDCON3_HBPD(19) |
108 S3C2410_LCDCON3_HOZVAL(239) |
109 S3C2410_LCDCON3_HFPD(7),
110
111 .lcdcon4 = S3C2410_LCDCON4_MVAL(0) |
112 S3C2410_LCDCON4_HSPW(3),
113
114 .lcdcon5 = S3C2410_LCDCON5_FRM565 |
115 S3C2410_LCDCON5_INVVLINE |
116 S3C2410_LCDCON5_INVVFRAME |
117 S3C2410_LCDCON5_PWREN |
118 S3C2410_LCDCON5_HWSWP,
119 },
120
121#if 0
122 /* currently setup by downloader */
123 .gpccon = 0xaa940659,
124 .gpccon_mask = 0xffffffff,
125 .gpcup = 0x0000ffff,
126 .gpcup_mask = 0xffffffff,
127 .gpdcon = 0xaa84aaa0,
128 .gpdcon_mask = 0xffffffff,
129 .gpdup = 0x0000faff,
130 .gpdup_mask = 0xffffffff,
131#endif
132
133 .lpcsel = ((0xCE6) & ~7) | 1<<4,
134
135 .width = 240,
136 .height = 320,
137
138 .xres = {
139 .min = 240,
140 .max = 240,
141 .defval = 240,
142 },
143
144 .yres = {
145 .min = 320,
146 .max = 320,
147 .defval = 320,
148 },
149
150 .bpp = {
151 .min = 16,
152 .max = 16,
153 .defval = 16,
154 },
155};
156
89static struct platform_device *smdk2440_devices[] __initdata = { 157static struct platform_device *smdk2440_devices[] __initdata = {
90 &s3c_device_usb, 158 &s3c_device_usb,
91 &s3c_device_lcd, 159 &s3c_device_lcd,
@@ -121,6 +189,8 @@ static void __init smdk2440_machine_init(void)
121 s3c2410_gpio_setpin(S3C2410_GPF6, 0); 189 s3c2410_gpio_setpin(S3C2410_GPF6, 0);
122 s3c2410_gpio_setpin(S3C2410_GPF7, 0); 190 s3c2410_gpio_setpin(S3C2410_GPF7, 0);
123 191
192 s3c24xx_fb_set_platdata(&smdk2440_lcd_cfg);
193
124 s3c2410_pm_init(); 194 s3c2410_pm_init();
125} 195}
126 196