Re: Re: [RE-SEND] [PATCH 3/4] s3c-fb: Add support EXYNOS4 FIMD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I send you the suggetion as follows:
   1. change clock name of exynos4 FIMD: "fimd" -> "lcd"
   2. use 'has_clksel' variable in order to distinguish FIMD version.
   3. add 'lcd_clk' that can be used for only lcd pixel clock.
   4. add 'enable_clk()' used for enabling parent clock 'sclk_fimd'.

The FIMD driver doesn't need to use two clock names for FIMD.
V310 does not support pixel clock mux. In this case, 'lcd_clk'  is used
in order to enable the 'sclk_fimd'. The 'enable_clk()' will be located to machine
directory.

However,  when 64xx, C100, V210 are selected,  'lcd_clk' is not used,
because 'bus_clk' can be used for both FIMD IP and lcd pixel clock.

--- a/arch/arm/mach-exynos4/clock.c
+++ b/arch/arm/mach-exynos4/clock.c
@@ -433,12 +433,12 @@ static struct clk init_clocks_off[] = {
        }, {
-               .name           = "fimd",
+               .name           = "lcd",
                .id             = 0,
                .enable         = exynos4_clk_ip_lcd0_ctrl,
                .ctrlbit        = (1 << 0),
        }, {
-               .name           = "fimd",
+               .name           = "lcd",
                .id             = 1,

--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -81,6 +81,7 @@ struct s3c_fb;
  * @palette: Address of palette memory, or 0 if none.
  * @has_prtcon: Set if has PRTCON register.
  * @has_shadowcon: Set if has SHADOWCON register.
+ * @has_clksel: Set if VIDCON0 register has CLKSEL bit.
  */
 struct s3c_fb_variant {
        unsigned int    is_2443:1;
@@ -98,6 +99,7 @@ struct s3c_fb_variant {

        unsigned int    has_prtcon:1;
        unsigned int    has_shadowcon:1;
+       unsigned int    has_clksel:1;
 };

 /**
@@ -186,6 +188,7 @@ struct s3c_fb_vsync {
  * @bus_clk: The clk (hclk) feeding our interface and possibly pixclk.
+ * @lcd_clk: The clk (sclk) feeding pixclk.
  * @regs: The mapped hardware registers.
@@ -200,6 +203,7 @@ struct s3c_fb {
        struct clk              *bus_clk;
+       struct clk              *lcd_clk;
        void __iomem            *regs;

@@ -1353,6 +1357,11 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
        }

        clk_enable(sfb->bus_clk);
+       if (!sfb->variant.has_clksel) {
+               clk_enable(sfb->bus_clk);
+               pd->enable_clk(pdev, &sfb->lcd_clk);
+
+       }

        pm_runtime_enable(sfb->dev);

@@ -1755,6 +1764,7 @@ static struct s3c_fb_driverdata s3c_fb_data_64xx = {
                },

                .has_prtcon     = 1,
+               .has_clksel     = 1,
        },
@@ -1785,6 +1795,7 @@ static struct s3c_fb_driverdata s3c_fb_data_s5pc100 = {
                },

                .has_prtcon     = 1,
+               .has_clksel     = 1,
        },
@@ -1815,6 +1826,7 @@ static struct s3c_fb_driverdata s3c_fb_data_s5pv210 = {
                },

                .has_shadowcon  = 1,
+               .has_clksel     = 1,
        },
ÿ淸º{.nÇ+돴윯돪†+%듚ÿ깁負¥Šwÿº{.nÇ+돴¥Š{깸튐꿴筬Êþ)í끾èw*jgП¨¶‰šŽ듶¢jÿ¾?G«앶ÿ◀◁¦j:+v돣ŠwèjØm¶Ÿÿ?®w?듺þf"·hš뤴얎ÿ녪¥



[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux