s5p: fimd/fb: codes clean
authorMinkyu Kang <mk7.kang@samsung.com>
Wed, 6 Oct 2010 02:13:01 +0000 (11:13 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Wed, 6 Oct 2010 02:13:01 +0000 (11:13 +0900)
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
board/samsung/universal_c110/universal.c
drivers/video/s5p-fb.c
drivers/video/s5p-fimd.c

index 92edab1..a55935b 100644 (file)
@@ -1802,7 +1802,7 @@ static void setup_power_down_mode_registers(void)
 
 #ifdef CONFIG_LCD
 
-void fimd_clk_set()
+void fimd_clk_set(void)
 {
        struct s5pc110_clock *clk =
                (struct s5pc110_clock *)samsung_get_base_clock();
@@ -2103,7 +2103,7 @@ extern void s6d16a0x_enable_ldo(unsigned int onoff);
 extern void ld9040_cfg_ldo(void);
 extern void ld9040_enable_ldo(unsigned int onoff);
 extern void s3cfb_set_trigger(void);
-extern void s3cfb_is_i80_frame_done(void);
+extern int s3cfb_is_i80_frame_done(void);
 
 int s5p_no_lcd_support(void)
 {
index 1b48c0e..d44feec 100644 (file)
@@ -164,6 +164,7 @@ int conv_rgb565_to_rgb888(unsigned short rgb565, unsigned int sw)
        return (red << 16 | green << 8 | blue);
 }
 
+#if 0
 void draw_bitmap(void *lcdbase, int x, int y, int w, int h, unsigned long *bmp)
 {
        int i, j;
@@ -175,6 +176,7 @@ void draw_bitmap(void *lcdbase, int x, int y, int w, int h, unsigned long *bmp)
                        *(fb + (j * panel_width) + i) = *(bmp + k++);
        }
 }
+#endif
 
 void _draw_samsung_logo(void *lcdbase, int x, int y, int w, int h, unsigned short *bmp)
 {
@@ -329,9 +331,3 @@ ulong calc_fbsize(void)
 {
        return s5pc_fimd_calc_fbsize();
 }
-
-void s5pc1xxfb_test(void *lcdbase)
-{
-       lcd_ctrl_init(lcdbase);
-       lcd_enable();
-}
index c03d90f..fba97e4 100644 (file)
@@ -35,8 +35,6 @@
 #include <asm/arch/gpio.h>
 #include "s5p-fb.h"
 
-#define MPLL 1
-
 static unsigned int ctrl_base;
 static unsigned long *lcd_base_addr;
 static vidinfo_t *pvid = NULL;
@@ -325,12 +323,6 @@ void s5pc_fimd_lcd_init(vidinfo_t *vid)
        /* select register base according to cpu type */
        ctrl_base = samsung_get_base_fimd();
 
-       cfg = readl(ctrl_base + S5P_VIDCON0);
-       cfg &= ~S5P_VIDCON0_VIDOUT_MASK;
-
-       /* clock source is HCLK */
-       cfg |= 0 << 2;
-
        rgb_mode = MODE_RGB_P;
        /* set display mode */
        cfg = readl(ctrl_base + S5P_VIDCON0);
@@ -356,15 +348,13 @@ void s5pc_fimd_lcd_init(vidinfo_t *vid)
                writel(cfg, ctrl_base + S5P_VIDCON1);
 
                /* set timing */
-               cfg = 0;
-               cfg |= S5P_VIDTCON0_VFPD(pvid->vl_vfpd - 1);
+               cfg = S5P_VIDTCON0_VFPD(pvid->vl_vfpd - 1);
                cfg |= S5P_VIDTCON0_VBPD(pvid->vl_vbpd - 1);
                cfg |= S5P_VIDTCON0_VSPW(pvid->vl_vspw - 1);
                writel(cfg, ctrl_base + S5P_VIDTCON0);
                udebug("vidtcon0 = %x\n", cfg);
 
-               cfg = 0;
-               cfg |= S5P_VIDTCON1_HFPD(pvid->vl_hfpd - 1);
+               cfg = S5P_VIDTCON1_HFPD(pvid->vl_hfpd - 1);
                cfg |= S5P_VIDTCON1_HBPD(pvid->vl_hbpd - 1);
                cfg |= S5P_VIDTCON1_HSPW(pvid->vl_hspw - 1);
 
@@ -372,8 +362,7 @@ void s5pc_fimd_lcd_init(vidinfo_t *vid)
                udebug("vidtcon1 = %x\n", cfg);
 
                /* set lcd size */
-               cfg = 0;
-               cfg |= S5P_VIDTCON2_HOZVAL(pvid->vl_col - 1);
+               cfg = S5P_VIDTCON2_HOZVAL(pvid->vl_col - 1);
                cfg |= S5P_VIDTCON2_LINEVAL(pvid->vl_row - 1);
 
                writel(cfg, ctrl_base + S5P_VIDTCON2);
@@ -384,8 +373,7 @@ void s5pc_fimd_lcd_init(vidinfo_t *vid)
                writel(cfg, ctrl_base + S5P_VIDCON0);
 
                /* set lcd size */
-               cfg = 0;
-               cfg |= S5P_VIDTCON2_HOZVAL(pvid->vl_col - 1);
+               cfg = S5P_VIDTCON2_HOZVAL(pvid->vl_col - 1);
                cfg |= S5P_VIDTCON2_LINEVAL(pvid->vl_row - 1);
                writel(cfg, ctrl_base + S5P_VIDTCON2);
                udebug("vidtcon2 = %x\n", cfg);
@@ -396,7 +384,6 @@ void s5pc_fimd_lcd_init(vidinfo_t *vid)
                udebug("MIPI Command mode.\n");
        }
 
-
        /* set par */
        s5pc_fimd_set_par(win_id);