Commit c7642f67 authored by Archit Taneja's avatar Archit Taneja Committed by Tomi Valkeinen

OMAP2PLUS: DSS2: Generalize external clock names in struct dss of dss.c

The dss struct in dss.c has omap2/3 specific clock names. Making them generic,
to increase readability and extendability.
Signed-off-by: default avatarSumit Semwal <sumit.semwal@ti.com>
Signed-off-by: default avatarArchit Taneja <archit@ti.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 6af9cd14
...@@ -64,10 +64,10 @@ static struct { ...@@ -64,10 +64,10 @@ static struct {
struct clk *dpll4_m4_ck; struct clk *dpll4_m4_ck;
struct clk *dss_ick; struct clk *dss_ick;
struct clk *dss1_fck; struct clk *dss_fck;
struct clk *dss2_fck; struct clk *dss_sys_clk;
struct clk *dss_54m_fck; struct clk *dss_tv_fck;
struct clk *dss_96m_fck; struct clk *dss_video_fck;
unsigned num_clks_enabled; unsigned num_clks_enabled;
unsigned long cache_req_pck; unsigned long cache_req_pck;
...@@ -750,28 +750,28 @@ static int dss_get_clocks(void) ...@@ -750,28 +750,28 @@ static int dss_get_clocks(void)
int r; int r;
dss.dss_ick = NULL; dss.dss_ick = NULL;
dss.dss1_fck = NULL; dss.dss_fck = NULL;
dss.dss2_fck = NULL; dss.dss_sys_clk = NULL;
dss.dss_54m_fck = NULL; dss.dss_tv_fck = NULL;
dss.dss_96m_fck = NULL; dss.dss_video_fck = NULL;
r = dss_get_clock(&dss.dss_ick, "ick"); r = dss_get_clock(&dss.dss_ick, "ick");
if (r) if (r)
goto err; goto err;
r = dss_get_clock(&dss.dss1_fck, "fck"); r = dss_get_clock(&dss.dss_fck, "fck");
if (r) if (r)
goto err; goto err;
r = dss_get_clock(&dss.dss2_fck, "sys_clk"); r = dss_get_clock(&dss.dss_sys_clk, "sys_clk");
if (r) if (r)
goto err; goto err;
r = dss_get_clock(&dss.dss_54m_fck, "tv_clk"); r = dss_get_clock(&dss.dss_tv_fck, "tv_clk");
if (r) if (r)
goto err; goto err;
r = dss_get_clock(&dss.dss_96m_fck, "video_clk"); r = dss_get_clock(&dss.dss_video_fck, "video_clk");
if (r) if (r)
goto err; goto err;
...@@ -780,25 +780,25 @@ static int dss_get_clocks(void) ...@@ -780,25 +780,25 @@ static int dss_get_clocks(void)
err: err:
if (dss.dss_ick) if (dss.dss_ick)
clk_put(dss.dss_ick); clk_put(dss.dss_ick);
if (dss.dss1_fck) if (dss.dss_fck)
clk_put(dss.dss1_fck); clk_put(dss.dss_fck);
if (dss.dss2_fck) if (dss.dss_sys_clk)
clk_put(dss.dss2_fck); clk_put(dss.dss_sys_clk);
if (dss.dss_54m_fck) if (dss.dss_tv_fck)
clk_put(dss.dss_54m_fck); clk_put(dss.dss_tv_fck);
if (dss.dss_96m_fck) if (dss.dss_video_fck)
clk_put(dss.dss_96m_fck); clk_put(dss.dss_video_fck);
return r; return r;
} }
static void dss_put_clocks(void) static void dss_put_clocks(void)
{ {
if (dss.dss_96m_fck) if (dss.dss_video_fck)
clk_put(dss.dss_96m_fck); clk_put(dss.dss_video_fck);
clk_put(dss.dss_54m_fck); clk_put(dss.dss_tv_fck);
clk_put(dss.dss1_fck); clk_put(dss.dss_fck);
clk_put(dss.dss2_fck); clk_put(dss.dss_sys_clk);
clk_put(dss.dss_ick); clk_put(dss.dss_ick);
} }
...@@ -808,13 +808,13 @@ unsigned long dss_clk_get_rate(enum dss_clock clk) ...@@ -808,13 +808,13 @@ unsigned long dss_clk_get_rate(enum dss_clock clk)
case DSS_CLK_ICK: case DSS_CLK_ICK:
return clk_get_rate(dss.dss_ick); return clk_get_rate(dss.dss_ick);
case DSS_CLK_FCK: case DSS_CLK_FCK:
return clk_get_rate(dss.dss1_fck); return clk_get_rate(dss.dss_fck);
case DSS_CLK_SYSCK: case DSS_CLK_SYSCK:
return clk_get_rate(dss.dss2_fck); return clk_get_rate(dss.dss_sys_clk);
case DSS_CLK_TVFCK: case DSS_CLK_TVFCK:
return clk_get_rate(dss.dss_54m_fck); return clk_get_rate(dss.dss_tv_fck);
case DSS_CLK_VIDFCK: case DSS_CLK_VIDFCK:
return clk_get_rate(dss.dss_96m_fck); return clk_get_rate(dss.dss_video_fck);
} }
BUG(); BUG();
...@@ -846,13 +846,13 @@ static void dss_clk_enable_no_ctx(enum dss_clock clks) ...@@ -846,13 +846,13 @@ static void dss_clk_enable_no_ctx(enum dss_clock clks)
if (clks & DSS_CLK_ICK) if (clks & DSS_CLK_ICK)
clk_enable(dss.dss_ick); clk_enable(dss.dss_ick);
if (clks & DSS_CLK_FCK) if (clks & DSS_CLK_FCK)
clk_enable(dss.dss1_fck); clk_enable(dss.dss_fck);
if (clks & DSS_CLK_SYSCK) if (clks & DSS_CLK_SYSCK)
clk_enable(dss.dss2_fck); clk_enable(dss.dss_sys_clk);
if (clks & DSS_CLK_TVFCK) if (clks & DSS_CLK_TVFCK)
clk_enable(dss.dss_54m_fck); clk_enable(dss.dss_tv_fck);
if (clks & DSS_CLK_VIDFCK) if (clks & DSS_CLK_VIDFCK)
clk_enable(dss.dss_96m_fck); clk_enable(dss.dss_video_fck);
dss.num_clks_enabled += num_clks; dss.num_clks_enabled += num_clks;
} }
...@@ -874,13 +874,13 @@ static void dss_clk_disable_no_ctx(enum dss_clock clks) ...@@ -874,13 +874,13 @@ static void dss_clk_disable_no_ctx(enum dss_clock clks)
if (clks & DSS_CLK_ICK) if (clks & DSS_CLK_ICK)
clk_disable(dss.dss_ick); clk_disable(dss.dss_ick);
if (clks & DSS_CLK_FCK) if (clks & DSS_CLK_FCK)
clk_disable(dss.dss1_fck); clk_disable(dss.dss_fck);
if (clks & DSS_CLK_SYSCK) if (clks & DSS_CLK_SYSCK)
clk_disable(dss.dss2_fck); clk_disable(dss.dss_sys_clk);
if (clks & DSS_CLK_TVFCK) if (clks & DSS_CLK_TVFCK)
clk_disable(dss.dss_54m_fck); clk_disable(dss.dss_tv_fck);
if (clks & DSS_CLK_VIDFCK) if (clks & DSS_CLK_VIDFCK)
clk_disable(dss.dss_96m_fck); clk_disable(dss.dss_video_fck);
dss.num_clks_enabled -= num_clks; dss.num_clks_enabled -= num_clks;
} }
...@@ -926,10 +926,10 @@ static void core_dump_clocks(struct seq_file *s) ...@@ -926,10 +926,10 @@ static void core_dump_clocks(struct seq_file *s)
int i; int i;
struct clk *clocks[5] = { struct clk *clocks[5] = {
dss.dss_ick, dss.dss_ick,
dss.dss1_fck, dss.dss_fck,
dss.dss2_fck, dss.dss_sys_clk,
dss.dss_54m_fck, dss.dss_tv_fck,
dss.dss_96m_fck dss.dss_video_fck
}; };
seq_printf(s, "- CORE -\n"); seq_printf(s, "- CORE -\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment