aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaud Patard <arnaud.patard@rtp-net.org>2005-09-09 16:10:10 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 17:03:42 -0400
commitf92273c1653feadc8231c0bc4fa37fd4dc1c180f (patch)
tree5c7af93d72b944d07d5898da54724e609fcebf2b
parent20fd5767689124a920c1deb9c380304e082f026c (diff)
[PATCH] s3c2410fb: Platform support for ARM S3C2410 framebuffer driver
This patch add the plateform specific stuff needed to configure and use the driver. Signed-Off-By: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Antonino Daplas <adaplas@pol.net> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Ben Dooks <ben@trinity.fluff.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/arm/mach-s3c2410/devs.c11
-rw-r--r--arch/arm/mach-s3c2410/mach-h1940.c51
2 files changed, 61 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c
index 4664bd11adc1..0077937a7ab8 100644
--- a/arch/arm/mach-s3c2410/devs.c
+++ b/arch/arm/mach-s3c2410/devs.c
@@ -29,7 +29,7 @@
29#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
30#include <asm/mach/map.h> 30#include <asm/mach/map.h>
31#include <asm/mach/irq.h> 31#include <asm/mach/irq.h>
32 32#include <asm/arch/fb.h>
33#include <asm/hardware.h> 33#include <asm/hardware.h>
34#include <asm/io.h> 34#include <asm/io.h>
35#include <asm/irq.h> 35#include <asm/irq.h>
@@ -103,6 +103,15 @@ struct platform_device s3c_device_lcd = {
103 103
104EXPORT_SYMBOL(s3c_device_lcd); 104EXPORT_SYMBOL(s3c_device_lcd);
105 105
106static struct s3c2410fb_mach_info s3c2410fb_info;
107
108void __init set_s3c2410fb_info(struct s3c2410fb_mach_info *hard_s3c2410fb_info)
109{
110 memcpy(&s3c2410fb_info,hard_s3c2410fb_info,sizeof(struct s3c2410fb_mach_info));
111 s3c_device_lcd.dev.platform_data = &s3c2410fb_info;
112}
113EXPORT_SYMBOL(set_s3c2410fb_info);
114
106/* NAND Controller */ 115/* NAND Controller */
107 116
108static struct resource s3c_nand_resource[] = { 117static struct resource s3c_nand_resource[] = {
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index ea4fb1a97a50..6ff1889fbd21 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -45,6 +45,9 @@
45 45
46//#include <asm/debug-ll.h> 46//#include <asm/debug-ll.h>
47#include <asm/arch/regs-serial.h> 47#include <asm/arch/regs-serial.h>
48#include <asm/arch/regs-lcd.h>
49
50#include <asm/arch/fb.h>
48 51
49#include <linux/serial_core.h> 52#include <linux/serial_core.h>
50 53
@@ -88,6 +91,48 @@ static struct s3c2410_uartcfg h1940_uartcfgs[] = {
88 91
89 92
90 93
94/**
95 * Set lcd on or off
96 **/
97static struct s3c2410fb_mach_info h1940_lcdcfg __initdata = {
98 .fixed_syncs= 1,
99 .regs={
100 .lcdcon1= S3C2410_LCDCON1_TFT16BPP | \
101 S3C2410_LCDCON1_TFT | \
102 S3C2410_LCDCON1_CLKVAL(0x0C),
103
104 .lcdcon2= S3C2410_LCDCON2_VBPD(7) | \
105 S3C2410_LCDCON2_LINEVAL(319) | \
106 S3C2410_LCDCON2_VFPD(6) | \
107 S3C2410_LCDCON2_VSPW(0),
108
109 .lcdcon3= S3C2410_LCDCON3_HBPD(19) | \
110 S3C2410_LCDCON3_HOZVAL(239) | \
111 S3C2410_LCDCON3_HFPD(7),
112
113 .lcdcon4= S3C2410_LCDCON4_MVAL(0) | \
114 S3C2410_LCDCON4_HSPW(3),
115
116 .lcdcon5= S3C2410_LCDCON5_FRM565 | \
117 S3C2410_LCDCON5_INVVLINE | \
118 S3C2410_LCDCON5_HWSWP,
119 },
120 .lpcsel= 0x02,
121 .gpccon= 0xaa940659,
122 .gpccon_mask= 0xffffffff,
123 .gpcup= 0x0000ffff,
124 .gpcup_mask= 0xffffffff,
125 .gpdcon= 0xaa84aaa0,
126 .gpdcon_mask= 0xffffffff,
127 .gpdup= 0x0000faff,
128 .gpdup_mask= 0xffffffff,
129
130 .width= 240,
131 .height= 320,
132 .xres= {240,240,240},
133 .yres= {320,320,320},
134 .bpp= {16,16,16},
135};
91 136
92static struct platform_device *h1940_devices[] __initdata = { 137static struct platform_device *h1940_devices[] __initdata = {
93 &s3c_device_usb, 138 &s3c_device_usb,
@@ -116,6 +161,11 @@ void __init h1940_init_irq(void)
116 161
117} 162}
118 163
164void __init h1940_init(void)
165{
166 set_s3c2410fb_info(&h1940_lcdcfg);
167}
168
119MACHINE_START(H1940, "IPAQ-H1940") 169MACHINE_START(H1940, "IPAQ-H1940")
120 /* Maintainer: Ben Dooks <ben@fluff.org> */ 170 /* Maintainer: Ben Dooks <ben@fluff.org> */
121 .phys_ram = S3C2410_SDRAM_PA, 171 .phys_ram = S3C2410_SDRAM_PA,
@@ -124,5 +174,6 @@ MACHINE_START(H1940, "IPAQ-H1940")
124 .boot_params = S3C2410_SDRAM_PA + 0x100, 174 .boot_params = S3C2410_SDRAM_PA + 0x100,
125 .map_io = h1940_map_io, 175 .map_io = h1940_map_io,
126 .init_irq = h1940_init_irq, 176 .init_irq = h1940_init_irq,
177 .init_machine = h1940_init,
127 .timer = &s3c24xx_timer, 178 .timer = &s3c24xx_timer,
128MACHINE_END 179MACHINE_END