]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
s3c2410fb: add margin fields to s3c2410fb_display
authorKrzysztof Helt <krzysztof.h1@wp.pl>
Tue, 16 Oct 2007 08:28:57 +0000 (01:28 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 16 Oct 2007 16:43:16 +0000 (09:43 -0700)
This patch adds margins fields to the s3c2410fb_display
structure. It also sets display type and horizontal
margins in all platform files that use the s3c2410fb
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>
arch/arm/mach-s3c2410/mach-amlm5900.c
arch/arm/mach-s3c2410/mach-bast.c
arch/arm/mach-s3c2410/mach-h1940.c
arch/arm/mach-s3c2410/mach-qt2410.c
arch/arm/mach-s3c2440/mach-rx3715.c
arch/arm/mach-s3c2440/mach-smdk2440.c
include/asm-arm/arch-s3c2410/fb.h

index 19469340af0451c30322469f577b698d20f3b4d7..e96b413a114d8c1913009df3aac353a79c0ff7bd 100644 (file)
@@ -172,12 +172,13 @@ static struct s3c2410fb_display __initdata amlm5900_lcd_info = {
        .width          = 160,
        .height         = 160,
 
-/* commented out until stn patch is submitted
-*      .type           = S3C2410_LCDCON1_STN4,
-*/
+       .type           = S3C2410_LCDCON1_STN4,
+
        .xres           = 160,
        .yres           = 160,
        .bpp            = 4,
+       .left_margin    = 1 << (4 + 3),
+       .right_margin   = 8 << 3,
 
        .regs           = {
                .lcdcon1        = 0x00008225,
index be50201809a19fd914076e7ee40740aef0cd2cca..1b4f9f922c8aeec9466a3c8dd2405f4546aa1384 100644 (file)
@@ -469,10 +469,13 @@ static struct platform_device bast_device_axpp = {
 
 static struct s3c2410fb_display __initdata bast_lcd_info[] = {
        {
+               .type           = S3C2410_LCDCON1_TFT,
                .width          = 640,
                .height         = 480,
                .xres           = 320,
                .yres           = 240,
+               .left_margin    = 40,
+               .right_margin   = 20,
 
                .bpp            = 4,
 
@@ -485,12 +488,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
                }
        },
        {
+               .type           = S3C2410_LCDCON1_TFT,
                .width          = 640,
                .height         = 480,
 
                .xres           = 640,
                .yres           = 480,
                .bpp            = 4,
+               .left_margin    = 40,
+               .right_margin   = 20,
 
                .regs           = {
                        .lcdcon1        = 0x00000176,
@@ -501,12 +507,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
                }
        },
        {
+               .type           = S3C2410_LCDCON1_TFT,
                .width          = 640,
                .height         = 480,
 
                .xres           = 800,
                .yres           = 600,
                .bpp            = 4,
+               .left_margin    = 40,
+               .right_margin   = 20,
 
                .regs           = {
                        .lcdcon1        = 0x00000176,
@@ -517,12 +526,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
                }
        },
        {
+               .type           = S3C2410_LCDCON1_TFT,
                .width          = 640,
                .height         = 480,
 
                .xres           = 320,
                .yres           = 240,
                .bpp            = 8,
+               .left_margin    = 40,
+               .right_margin   = 20,
 
                .regs           = {
                        .lcdcon1        = 0x00000176,
@@ -533,12 +545,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
                }
        },
        {
+               .type           = S3C2410_LCDCON1_TFT,
                .width          = 640,
                .height         = 480,
 
                .xres           = 640,
                .yres           = 480,
                .bpp            = 8,
+               .left_margin    = 40,
+               .right_margin   = 20,
 
                .regs           = {
                        .lcdcon1        = 0x00000176,
@@ -549,12 +564,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
                }
        },
        {
+               .type           = S3C2410_LCDCON1_TFT,
                .width          = 640,
                .height         = 480,
 
                .xres           = 800,
                .yres           = 600,
                .bpp            = 8,
+               .left_margin    = 40,
+               .right_margin   = 20,
 
                .regs           = {
                        .lcdcon1        = 0x00000176,
@@ -565,12 +583,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
                }
        },
        {
+               .type           = S3C2410_LCDCON1_TFT,
                .width          = 640,
                .height         = 480,
 
                .xres           = 320,
                .yres           = 240,
                .bpp            = 16,
+               .left_margin    = 40,
+               .right_margin   = 20,
 
                .regs           = {
                        .lcdcon1        = 0x00000176,
@@ -581,12 +602,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
                }
        },
        {
+               .type           = S3C2410_LCDCON1_TFT,
                .width          = 640,
                .height         = 480,
 
                .xres           = 640,
                .yres           = 480,
                .bpp            = 16,
+               .left_margin    = 40,
+               .right_margin   = 20,
 
                .regs           = {
                        .lcdcon1        = 0x00000176,
@@ -597,12 +621,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
                }
        },
        {
+               .type           = S3C2410_LCDCON1_TFT,
                .width          = 640,
                .height         = 480,
 
                .xres           = 800,
                .yres           = 600,
                .bpp            = 16,
+               .left_margin    = 40,
+               .right_margin   = 20,
 
                .regs           = {
                        .lcdcon1        = 0x00000176,
index ab04b2961d6cc245a00a76ab82dd2c94d4a30b92..372caa289f2b58ca6b96c1a8d411ea2a1b9b9a41 100644 (file)
@@ -156,11 +156,14 @@ static struct s3c2410fb_display h1940_lcd __initdata = {
                                S3C2410_LCDCON5_HWSWP,
        },
 
+       .type =         S3C2410_LCDCON1_TFT,
        .width =        240,
        .height =       320,
        .xres =         240,
        .yres =         320,
        .bpp =          16,
+       .left_margin =  20,
+       .right_margin = 8,
 };
 
 static struct s3c2410fb_mach_info h1940_fb_info __initdata = {
index 03ea5d7b2a1777282832496b7d18d9d93112869b..0c1ff0a41a998ba963f6f97185f8ca9a5eb37821 100644 (file)
@@ -123,12 +123,15 @@ static struct s3c2410fb_display qt2410_lcd_cfg[] __initdata = {
                                   S3C2410_LCDCON5_HWSWP,
                },
 
+               .type           = S3C2410_LCDCON1_TFT,
                .width          = 640,
                .height         = 480,
 
                .xres           = 640,
                .yres           = 480,
                .bpp            = 16,
+               .left_margin    = 44,
+               .right_margin   = 116,
        },
        {
                /* Configuration for 480x640 toppoly TD028TTEC1 */
@@ -157,11 +160,14 @@ static struct s3c2410fb_display qt2410_lcd_cfg[] __initdata = {
                                   S3C2410_LCDCON5_HWSWP,
                },
 
+               .type           = S3C2410_LCDCON1_TFT,
                .width          = 480,
                .height         = 640,
                .xres           = 480,
                .yres           = 640,
                .bpp            = 16,
+               .left_margin    = 8,
+               .right_margin   = 24,
        },
        {
                /* Config for 240x320 LCD */
@@ -190,11 +196,14 @@ static struct s3c2410fb_display qt2410_lcd_cfg[] __initdata = {
                                   S3C2410_LCDCON5_HWSWP,
                },
 
+               .type           = S3C2410_LCDCON1_TFT,
                .width          = 240,
                .height         = 320,
                .xres           = 240,
                .yres           = 320,
                .bpp            = 16,
+               .left_margin    = 13,
+               .right_margin   = 8,
        },
 };
 
index c83078878497b4e3592378a4ffc75f4aa2271376..dab8e7b474d8ed58ec7543e5a784daa2948b39eb 100644 (file)
@@ -133,12 +133,15 @@ static struct s3c2410fb_display rx3715_lcdcfg __initdata = {
                                S3C2410_LCDCON5_HWSWP,
        },
 
-       .width  =       240,
-       .height =       320,
-
-       .xres   = 240,
-       .yres   = 320,
-       .bpp    = 16,
+       .type           = S3C2410_LCDCON1_TFT,
+       .width          = 240,
+       .height         = 320,
+
+       .xres           = 240,
+       .yres           = 320,
+       .bpp            = 16,
+       .left_margin    = 36,
+       .right_margin   = 36,
 };
 
 static struct s3c2410fb_mach_info rx3715_fb_info __initdata = {
index f7dac7d540644d43ac3bcc70b60376342712e8aa..5930f1708027f149d8c7eebe82b2f376c2cdf8d6 100644 (file)
@@ -137,6 +137,8 @@ static struct s3c2410fb_display smdk2440_lcd_cfg __initdata = {
        .xres           = 240,
        .yres           = 320,
        .bpp            = 16,
+       .left_margin    = 20,
+       .right_margin   = 8,
 };
 
 static struct s3c2410fb_mach_info smdk2440_fb_info __initdata = {
index c0e18b2c2d4a56c68a8bac22e0c369e2fc9948bb..a76585ae651dbbc3bbea32c3d707144d724043ec 100644 (file)
@@ -36,6 +36,13 @@ struct s3c2410fb_display {
        unsigned short yres;
        unsigned short bpp;
 
+       unsigned short left_margin;  /* value in pixels (TFT) or HCLKs (STN) */
+       unsigned short right_margin; /* value in pixels (TFT) or HCLKs (STN) */
+       unsigned short hsync_len;    /* value in pixels (TFT) or HCLKs (STN) */
+       unsigned short upper_margin;    /* value in lines (TFT) or 0 (STN) */
+       unsigned short lower_margin;    /* value in lines (TFT) or 0 (STN) */
+       unsigned short vsync_len;       /* value in lines (TFT) or 0 (STN) */
+
        /* lcd configuration registers */
        struct s3c2410fb_hw  regs;
 };