* [PATCH 2/3] s3c2410fb: removes lcdcon1 register value from s3c2410fb_display
@ 2007-08-15 8:24 Krzysztof Helt
0 siblings, 0 replies; only message in thread
From: Krzysztof Helt @ 2007-08-15 8:24 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: Ben Dooks, Arnaud Patard (Rtp)
[-- Attachment #1: Type: text/plain, Size: 7225 bytes --]
From: Krzysztof Helt <krzysztof.h1@wp.pl>
This patch removes lcdcon1 register field from the
s3c2410fb_display
as all bits are calculated from other fields.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
---
diff -urp linux-2.6.23.old/arch/arm/mach-s3c2410/mach-amlm5900.c
linux-2.6.23/arch/arm/mach-s3c2410/mach-amlm5900.c
--- linux-2.6.23.old/arch/arm/mach-s3c2410/mach-amlm5900.c
2007-08-14 21:13:31.000000000 +0200
+++ linux-2.6.23/arch/arm/mach-s3c2410/mach-amlm5900.c 2007-08-
14 21:13:52.000000000 +0200
@@ -184,7 +184,6 @@ static struct s3c2410fb_display __initda
.upper_margin = 0,
.lower_margin = 0,
- .lcdcon1 = 0x00008225,
.lcdcon5 = 0x00000001,
};
diff -urp linux-2.6.23.old/arch/arm/mach-s3c2410/mach-bast.c
linux-2.6.23/arch/arm/mach-s3c2410/mach-bast.c
--- linux-2.6.23.old/arch/arm/mach-s3c2410/mach-bast.c 2007-08-
14 21:13:31.000000000 +0200
+++ linux-2.6.23/arch/arm/mach-s3c2410/mach-bast.c 2007-08-
14 21:13:52.000000000 +0200
@@ -484,7 +484,6 @@ static struct s3c2410fb_display __initda
.lower_margin = 32,
.vsync_len = 3,
- .lcdcon1 = 0x00000176,
.lcdcon5 = 0x00014b02,
},
{
@@ -503,7 +502,6 @@ static struct s3c2410fb_display __initda
.lower_margin = 32,
.vsync_len = 3,
- .lcdcon1 = 0x00000176,
.lcdcon5 = 0x00014b02,
},
{
@@ -522,7 +520,6 @@ static struct s3c2410fb_display __initda
.lower_margin = 32,
.vsync_len = 3,
- .lcdcon1 = 0x00000176,
.lcdcon5 = 0x00014b02,
},
};
diff -urp linux-2.6.23.old/arch/arm/mach-s3c2410/mach-h1940.c
linux-2.6.23/arch/arm/mach-s3c2410/mach-h1940.c
--- linux-2.6.23.old/arch/arm/mach-s3c2410/mach-h1940.c 2007-08-
14 21:13:31.000000000 +0200
+++ linux-2.6.23/arch/arm/mach-s3c2410/mach-h1940.c 2007-08-
14 21:13:52.000000000 +0200
@@ -134,10 +134,6 @@ static struct s3c2410_udc_mach_info h194
* Set lcd on or off
**/
static struct s3c2410fb_display h1940_lcd __initdata = {
- .lcdcon1= S3C2410_LCDCON1_TFT16BPP | \
- S3C2410_LCDCON1_TFT | \
- S3C2410_LCDCON1_CLKVAL(0x0C),
-
.lcdcon5= S3C2410_LCDCON5_FRM565 | \
S3C2410_LCDCON5_INVVLINE | \
S3C2410_LCDCON5_HWSWP,
diff -urp linux-2.6.23.old/arch/arm/mach-s3c2410/mach-qt2410.c
linux-2.6.23/arch/arm/mach-s3c2410/mach-qt2410.c
--- linux-2.6.23.old/arch/arm/mach-s3c2410/mach-qt2410.c
2007-08-14 21:13:31.000000000 +0200
+++ linux-2.6.23/arch/arm/mach-s3c2410/mach-qt2410.c 2007-08-
14 21:13:52.000000000 +0200
@@ -98,10 +98,6 @@ static struct s3c2410_uartcfg smdk2410_u
static struct s3c2410fb_display qt2410_lcd_cfg[] __initdata = {
{
/* Configuration for 640x480 SHARP LQ080V3DG01 */
- .lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
- S3C2410_LCDCON1_TFT |
- S3C2410_LCDCON1_CLKVAL(0x01), /* HCLK/
4 */
-
.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
@@ -125,10 +121,6 @@ static struct s3c2410fb_display qt2410_l
},
{
/* Configuration for 480x640 toppoly TD028TTEC1
*/
- .lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
- S3C2410_LCDCON1_TFT |
- S3C2410_LCDCON1_CLKVAL(0x01), /* HCLK/
4 */
-
.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
@@ -151,10 +143,6 @@ static struct s3c2410fb_display qt2410_l
},
{
/* Config for 240x320 LCD */
- .lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
- S3C2410_LCDCON1_TFT |
- S3C2410_LCDCON1_CLKVAL(0x04),
-
.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
diff -urp linux-2.6.23.old/arch/arm/mach-s3c2440/mach-rx3715.c
linux-2.6.23/arch/arm/mach-s3c2440/mach-rx3715.c
--- linux-2.6.23.old/arch/arm/mach-s3c2440/mach-rx3715.c
2007-08-14 21:13:31.000000000 +0200
+++ linux-2.6.23/arch/arm/mach-s3c2440/mach-rx3715.c 2007-08-
14 21:13:52.000000000 +0200
@@ -111,10 +111,6 @@ static struct s3c2410_uartcfg rx3715_uar
/* framebuffer lcd controller information */
static struct s3c2410fb_display rx3715_lcdcfg __initdata = {
- .lcdcon1 = S3C2410_LCDCON1_TFT16BPP | \
- S3C2410_LCDCON1_TFT | \
- S3C2410_LCDCON1_CLKVAL(0x0C),
-
.lcdcon5 = S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_HWSWP,
diff -urp linux-2.6.23.old/arch/arm/mach-s3c2440/mach-smdk2440.c
linux-2.6.23/arch/arm/mach-s3c2440/mach-smdk2440.c
--- linux-2.6.23.old/arch/arm/mach-s3c2440/mach-smdk2440.c
2007-08-14 21:13:31.000000000 +0200
+++ linux-2.6.23/arch/arm/mach-s3c2440/mach-smdk2440.c 2007-08-
14 21:13:52.000000000 +0200
@@ -105,10 +105,6 @@ static struct s3c2410_uartcfg smdk2440_u
static struct s3c2410fb_display smdk2440_lcd_cfg __initdata = {
- .lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
- S3C2410_LCDCON1_TFT |
- S3C2410_LCDCON1_CLKVAL(0x04),
-
.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
diff -urp linux-2.6.23.old/drivers/video/s3c2410fb.c linux-
2.6.23/drivers/video/s3c2410fb.c
--- linux-2.6.23.old/drivers/video/s3c2410fb.c 2007-08-14
21:13:31.000000000 +0200
+++ linux-2.6.23/drivers/video/s3c2410fb.c 2007-08-14
21:14:20.000000000 +0200
@@ -207,11 +207,9 @@ static int s3c2410fb_check_var(struct fb
var->vsync_len = display->vsync_len;
var->hsync_len = display->hsync_len;
- fbi->regs.lcdcon1 = display->lcdcon1;
fbi->regs.lcdcon5 = display->lcdcon5;
/* set display type */
- fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_TFT;
- fbi->regs.lcdcon1 |= display->type;
+ fbi->regs.lcdcon1 = display->type;
var->transp.offset = 0;
var->transp.length = 0;
@@ -301,8 +299,6 @@ static void s3c2410fb_calculate_stn_lcd_
if (type != S3C2410_LCDCON1_STN4)
hs >>= 1;
- regs->lcdcon1 &= ~S3C2410_LCDCON1_MODEMASK;
-
switch (var->bits_per_pixel) {
case 1:
regs->lcdcon1 |= S3C2410_LCDCON1_STN1BPP;
@@ -356,8 +352,6 @@ static void s3c2410fb_calculate_tft_lcd_
const struct s3c2410fb_info *fbi = info->par;
const struct fb_var_screeninfo *var = &info->var;
- regs->lcdcon1 &= ~S3C2410_LCDCON1_MODEMASK;
-
switch (var->bits_per_pixel) {
case 1:
regs->lcdcon1 |= S3C2410_LCDCON1_TFT1BPP;
@@ -437,7 +431,6 @@ static void s3c2410fb_activate_var(struc
clkdiv = 2;
}
- fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_CLKVAL(0x3ff);
fbi->regs.lcdcon1 |= S3C2410_LCDCON1_CLKVAL(clkdiv);
/* write new registers */
diff -urp linux-2.6.23.old/include/asm-arm/arch-s3c2410/fb.h
linux-2.6.23/include/asm-arm/arch-s3c2410/fb.h
--- linux-2.6.23.old/include/asm-arm/arch-s3c2410/fb.h 2007-08-
14 21:13:31.000000000 +0200
+++ linux-2.6.23/include/asm-arm/arch-s3c2410/fb.h 2007-08-
14 21:13:52.000000000 +0200
@@ -45,7 +45,6 @@ struct s3c2410fb_display {
unsigned short vsync_len; /* value in lines (TFT)
or 0 (STN) */
/* lcd configuration registers */
- unsigned long lcdcon1;
unsigned long lcdcon5;
};
----------------------------------------------------
Czy na wakacje warto zabrać laptopa?
Zobacz gdzie działają strefy darmowego, bezprzewodowego Internetu!
Kliknij: http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fd128.html&sid=1259
[-- Attachment #2: s3c2410fb-remove-lcdcon1.diff --]
[-- Type: application/octet-stream, Size: 6735 bytes --]
From: Krzysztof Helt <krzysztof.h1@wp.pl>
This patch removes lcdcon1 register field from the s3c2410fb_display
as all bits are calculated from other fields.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
---
diff -urp linux-2.6.23.old/arch/arm/mach-s3c2410/mach-amlm5900.c linux-2.6.23/arch/arm/mach-s3c2410/mach-amlm5900.c
--- linux-2.6.23.old/arch/arm/mach-s3c2410/mach-amlm5900.c 2007-08-14 21:13:31.000000000 +0200
+++ linux-2.6.23/arch/arm/mach-s3c2410/mach-amlm5900.c 2007-08-14 21:13:52.000000000 +0200
@@ -184,7 +184,6 @@ static struct s3c2410fb_display __initda
.upper_margin = 0,
.lower_margin = 0,
- .lcdcon1 = 0x00008225,
.lcdcon5 = 0x00000001,
};
diff -urp linux-2.6.23.old/arch/arm/mach-s3c2410/mach-bast.c linux-2.6.23/arch/arm/mach-s3c2410/mach-bast.c
--- linux-2.6.23.old/arch/arm/mach-s3c2410/mach-bast.c 2007-08-14 21:13:31.000000000 +0200
+++ linux-2.6.23/arch/arm/mach-s3c2410/mach-bast.c 2007-08-14 21:13:52.000000000 +0200
@@ -484,7 +484,6 @@ static struct s3c2410fb_display __initda
.lower_margin = 32,
.vsync_len = 3,
- .lcdcon1 = 0x00000176,
.lcdcon5 = 0x00014b02,
},
{
@@ -503,7 +502,6 @@ static struct s3c2410fb_display __initda
.lower_margin = 32,
.vsync_len = 3,
- .lcdcon1 = 0x00000176,
.lcdcon5 = 0x00014b02,
},
{
@@ -522,7 +520,6 @@ static struct s3c2410fb_display __initda
.lower_margin = 32,
.vsync_len = 3,
- .lcdcon1 = 0x00000176,
.lcdcon5 = 0x00014b02,
},
};
diff -urp linux-2.6.23.old/arch/arm/mach-s3c2410/mach-h1940.c linux-2.6.23/arch/arm/mach-s3c2410/mach-h1940.c
--- linux-2.6.23.old/arch/arm/mach-s3c2410/mach-h1940.c 2007-08-14 21:13:31.000000000 +0200
+++ linux-2.6.23/arch/arm/mach-s3c2410/mach-h1940.c 2007-08-14 21:13:52.000000000 +0200
@@ -134,10 +134,6 @@ static struct s3c2410_udc_mach_info h194
* Set lcd on or off
**/
static struct s3c2410fb_display h1940_lcd __initdata = {
- .lcdcon1= S3C2410_LCDCON1_TFT16BPP | \
- S3C2410_LCDCON1_TFT | \
- S3C2410_LCDCON1_CLKVAL(0x0C),
-
.lcdcon5= S3C2410_LCDCON5_FRM565 | \
S3C2410_LCDCON5_INVVLINE | \
S3C2410_LCDCON5_HWSWP,
diff -urp linux-2.6.23.old/arch/arm/mach-s3c2410/mach-qt2410.c linux-2.6.23/arch/arm/mach-s3c2410/mach-qt2410.c
--- linux-2.6.23.old/arch/arm/mach-s3c2410/mach-qt2410.c 2007-08-14 21:13:31.000000000 +0200
+++ linux-2.6.23/arch/arm/mach-s3c2410/mach-qt2410.c 2007-08-14 21:13:52.000000000 +0200
@@ -98,10 +98,6 @@ static struct s3c2410_uartcfg smdk2410_u
static struct s3c2410fb_display qt2410_lcd_cfg[] __initdata = {
{
/* Configuration for 640x480 SHARP LQ080V3DG01 */
- .lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
- S3C2410_LCDCON1_TFT |
- S3C2410_LCDCON1_CLKVAL(0x01), /* HCLK/4 */
-
.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
@@ -125,10 +121,6 @@ static struct s3c2410fb_display qt2410_l
},
{
/* Configuration for 480x640 toppoly TD028TTEC1 */
- .lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
- S3C2410_LCDCON1_TFT |
- S3C2410_LCDCON1_CLKVAL(0x01), /* HCLK/4 */
-
.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
@@ -151,10 +143,6 @@ static struct s3c2410fb_display qt2410_l
},
{
/* Config for 240x320 LCD */
- .lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
- S3C2410_LCDCON1_TFT |
- S3C2410_LCDCON1_CLKVAL(0x04),
-
.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
diff -urp linux-2.6.23.old/arch/arm/mach-s3c2440/mach-rx3715.c linux-2.6.23/arch/arm/mach-s3c2440/mach-rx3715.c
--- linux-2.6.23.old/arch/arm/mach-s3c2440/mach-rx3715.c 2007-08-14 21:13:31.000000000 +0200
+++ linux-2.6.23/arch/arm/mach-s3c2440/mach-rx3715.c 2007-08-14 21:13:52.000000000 +0200
@@ -111,10 +111,6 @@ static struct s3c2410_uartcfg rx3715_uar
/* framebuffer lcd controller information */
static struct s3c2410fb_display rx3715_lcdcfg __initdata = {
- .lcdcon1 = S3C2410_LCDCON1_TFT16BPP | \
- S3C2410_LCDCON1_TFT | \
- S3C2410_LCDCON1_CLKVAL(0x0C),
-
.lcdcon5 = S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_HWSWP,
diff -urp linux-2.6.23.old/arch/arm/mach-s3c2440/mach-smdk2440.c linux-2.6.23/arch/arm/mach-s3c2440/mach-smdk2440.c
--- linux-2.6.23.old/arch/arm/mach-s3c2440/mach-smdk2440.c 2007-08-14 21:13:31.000000000 +0200
+++ linux-2.6.23/arch/arm/mach-s3c2440/mach-smdk2440.c 2007-08-14 21:13:52.000000000 +0200
@@ -105,10 +105,6 @@ static struct s3c2410_uartcfg smdk2440_u
static struct s3c2410fb_display smdk2440_lcd_cfg __initdata = {
- .lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
- S3C2410_LCDCON1_TFT |
- S3C2410_LCDCON1_CLKVAL(0x04),
-
.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
diff -urp linux-2.6.23.old/drivers/video/s3c2410fb.c linux-2.6.23/drivers/video/s3c2410fb.c
--- linux-2.6.23.old/drivers/video/s3c2410fb.c 2007-08-14 21:13:31.000000000 +0200
+++ linux-2.6.23/drivers/video/s3c2410fb.c 2007-08-14 21:14:20.000000000 +0200
@@ -207,11 +207,9 @@ static int s3c2410fb_check_var(struct fb
var->vsync_len = display->vsync_len;
var->hsync_len = display->hsync_len;
- fbi->regs.lcdcon1 = display->lcdcon1;
fbi->regs.lcdcon5 = display->lcdcon5;
/* set display type */
- fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_TFT;
- fbi->regs.lcdcon1 |= display->type;
+ fbi->regs.lcdcon1 = display->type;
var->transp.offset = 0;
var->transp.length = 0;
@@ -301,8 +299,6 @@ static void s3c2410fb_calculate_stn_lcd_
if (type != S3C2410_LCDCON1_STN4)
hs >>= 1;
- regs->lcdcon1 &= ~S3C2410_LCDCON1_MODEMASK;
-
switch (var->bits_per_pixel) {
case 1:
regs->lcdcon1 |= S3C2410_LCDCON1_STN1BPP;
@@ -356,8 +352,6 @@ static void s3c2410fb_calculate_tft_lcd_
const struct s3c2410fb_info *fbi = info->par;
const struct fb_var_screeninfo *var = &info->var;
- regs->lcdcon1 &= ~S3C2410_LCDCON1_MODEMASK;
-
switch (var->bits_per_pixel) {
case 1:
regs->lcdcon1 |= S3C2410_LCDCON1_TFT1BPP;
@@ -437,7 +431,6 @@ static void s3c2410fb_activate_var(struc
clkdiv = 2;
}
- fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_CLKVAL(0x3ff);
fbi->regs.lcdcon1 |= S3C2410_LCDCON1_CLKVAL(clkdiv);
/* write new registers */
diff -urp linux-2.6.23.old/include/asm-arm/arch-s3c2410/fb.h linux-2.6.23/include/asm-arm/arch-s3c2410/fb.h
--- linux-2.6.23.old/include/asm-arm/arch-s3c2410/fb.h 2007-08-14 21:13:31.000000000 +0200
+++ linux-2.6.23/include/asm-arm/arch-s3c2410/fb.h 2007-08-14 21:13:52.000000000 +0200
@@ -45,7 +45,6 @@ struct s3c2410fb_display {
unsigned short vsync_len; /* value in lines (TFT) or 0 (STN) */
/* lcd configuration registers */
- unsigned long lcdcon1;
unsigned long lcdcon5;
};
[-- Attachment #3: Type: text/plain, Size: 315 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
[-- Attachment #4: Type: text/plain, Size: 182 bytes --]
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-08-15 8:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-15 8:24 [PATCH 2/3] s3c2410fb: removes lcdcon1 register value from s3c2410fb_display Krzysztof Helt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).