ARM: OMAP2/3: Change omapfb to use clkdev for dispc and rfbi, v2
authorTony Lindgren <tony@atomide.com>
Sat, 16 May 2009 15:28:17 +0000 (08:28 -0700)
committerTony Lindgren <tony@atomide.com>
Sat, 16 May 2009 15:28:17 +0000 (08:28 -0700)
This makes the framebuffer work on omap3.

Also fix the clk_get usage for checkpatch.pl
"ERROR: do not use assignment in if condition".

Cc: Imre Deak <imre.deak@nokia.com>
Cc: linux-fbdev-devel@lists.sourceforge.net
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/clock24xx.c
arch/arm/mach-omap2/clock34xx.c
drivers/video/omap/dispc.c
drivers/video/omap/rfbi.c

index ff9b4c0..e4cef33 100644 (file)
@@ -103,10 +103,10 @@ static struct omap_clk omap24xx_clks[] = {
        CLK(NULL,       "mdm_ick",      &mdm_ick,       CK_243X),
        CLK(NULL,       "mdm_osc_ck",   &mdm_osc_ck,    CK_243X),
        /* DSS domain clocks */
-       CLK(NULL,       "dss_ick",      &dss_ick,       CK_243X | CK_242X),
-       CLK(NULL,       "dss1_fck",     &dss1_fck,      CK_243X | CK_242X),
-       CLK(NULL,       "dss2_fck",     &dss2_fck,      CK_243X | CK_242X),
-       CLK(NULL,       "dss_54m_fck",  &dss_54m_fck,   CK_243X | CK_242X),
+       CLK("omapfb",   "ick",          &dss_ick,       CK_243X | CK_242X),
+       CLK("omapfb",   "dss1_fck",     &dss1_fck,      CK_243X | CK_242X),
+       CLK("omapfb",   "dss2_fck",     &dss2_fck,      CK_243X | CK_242X),
+       CLK("omapfb",   "tv_fck",       &dss_54m_fck,   CK_243X | CK_242X),
        /* L3 domain clocks */
        CLK(NULL,       "core_l3_ck",   &core_l3_ck,    CK_243X | CK_242X),
        CLK(NULL,       "ssi_fck",      &ssi_ssr_sst_fck, CK_243X | CK_242X),
index a057539..ba05aa4 100644 (file)
@@ -197,11 +197,11 @@ static struct omap_clk omap34xx_clks[] = {
        CLK("omap_rng", "ick",          &rng_ick,       CK_343X),
        CLK(NULL,       "sha11_ick",    &sha11_ick,     CK_343X),
        CLK(NULL,       "des1_ick",     &des1_ick,      CK_343X),
-       CLK(NULL,       "dss1_alwon_fck", &dss1_alwon_fck, CK_343X),
-       CLK(NULL,       "dss_tv_fck",   &dss_tv_fck,    CK_343X),
-       CLK(NULL,       "dss_96m_fck",  &dss_96m_fck,   CK_343X),
-       CLK(NULL,       "dss2_alwon_fck", &dss2_alwon_fck, CK_343X),
-       CLK(NULL,       "dss_ick",      &dss_ick,       CK_343X),
+       CLK("omapfb",   "dss1_fck",     &dss1_alwon_fck, CK_343X),
+       CLK("omapfb",   "tv_fck",       &dss_tv_fck,    CK_343X),
+       CLK("omapfb",   "video_fck",    &dss_96m_fck,   CK_343X),
+       CLK("omapfb",   "dss2_fck",     &dss2_alwon_fck, CK_343X),
+       CLK("omapfb",   "ick",          &dss_ick,       CK_343X),
        CLK(NULL,       "cam_mclk",     &cam_mclk,      CK_343X),
        CLK(NULL,       "cam_ick",      &cam_ick,       CK_343X),
        CLK(NULL,       "csi2_96m_fck", &csi2_96m_fck,  CK_343X),
index dfb72f5..148cbcc 100644 (file)
@@ -880,20 +880,22 @@ static irqreturn_t omap_dispc_irq_handler(int irq, void *dev)
 
 static int get_dss_clocks(void)
 {
-       if (IS_ERR((dispc.dss_ick = clk_get(dispc.fbdev->dev, "dss_ick")))) {
-               dev_err(dispc.fbdev->dev, "can't get dss_ick\n");
+       dispc.dss_ick = clk_get(dispc.fbdev->dev, "ick");
+       if (IS_ERR(dispc.dss_ick)) {
+               dev_err(dispc.fbdev->dev, "can't get ick\n");
                return PTR_ERR(dispc.dss_ick);
        }
 
-       if (IS_ERR((dispc.dss1_fck = clk_get(dispc.fbdev->dev, "dss1_fck")))) {
+       dispc.dss1_fck = clk_get(dispc.fbdev->dev, "dss1_fck");
+       if (IS_ERR(dispc.dss1_fck)) {
                dev_err(dispc.fbdev->dev, "can't get dss1_fck\n");
                clk_put(dispc.dss_ick);
                return PTR_ERR(dispc.dss1_fck);
        }
 
-       if (IS_ERR((dispc.dss_54m_fck =
-                               clk_get(dispc.fbdev->dev, "dss_54m_fck")))) {
-               dev_err(dispc.fbdev->dev, "can't get dss_54m_fck\n");
+       dispc.dss_54m_fck = clk_get(dispc.fbdev->dev, "tv_fck");
+       if (IS_ERR(dispc.dss_54m_fck)) {
+               dev_err(dispc.fbdev->dev, "can't get tv_fck\n");
                clk_put(dispc.dss_ick);
                clk_put(dispc.dss1_fck);
                return PTR_ERR(dispc.dss_54m_fck);
index a13c8dc..9332d6c 100644 (file)
@@ -83,12 +83,14 @@ static inline u32 rfbi_read_reg(int idx)
 
 static int rfbi_get_clocks(void)
 {
-       if (IS_ERR((rfbi.dss_ick = clk_get(rfbi.fbdev->dev, "dss_ick")))) {
-               dev_err(rfbi.fbdev->dev, "can't get dss_ick\n");
+       rfbi.dss_ick = clk_get(rfbi.fbdev->dev, "ick");
+       if (IS_ERR(rfbi.dss_ick)) {
+               dev_err(rfbi.fbdev->dev, "can't get ick\n");
                return PTR_ERR(rfbi.dss_ick);
        }
 
-       if (IS_ERR((rfbi.dss1_fck = clk_get(rfbi.fbdev->dev, "dss1_fck")))) {
+       rfbi.dss1_fck = clk_get(rfbi.fbdev->dev, "dss1_fck");
+       if (IS_ERR(rfbi.dss1_fck)) {
                dev_err(rfbi.fbdev->dev, "can't get dss1_fck\n");
                clk_put(rfbi.dss_ick);
                return PTR_ERR(rfbi.dss1_fck);