From: daeinki Date: Wed, 23 Sep 2009 11:22:17 +0000 (+0900) Subject: s5pc110: fb: code clean. X-Git-Tag: 20091016~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df0fed0f6639f79a5600691bb03d7bdab57cc4d4;p=kernel%2Fu-boot.git s5pc110: fb: code clean. Signed-off-by: daeinki --- diff --git a/drivers/video/s5p-fb.c b/drivers/video/s5p-fb.c index ea26135..59d8e56 100644 --- a/drivers/video/s5p-fb.c +++ b/drivers/video/s5p-fb.c @@ -107,6 +107,15 @@ vidinfo_t panel_info = { .vl_clor = 1, .vl_tft = 1, + /* S6E63M0 LCD Panel */ + .vl_hpw = 2, + .vl_blw = 16, + .vl_elw = 16, + + .vl_vpw = 2, + .vl_bfw = 3, + .vl_efw = 28, + /* tl2796 panel. .vl_hpw = 4, .vl_blw = 8, .vl_elw = 8, @@ -114,6 +123,7 @@ vidinfo_t panel_info = { .vl_vpw = 4, .vl_bfw = 8, .vl_efw = 8, + */ }; static void s5pc_lcd_init_mem(void *lcdbase, vidinfo_t *vid) @@ -186,15 +196,10 @@ static void draw_samsung_logo(void* lcdbase) static void lcd_panel_on(void) { - if (cpu_is_s5pc100()) { - tl2796_c100_panel_init(); - tl2796_c100_panel_power_on(); - } else { - tl2796_c110_panel_init(); - tl2796_c110_panel_power_on(); - } + lcd_panel_init(); + lcd_panel_power_on(); - tl2796_panel_enable(); + lcd_panel_enable(); } void lcd_ctrl_init(void *lcdbase) diff --git a/drivers/video/s5p-fb.h b/drivers/video/s5p-fb.h index e0a9086..f8acac1 100644 --- a/drivers/video/s5p-fb.h +++ b/drivers/video/s5p-fb.h @@ -253,10 +253,9 @@ unsigned long s5pc_fimd_calc_fbsize(void); void s5pc_c100_gpio_setup(void); void s5pc_c110_gpio_setup(void); -void tl2796_c100_panel_init(void); -void tl2796_c100_panel_power_on(void); -void tl2796_c110_panel_init(void); -void tl2796_c110_panel_power_on(void); +void lcd_panel_init(void); +void lcd_panel_power_on(void); +void lcd_panel_enable(void); #endif diff --git a/drivers/video/s5p-fimd.c b/drivers/video/s5p-fimd.c index d506106..80cf5d0 100644 --- a/drivers/video/s5p-fimd.c +++ b/drivers/video/s5p-fimd.c @@ -119,10 +119,18 @@ void s5pc_c110_gpio_setup(void) writel(0x2, DCR); /* set gpio configuration pin for MLCD_RST */ + /* for s5pc110 Universal board. writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET)) & 0x0fffffff, S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET)); writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET)) | 0x10000000, S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET)); + */ + + /* for s5pc110 Limo board. */ + writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_5_OFFSET)) & 0xff0fffff, + S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_5_OFFSET)); + writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_5_OFFSET)) | 0x00100000, + S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_5_OFFSET)); /* set gpio configuration pin for MLCD_ON and then to LOW */ writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_J1_OFFSET)) & 0xFFFF0FFF, diff --git a/drivers/video/tl2796.c b/drivers/video/tl2796.c index 3589dd3..b9a91f6 100644 --- a/drivers/video/tl2796.c +++ b/drivers/video/tl2796.c @@ -103,42 +103,45 @@ const unsigned short SEQ_SETTING[] = { 0x27, 0x01, 0x12, 0x08, 0x13, 0x08, - 0x15, 0x0C, + 0x15, 0x10, 0x16, 0x00, /* 24bit line and 16M color */ + 0xA1, 0x00, + DATA_ONLY, 0xC4, 0xEF, 0xD0, /* pentile key setting */ DATA_ONLY, 0xE8, 0x39, 0x44, /* gamma setting : 300cd */ - 0x40, 0x00, + + 0x40, 0x0A, 0x41, 0x00, - 0x42, 0x00, - 0x43, 0x24, - 0x44, 0x24, - 0x45, 0x1E, - 0x46, 0x3F, + 0x42, 0x12, + 0x43, 0x18, + 0x44, 0x18, + 0x45, 0x14, + 0x46, 0x52, - 0x50, 0x00, + 0x50, 0x0A, 0x51, 0x00, 0x52, 0x00, - 0x53, 0x23, - 0x54, 0x24, - 0x55, 0x1E, - 0x56, 0x3D, + 0x53, 0x1A, + 0x54, 0x1A, + 0x55, 0x17, + 0x56, 0x3A, 0x60, 0x00, 0x61, 0x00, - 0x62, 0x00, - 0x63, 0x22, - 0x64, 0x22, - 0x65, 0x1A, - 0x66, 0x56, + 0x62, 0x29, + 0x63, 0x29, + 0x64, 0x26, + 0x65, 0x20, + 0x66, 0x3D, 0x17, 0x22, /* power setting */ 0x18, 0x33, 0x19, 0x03, 0x1A, 0x01, - 0x22, 0xA3, /* VXX x 0.60 */ + 0x22, 0xA4, /* VXX x 0.60 */ 0x23, 0x00, 0x26, 0xA0, @@ -276,12 +279,12 @@ void tl2796_c100_panel_power_on(void) tl2796_panel_send_sequence(SEQ_STANDBY_OFF); } -void tl2796_c110_panel_power_on(void) +void lcd_panel_power_on(void) { /* set gpio data for MLCD_RST to HIGH */ - writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET+ - S5PC1XX_GPIO_DAT_OFFSET)) | 0x80, - S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET+ + writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_5_OFFSET+ + S5PC1XX_GPIO_DAT_OFFSET)) | 0xdf, + S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_5_OFFSET+ S5PC1XX_GPIO_DAT_OFFSET)); /* set gpio data for MLCD_ON to HIGH */ writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_J1_OFFSET+ @@ -291,15 +294,15 @@ void tl2796_c110_panel_power_on(void) udelay(25000); /* set gpio data for MLCD_RST to LOW */ - writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET+ - S5PC1XX_GPIO_DAT_OFFSET)) & 0x7f, - S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET+ + writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_5_OFFSET+ + S5PC1XX_GPIO_DAT_OFFSET)) & 0xdf, + S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_5_OFFSET+ S5PC1XX_GPIO_DAT_OFFSET)); udelay(20); /* set gpio data for MLCD_RST to HIGH */ - writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET+ - S5PC1XX_GPIO_DAT_OFFSET)) | 0x80, - S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET+ + writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_5_OFFSET+ + S5PC1XX_GPIO_DAT_OFFSET)) | 0x20, + S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_5_OFFSET+ S5PC1XX_GPIO_DAT_OFFSET)); udelay(20000); @@ -327,20 +330,20 @@ static inline void tl2796_c100_panel_hw_reset(void) static inline void tl2796_c110_panel_hw_reset(void) { /* set gpio pin for MLCD_RST to LOW */ - writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET+ - S5PC1XX_GPIO_DAT_OFFSET)) & 0x7f, - S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET+ + writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_5_OFFSET+ + S5PC1XX_GPIO_DAT_OFFSET)) & 0xdf, + S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_5_OFFSET+ S5PC1XX_GPIO_DAT_OFFSET)); udelay(1); /* Shorter than 5 usec */ /* set gpio pin for MLCD_RST to HIGH */ - writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET+ - S5PC1XX_GPIO_DAT_OFFSET)) | 0x80, - S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET+ + writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_5_OFFSET+ + S5PC1XX_GPIO_DAT_OFFSET)) | 0x20, + S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_5_OFFSET+ S5PC1XX_GPIO_DAT_OFFSET)); udelay(10000); } -void tl2796_panel_enable(void) +void lcd_panel_enable(void) { tl2796_panel_send_sequence(SEQ_DISPLAY_ON); } @@ -369,7 +372,7 @@ void tl2796_c100_panel_init(void) S5PC1XX_GPIO_DAT_OFFSET)); } -void tl2796_c110_panel_init(void) +void lcd_panel_init(void) { /* set gpio pin for DISPLAY_CS to HIGH */ writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_1_OFFSET+ diff --git a/drivers/video/tl2796_aquila.c b/drivers/video/tl2796_aquila.c index da1016b..3b78693 100644 --- a/drivers/video/tl2796_aquila.c +++ b/drivers/video/tl2796_aquila.c @@ -198,7 +198,7 @@ void tl2796_c100_panel_power_on(void) return; } -void tl2796_c110_panel_power_on(void) +void lcd_panel_power_on(void) { /* set gpio data for SUBLCD_RST to HIGH */ writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_2_OFFSET+ @@ -251,7 +251,7 @@ static inline void tl2796_c110_panel_hw_reset(void) udelay(10000); } -void tl2796_panel_enable(void) +void lcd_panel_enable(void) { tl2796_panel_send_sequence(SEQ_DISPLAY_ON); } @@ -261,13 +261,7 @@ static void tl2796_panel_disable(void) tl2796_panel_send_sequence(SEQ_DISPLAY_OFF); } -void tl2796_c100_panel_init(void) -{ - /* for compatibility with the other versions */ - return; -} - -void tl2796_c110_panel_init(void) +void lcd_panel_init(void) { /* set gpio pin for DISPLAY_CS to HIGH */ writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_1_OFFSET+ diff --git a/drivers/video/tl2796_dual.c b/drivers/video/tl2796_dual.c index 3ea67d1..6e2e078 100644 --- a/drivers/video/tl2796_dual.c +++ b/drivers/video/tl2796_dual.c @@ -219,7 +219,7 @@ static void tl2796_panel_send_sequence(const unsigned short *wbuf) } } -void tl2796_c110_panel_power_on(void) +void lcd_panel_power_on(void) { /* set gpio data for MLCD_RST to HIGH */ writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET+ @@ -292,7 +292,7 @@ static inline void tl2796_c110_panel_hw_reset(void) udelay(10000); } -void tl2796_panel_enable(void) +void lcd_panel_enable(void) { tl2796_panel_send_sequence(SEQ_DISPLAY_ON); } @@ -302,7 +302,7 @@ static void tl2796_panel_disable(void) tl2796_panel_send_sequence(SEQ_DISPLAY_OFF); } -void tl2796_c110_panel_init(void) +void lcd_panel_init(void) { /* set gpio pin for DISPLAY_CS to HIGH */ writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_1_OFFSET+ diff --git a/drivers/video/tl2796_dual_aquila.c b/drivers/video/tl2796_dual_aquila.c index f3215d9..a38eba4 100644 --- a/drivers/video/tl2796_dual_aquila.c +++ b/drivers/video/tl2796_dual_aquila.c @@ -219,7 +219,7 @@ static void tl2796_panel_send_sequence(const unsigned short *wbuf) } } -void tl2796_c110_panel_power_on(void) +void lcd_panel_power_on(void) { /* set gpio data for MLCD_RST to HIGH */ writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_5_OFFSET+ @@ -293,7 +293,7 @@ static inline void tl2796_c110_panel_hw_reset(void) udelay(10000); } -void tl2796_panel_enable(void) +void lcd_panel_enable(void) { tl2796_panel_send_sequence(SEQ_DISPLAY_ON); } @@ -303,7 +303,7 @@ static void tl2796_panel_disable(void) tl2796_panel_send_sequence(SEQ_DISPLAY_OFF); } -void tl2796_c110_panel_init(void) +void lcd_panel_init(void) { /* set gpio pin for DISPLAY_CS to HIGH */ writel(readl(S5PC110_GPIO_BASE(S5PC110_GPIO_MP0_1_OFFSET+