diff options
author | Archit Taneja <archit@ti.com> | 2011-04-12 04:22:23 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-05-11 07:19:27 -0400 |
commit | 89a35e5170fc579e4fc3a1f3444c5dc1aa36904d (patch) | |
tree | 92e23633ac8b048ec8e8ae076457519e439cc066 | |
parent | 14e4d78485a50312be72a42fd42a28b5b34264dc (diff) |
OMAP2PLUS: DSS2: Change enum "dss_clk_source" to "omap_dss_clk_source"
Change enum dss_clk_source to omap_dss_clock_source and move it to
'plat/display.h'. Change the enum members to attach "OMAP_" in the beginning.
These changes are done in order to specify the clock sources for DSS in the
board file.
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 12 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dpi.c | 4 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 38 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss.c | 50 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss.h | 23 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.c | 20 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.h | 2 | ||||
-rw-r--r-- | drivers/video/omap2/dss/hdmi.c | 2 | ||||
-rw-r--r-- | include/video/omapdss.h | 9 |
9 files changed, 80 insertions, 80 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 21de352baa87..cbaaa3568455 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -2356,10 +2356,10 @@ unsigned long dispc_fclk_rate(void) | |||
2356 | unsigned long r = 0; | 2356 | unsigned long r = 0; |
2357 | 2357 | ||
2358 | switch (dss_get_dispc_clk_source()) { | 2358 | switch (dss_get_dispc_clk_source()) { |
2359 | case DSS_CLK_SRC_FCK: | 2359 | case OMAP_DSS_CLK_SRC_FCK: |
2360 | r = dss_clk_get_rate(DSS_CLK_FCK); | 2360 | r = dss_clk_get_rate(DSS_CLK_FCK); |
2361 | break; | 2361 | break; |
2362 | case DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC: | 2362 | case OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC: |
2363 | r = dsi_get_pll_hsdiv_dispc_rate(); | 2363 | r = dsi_get_pll_hsdiv_dispc_rate(); |
2364 | break; | 2364 | break; |
2365 | default: | 2365 | default: |
@@ -2380,10 +2380,10 @@ unsigned long dispc_lclk_rate(enum omap_channel channel) | |||
2380 | lcd = FLD_GET(l, 23, 16); | 2380 | lcd = FLD_GET(l, 23, 16); |
2381 | 2381 | ||
2382 | switch (dss_get_lcd_clk_source(channel)) { | 2382 | switch (dss_get_lcd_clk_source(channel)) { |
2383 | case DSS_CLK_SRC_FCK: | 2383 | case OMAP_DSS_CLK_SRC_FCK: |
2384 | r = dss_clk_get_rate(DSS_CLK_FCK); | 2384 | r = dss_clk_get_rate(DSS_CLK_FCK); |
2385 | break; | 2385 | break; |
2386 | case DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC: | 2386 | case OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC: |
2387 | r = dsi_get_pll_hsdiv_dispc_rate(); | 2387 | r = dsi_get_pll_hsdiv_dispc_rate(); |
2388 | break; | 2388 | break; |
2389 | default: | 2389 | default: |
@@ -2412,8 +2412,8 @@ void dispc_dump_clocks(struct seq_file *s) | |||
2412 | { | 2412 | { |
2413 | int lcd, pcd; | 2413 | int lcd, pcd; |
2414 | u32 l; | 2414 | u32 l; |
2415 | enum dss_clk_source dispc_clk_src = dss_get_dispc_clk_source(); | 2415 | enum omap_dss_clk_source dispc_clk_src = dss_get_dispc_clk_source(); |
2416 | enum dss_clk_source lcd_clk_src; | 2416 | enum omap_dss_clk_source lcd_clk_src; |
2417 | 2417 | ||
2418 | enable_clocks(1); | 2418 | enable_clocks(1); |
2419 | 2419 | ||
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index 8ed86f846e3f..47c8a9d83586 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c | |||
@@ -57,7 +57,7 @@ static int dpi_set_dsi_clk(struct omap_dss_device *dssdev, bool is_tft, | |||
57 | if (r) | 57 | if (r) |
58 | return r; | 58 | return r; |
59 | 59 | ||
60 | dss_select_dispc_clk_source(DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC); | 60 | dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC); |
61 | 61 | ||
62 | r = dispc_set_clock_div(dssdev->manager->id, &dispc_cinfo); | 62 | r = dispc_set_clock_div(dssdev->manager->id, &dispc_cinfo); |
63 | if (r) | 63 | if (r) |
@@ -217,7 +217,7 @@ void omapdss_dpi_display_disable(struct omap_dss_device *dssdev) | |||
217 | dssdev->manager->disable(dssdev->manager); | 217 | dssdev->manager->disable(dssdev->manager); |
218 | 218 | ||
219 | #ifdef CONFIG_OMAP2_DSS_USE_DSI_PLL | 219 | #ifdef CONFIG_OMAP2_DSS_USE_DSI_PLL |
220 | dss_select_dispc_clk_source(DSS_CLK_SRC_FCK); | 220 | dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_FCK); |
221 | dsi_pll_uninit(); | 221 | dsi_pll_uninit(); |
222 | dss_clk_disable(DSS_CLK_SYSCK); | 222 | dss_clk_disable(DSS_CLK_SYSCK); |
223 | #endif | 223 | #endif |
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index e89144f719c3..abfe7bfb8bc5 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -1009,7 +1009,7 @@ static unsigned long dsi_fclk_rate(void) | |||
1009 | { | 1009 | { |
1010 | unsigned long r; | 1010 | unsigned long r; |
1011 | 1011 | ||
1012 | if (dss_get_dsi_clk_source() == DSS_CLK_SRC_FCK) { | 1012 | if (dss_get_dsi_clk_source() == OMAP_DSS_CLK_SRC_FCK) { |
1013 | /* DSI FCLK source is DSS_CLK_FCK */ | 1013 | /* DSI FCLK source is DSS_CLK_FCK */ |
1014 | r = dss_clk_get_rate(DSS_CLK_FCK); | 1014 | r = dss_clk_get_rate(DSS_CLK_FCK); |
1015 | } else { | 1015 | } else { |
@@ -1317,12 +1317,12 @@ int dsi_pll_set_clock_div(struct dsi_clock_info *cinfo) | |||
1317 | DSSDBG("Clock lane freq %ld Hz\n", cinfo->clkin4ddr / 4); | 1317 | DSSDBG("Clock lane freq %ld Hz\n", cinfo->clkin4ddr / 4); |
1318 | 1318 | ||
1319 | DSSDBG("regm_dispc = %d, %s (%s) = %lu\n", cinfo->regm_dispc, | 1319 | DSSDBG("regm_dispc = %d, %s (%s) = %lu\n", cinfo->regm_dispc, |
1320 | dss_get_generic_clk_source_name(DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC), | 1320 | dss_get_generic_clk_source_name(OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC), |
1321 | dss_feat_get_clk_source_name(DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC), | 1321 | dss_feat_get_clk_source_name(OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC), |
1322 | cinfo->dsi_pll_hsdiv_dispc_clk); | 1322 | cinfo->dsi_pll_hsdiv_dispc_clk); |
1323 | DSSDBG("regm_dsi = %d, %s (%s) = %lu\n", cinfo->regm_dsi, | 1323 | DSSDBG("regm_dsi = %d, %s (%s) = %lu\n", cinfo->regm_dsi, |
1324 | dss_get_generic_clk_source_name(DSS_CLK_SRC_DSI_PLL_HSDIV_DSI), | 1324 | dss_get_generic_clk_source_name(OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI), |
1325 | dss_feat_get_clk_source_name(DSS_CLK_SRC_DSI_PLL_HSDIV_DSI), | 1325 | dss_feat_get_clk_source_name(OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI), |
1326 | cinfo->dsi_pll_hsdiv_dsi_clk); | 1326 | cinfo->dsi_pll_hsdiv_dsi_clk); |
1327 | 1327 | ||
1328 | dss_feat_get_reg_field(FEAT_REG_DSIPLL_REGN, ®n_start, ®n_end); | 1328 | dss_feat_get_reg_field(FEAT_REG_DSIPLL_REGN, ®n_start, ®n_end); |
@@ -1497,7 +1497,7 @@ void dsi_pll_uninit(void) | |||
1497 | void dsi_dump_clocks(struct seq_file *s) | 1497 | void dsi_dump_clocks(struct seq_file *s) |
1498 | { | 1498 | { |
1499 | struct dsi_clock_info *cinfo = &dsi.current_cinfo; | 1499 | struct dsi_clock_info *cinfo = &dsi.current_cinfo; |
1500 | enum dss_clk_source dispc_clk_src, dsi_clk_src; | 1500 | enum omap_dss_clk_source dispc_clk_src, dsi_clk_src; |
1501 | 1501 | ||
1502 | dispc_clk_src = dss_get_dispc_clk_source(); | 1502 | dispc_clk_src = dss_get_dispc_clk_source(); |
1503 | dsi_clk_src = dss_get_dsi_clk_source(); | 1503 | dsi_clk_src = dss_get_dsi_clk_source(); |
@@ -1519,7 +1519,7 @@ void dsi_dump_clocks(struct seq_file *s) | |||
1519 | dss_feat_get_clk_source_name(dispc_clk_src), | 1519 | dss_feat_get_clk_source_name(dispc_clk_src), |
1520 | cinfo->dsi_pll_hsdiv_dispc_clk, | 1520 | cinfo->dsi_pll_hsdiv_dispc_clk, |
1521 | cinfo->regm_dispc, | 1521 | cinfo->regm_dispc, |
1522 | dispc_clk_src == DSS_CLK_SRC_FCK ? | 1522 | dispc_clk_src == OMAP_DSS_CLK_SRC_FCK ? |
1523 | "off" : "on"); | 1523 | "off" : "on"); |
1524 | 1524 | ||
1525 | seq_printf(s, "%s (%s)\t%-16luregm_dsi %u\t(%s)\n", | 1525 | seq_printf(s, "%s (%s)\t%-16luregm_dsi %u\t(%s)\n", |
@@ -1527,7 +1527,7 @@ void dsi_dump_clocks(struct seq_file *s) | |||
1527 | dss_feat_get_clk_source_name(dsi_clk_src), | 1527 | dss_feat_get_clk_source_name(dsi_clk_src), |
1528 | cinfo->dsi_pll_hsdiv_dsi_clk, | 1528 | cinfo->dsi_pll_hsdiv_dsi_clk, |
1529 | cinfo->regm_dsi, | 1529 | cinfo->regm_dsi, |
1530 | dsi_clk_src == DSS_CLK_SRC_FCK ? | 1530 | dsi_clk_src == OMAP_DSS_CLK_SRC_FCK ? |
1531 | "off" : "on"); | 1531 | "off" : "on"); |
1532 | 1532 | ||
1533 | seq_printf(s, "- DSI -\n"); | 1533 | seq_printf(s, "- DSI -\n"); |
@@ -3455,10 +3455,10 @@ static int dsi_display_init_dsi(struct omap_dss_device *dssdev) | |||
3455 | if (r) | 3455 | if (r) |
3456 | goto err1; | 3456 | goto err1; |
3457 | 3457 | ||
3458 | dss_select_dispc_clk_source(DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC); | 3458 | dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC); |
3459 | dss_select_dsi_clk_source(DSS_CLK_SRC_DSI_PLL_HSDIV_DSI); | 3459 | dss_select_dsi_clk_source(OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI); |
3460 | dss_select_lcd_clk_source(dssdev->manager->id, | 3460 | dss_select_lcd_clk_source(dssdev->manager->id, |
3461 | DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC); | 3461 | OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC); |
3462 | 3462 | ||
3463 | DSSDBG("PLL OK\n"); | 3463 | DSSDBG("PLL OK\n"); |
3464 | 3464 | ||
@@ -3494,8 +3494,8 @@ static int dsi_display_init_dsi(struct omap_dss_device *dssdev) | |||
3494 | err3: | 3494 | err3: |
3495 | dsi_complexio_uninit(); | 3495 | dsi_complexio_uninit(); |
3496 | err2: | 3496 | err2: |
3497 | dss_select_dispc_clk_source(DSS_CLK_SRC_FCK); | 3497 | dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_FCK); |
3498 | dss_select_dsi_clk_source(DSS_CLK_SRC_FCK); | 3498 | dss_select_dsi_clk_source(OMAP_DSS_CLK_SRC_FCK); |
3499 | err1: | 3499 | err1: |
3500 | dsi_pll_uninit(); | 3500 | dsi_pll_uninit(); |
3501 | err0: | 3501 | err0: |
@@ -3511,8 +3511,8 @@ static void dsi_display_uninit_dsi(struct omap_dss_device *dssdev) | |||
3511 | dsi_vc_enable(2, 0); | 3511 | dsi_vc_enable(2, 0); |
3512 | dsi_vc_enable(3, 0); | 3512 | dsi_vc_enable(3, 0); |
3513 | 3513 | ||
3514 | dss_select_dispc_clk_source(DSS_CLK_SRC_FCK); | 3514 | dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_FCK); |
3515 | dss_select_dsi_clk_source(DSS_CLK_SRC_FCK); | 3515 | dss_select_dsi_clk_source(OMAP_DSS_CLK_SRC_FCK); |
3516 | dsi_complexio_uninit(); | 3516 | dsi_complexio_uninit(); |
3517 | dsi_pll_uninit(); | 3517 | dsi_pll_uninit(); |
3518 | } | 3518 | } |
@@ -3703,16 +3703,16 @@ void dsi_wait_pll_hsdiv_dispc_active(void) | |||
3703 | { | 3703 | { |
3704 | if (wait_for_bit_change(DSI_PLL_STATUS, 7, 1) != 1) | 3704 | if (wait_for_bit_change(DSI_PLL_STATUS, 7, 1) != 1) |
3705 | DSSERR("%s (%s) not active\n", | 3705 | DSSERR("%s (%s) not active\n", |
3706 | dss_get_generic_clk_source_name(DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC), | 3706 | dss_get_generic_clk_source_name(OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC), |
3707 | dss_feat_get_clk_source_name(DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC)); | 3707 | dss_feat_get_clk_source_name(OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC)); |
3708 | } | 3708 | } |
3709 | 3709 | ||
3710 | void dsi_wait_pll_hsdiv_dsi_active(void) | 3710 | void dsi_wait_pll_hsdiv_dsi_active(void) |
3711 | { | 3711 | { |
3712 | if (wait_for_bit_change(DSI_PLL_STATUS, 8, 1) != 1) | 3712 | if (wait_for_bit_change(DSI_PLL_STATUS, 8, 1) != 1) |
3713 | DSSERR("%s (%s) not active\n", | 3713 | DSSERR("%s (%s) not active\n", |
3714 | dss_get_generic_clk_source_name(DSS_CLK_SRC_DSI_PLL_HSDIV_DSI), | 3714 | dss_get_generic_clk_source_name(OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI), |
3715 | dss_feat_get_clk_source_name(DSS_CLK_SRC_DSI_PLL_HSDIV_DSI)); | 3715 | dss_feat_get_clk_source_name(OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI)); |
3716 | } | 3716 | } |
3717 | 3717 | ||
3718 | static void dsi_calc_clock_param_ranges(void) | 3718 | static void dsi_calc_clock_param_ranges(void) |
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 702874a2c66d..10ed2b2cc72b 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c | |||
@@ -75,17 +75,17 @@ static struct { | |||
75 | struct dss_clock_info cache_dss_cinfo; | 75 | struct dss_clock_info cache_dss_cinfo; |
76 | struct dispc_clock_info cache_dispc_cinfo; | 76 | struct dispc_clock_info cache_dispc_cinfo; |
77 | 77 | ||
78 | enum dss_clk_source dsi_clk_source; | 78 | enum omap_dss_clk_source dsi_clk_source; |
79 | enum dss_clk_source dispc_clk_source; | 79 | enum omap_dss_clk_source dispc_clk_source; |
80 | enum dss_clk_source lcd_clk_source[MAX_DSS_LCD_MANAGERS]; | 80 | enum omap_dss_clk_source lcd_clk_source[MAX_DSS_LCD_MANAGERS]; |
81 | 81 | ||
82 | u32 ctx[DSS_SZ_REGS / sizeof(u32)]; | 82 | u32 ctx[DSS_SZ_REGS / sizeof(u32)]; |
83 | } dss; | 83 | } dss; |
84 | 84 | ||
85 | static const char * const dss_generic_clk_source_names[] = { | 85 | static const char * const dss_generic_clk_source_names[] = { |
86 | [DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC] = "DSI_PLL_HSDIV_DISPC", | 86 | [OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC] = "DSI_PLL_HSDIV_DISPC", |
87 | [DSS_CLK_SRC_DSI_PLL_HSDIV_DSI] = "DSI_PLL_HSDIV_DSI", | 87 | [OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI] = "DSI_PLL_HSDIV_DSI", |
88 | [DSS_CLK_SRC_FCK] = "DSS_FCK", | 88 | [OMAP_DSS_CLK_SRC_FCK] = "DSS_FCK", |
89 | }; | 89 | }; |
90 | 90 | ||
91 | static void dss_clk_enable_all_no_ctx(void); | 91 | static void dss_clk_enable_all_no_ctx(void); |
@@ -230,7 +230,7 @@ void dss_sdi_disable(void) | |||
230 | REG_FLD_MOD(DSS_PLL_CONTROL, 0, 18, 18); /* SDI_PLL_SYSRESET */ | 230 | REG_FLD_MOD(DSS_PLL_CONTROL, 0, 18, 18); /* SDI_PLL_SYSRESET */ |
231 | } | 231 | } |
232 | 232 | ||
233 | const char *dss_get_generic_clk_source_name(enum dss_clk_source clk_src) | 233 | const char *dss_get_generic_clk_source_name(enum omap_dss_clk_source clk_src) |
234 | { | 234 | { |
235 | return dss_generic_clk_source_names[clk_src]; | 235 | return dss_generic_clk_source_names[clk_src]; |
236 | } | 236 | } |
@@ -246,8 +246,8 @@ void dss_dump_clocks(struct seq_file *s) | |||
246 | 246 | ||
247 | seq_printf(s, "- DSS -\n"); | 247 | seq_printf(s, "- DSS -\n"); |
248 | 248 | ||
249 | fclk_name = dss_get_generic_clk_source_name(DSS_CLK_SRC_FCK); | 249 | fclk_name = dss_get_generic_clk_source_name(OMAP_DSS_CLK_SRC_FCK); |
250 | fclk_real_name = dss_feat_get_clk_source_name(DSS_CLK_SRC_FCK); | 250 | fclk_real_name = dss_feat_get_clk_source_name(OMAP_DSS_CLK_SRC_FCK); |
251 | fclk_rate = dss_clk_get_rate(DSS_CLK_FCK); | 251 | fclk_rate = dss_clk_get_rate(DSS_CLK_FCK); |
252 | 252 | ||
253 | if (dss.dpll4_m4_ck) { | 253 | if (dss.dpll4_m4_ck) { |
@@ -300,16 +300,16 @@ void dss_dump_regs(struct seq_file *s) | |||
300 | #undef DUMPREG | 300 | #undef DUMPREG |
301 | } | 301 | } |
302 | 302 | ||
303 | void dss_select_dispc_clk_source(enum dss_clk_source clk_src) | 303 | void dss_select_dispc_clk_source(enum omap_dss_clk_source clk_src) |
304 | { | 304 | { |
305 | int b; | 305 | int b; |
306 | u8 start, end; | 306 | u8 start, end; |
307 | 307 | ||
308 | switch (clk_src) { | 308 | switch (clk_src) { |
309 | case DSS_CLK_SRC_FCK: | 309 | case OMAP_DSS_CLK_SRC_FCK: |
310 | b = 0; | 310 | b = 0; |
311 | break; | 311 | break; |
312 | case DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC: | 312 | case OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC: |
313 | b = 1; | 313 | b = 1; |
314 | dsi_wait_pll_hsdiv_dispc_active(); | 314 | dsi_wait_pll_hsdiv_dispc_active(); |
315 | break; | 315 | break; |
@@ -324,15 +324,15 @@ void dss_select_dispc_clk_source(enum dss_clk_source clk_src) | |||
324 | dss.dispc_clk_source = clk_src; | 324 | dss.dispc_clk_source = clk_src; |
325 | } | 325 | } |
326 | 326 | ||
327 | void dss_select_dsi_clk_source(enum dss_clk_source clk_src) | 327 | void dss_select_dsi_clk_source(enum omap_dss_clk_source clk_src) |
328 | { | 328 | { |
329 | int b; | 329 | int b; |
330 | 330 | ||
331 | switch (clk_src) { | 331 | switch (clk_src) { |
332 | case DSS_CLK_SRC_FCK: | 332 | case OMAP_DSS_CLK_SRC_FCK: |
333 | b = 0; | 333 | b = 0; |
334 | break; | 334 | break; |
335 | case DSS_CLK_SRC_DSI_PLL_HSDIV_DSI: | 335 | case OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI: |
336 | b = 1; | 336 | b = 1; |
337 | dsi_wait_pll_hsdiv_dsi_active(); | 337 | dsi_wait_pll_hsdiv_dsi_active(); |
338 | break; | 338 | break; |
@@ -346,7 +346,7 @@ void dss_select_dsi_clk_source(enum dss_clk_source clk_src) | |||
346 | } | 346 | } |
347 | 347 | ||
348 | void dss_select_lcd_clk_source(enum omap_channel channel, | 348 | void dss_select_lcd_clk_source(enum omap_channel channel, |
349 | enum dss_clk_source clk_src) | 349 | enum omap_dss_clk_source clk_src) |
350 | { | 350 | { |
351 | int b, ix, pos; | 351 | int b, ix, pos; |
352 | 352 | ||
@@ -354,10 +354,10 @@ void dss_select_lcd_clk_source(enum omap_channel channel, | |||
354 | return; | 354 | return; |
355 | 355 | ||
356 | switch (clk_src) { | 356 | switch (clk_src) { |
357 | case DSS_CLK_SRC_FCK: | 357 | case OMAP_DSS_CLK_SRC_FCK: |
358 | b = 0; | 358 | b = 0; |
359 | break; | 359 | break; |
360 | case DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC: | 360 | case OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC: |
361 | BUG_ON(channel != OMAP_DSS_CHANNEL_LCD); | 361 | BUG_ON(channel != OMAP_DSS_CHANNEL_LCD); |
362 | b = 1; | 362 | b = 1; |
363 | dsi_wait_pll_hsdiv_dispc_active(); | 363 | dsi_wait_pll_hsdiv_dispc_active(); |
@@ -373,17 +373,17 @@ void dss_select_lcd_clk_source(enum omap_channel channel, | |||
373 | dss.lcd_clk_source[ix] = clk_src; | 373 | dss.lcd_clk_source[ix] = clk_src; |
374 | } | 374 | } |
375 | 375 | ||
376 | enum dss_clk_source dss_get_dispc_clk_source(void) | 376 | enum omap_dss_clk_source dss_get_dispc_clk_source(void) |
377 | { | 377 | { |
378 | return dss.dispc_clk_source; | 378 | return dss.dispc_clk_source; |
379 | } | 379 | } |
380 | 380 | ||
381 | enum dss_clk_source dss_get_dsi_clk_source(void) | 381 | enum omap_dss_clk_source dss_get_dsi_clk_source(void) |
382 | { | 382 | { |
383 | return dss.dsi_clk_source; | 383 | return dss.dsi_clk_source; |
384 | } | 384 | } |
385 | 385 | ||
386 | enum dss_clk_source dss_get_lcd_clk_source(enum omap_channel channel) | 386 | enum omap_dss_clk_source dss_get_lcd_clk_source(enum omap_channel channel) |
387 | { | 387 | { |
388 | if (dss_has_feature(FEAT_LCD_CLK_SRC)) { | 388 | if (dss_has_feature(FEAT_LCD_CLK_SRC)) { |
389 | int ix = channel == OMAP_DSS_CHANNEL_LCD ? 0 : 1; | 389 | int ix = channel == OMAP_DSS_CHANNEL_LCD ? 0 : 1; |
@@ -711,10 +711,10 @@ static int dss_init(void) | |||
711 | 711 | ||
712 | dss.dpll4_m4_ck = dpll4_m4_ck; | 712 | dss.dpll4_m4_ck = dpll4_m4_ck; |
713 | 713 | ||
714 | dss.dsi_clk_source = DSS_CLK_SRC_FCK; | 714 | dss.dsi_clk_source = OMAP_DSS_CLK_SRC_FCK; |
715 | dss.dispc_clk_source = DSS_CLK_SRC_FCK; | 715 | dss.dispc_clk_source = OMAP_DSS_CLK_SRC_FCK; |
716 | dss.lcd_clk_source[0] = DSS_CLK_SRC_FCK; | 716 | dss.lcd_clk_source[0] = OMAP_DSS_CLK_SRC_FCK; |
717 | dss.lcd_clk_source[1] = DSS_CLK_SRC_FCK; | 717 | dss.lcd_clk_source[1] = OMAP_DSS_CLK_SRC_FCK; |
718 | 718 | ||
719 | dss_save_context(); | 719 | dss_save_context(); |
720 | 720 | ||
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index c2f582bb19c0..d3b5697134e1 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h | |||
@@ -117,15 +117,6 @@ enum dss_clock { | |||
117 | DSS_CLK_VIDFCK = 1 << 4, /* DSS_96M_FCLK*/ | 117 | DSS_CLK_VIDFCK = 1 << 4, /* DSS_96M_FCLK*/ |
118 | }; | 118 | }; |
119 | 119 | ||
120 | enum dss_clk_source { | ||
121 | DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC, /* OMAP3: DSI1_PLL_FCLK | ||
122 | * OMAP4: PLL1_CLK1 */ | ||
123 | DSS_CLK_SRC_DSI_PLL_HSDIV_DSI, /* OMAP3: DSI2_PLL_FCLK | ||
124 | * OMAP4: PLL1_CLK2 */ | ||
125 | DSS_CLK_SRC_FCK, /* OMAP2/3: DSS1_ALWON_FCLK | ||
126 | * OMAP4: DSS_FCLK */ | ||
127 | }; | ||
128 | |||
129 | enum dss_hdmi_venc_clk_source_select { | 120 | enum dss_hdmi_venc_clk_source_select { |
130 | DSS_VENC_TV_CLK = 0, | 121 | DSS_VENC_TV_CLK = 0, |
131 | DSS_HDMI_M_PCLK = 1, | 122 | DSS_HDMI_M_PCLK = 1, |
@@ -236,7 +227,7 @@ void dss_clk_enable(enum dss_clock clks); | |||
236 | void dss_clk_disable(enum dss_clock clks); | 227 | void dss_clk_disable(enum dss_clock clks); |
237 | unsigned long dss_clk_get_rate(enum dss_clock clk); | 228 | unsigned long dss_clk_get_rate(enum dss_clock clk); |
238 | int dss_need_ctx_restore(void); | 229 | int dss_need_ctx_restore(void); |
239 | const char *dss_get_generic_clk_source_name(enum dss_clk_source clk_src); | 230 | const char *dss_get_generic_clk_source_name(enum omap_dss_clk_source clk_src); |
240 | void dss_dump_clocks(struct seq_file *s); | 231 | void dss_dump_clocks(struct seq_file *s); |
241 | 232 | ||
242 | void dss_dump_regs(struct seq_file *s); | 233 | void dss_dump_regs(struct seq_file *s); |
@@ -248,13 +239,13 @@ void dss_sdi_init(u8 datapairs); | |||
248 | int dss_sdi_enable(void); | 239 | int dss_sdi_enable(void); |
249 | void dss_sdi_disable(void); | 240 | void dss_sdi_disable(void); |
250 | 241 | ||
251 | void dss_select_dispc_clk_source(enum dss_clk_source clk_src); | 242 | void dss_select_dispc_clk_source(enum omap_dss_clk_source clk_src); |
252 | void dss_select_dsi_clk_source(enum dss_clk_source clk_src); | 243 | void dss_select_dsi_clk_source(enum omap_dss_clk_source clk_src); |
253 | void dss_select_lcd_clk_source(enum omap_channel channel, | 244 | void dss_select_lcd_clk_source(enum omap_channel channel, |
254 | enum dss_clk_source clk_src); | 245 | enum omap_dss_clk_source clk_src); |
255 | enum dss_clk_source dss_get_dispc_clk_source(void); | 246 | enum omap_dss_clk_source dss_get_dispc_clk_source(void); |
256 | enum dss_clk_source dss_get_dsi_clk_source(void); | 247 | enum omap_dss_clk_source dss_get_dsi_clk_source(void); |
257 | enum dss_clk_source dss_get_lcd_clk_source(enum omap_channel channel); | 248 | enum omap_dss_clk_source dss_get_lcd_clk_source(enum omap_channel channel); |
258 | 249 | ||
259 | void dss_set_venc_output(enum omap_dss_venc_type type); | 250 | void dss_set_venc_output(enum omap_dss_venc_type type); |
260 | void dss_set_dac_pwrdn_bgz(bool enable); | 251 | void dss_set_dac_pwrdn_bgz(bool enable); |
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index 5bf156b812f7..5a81c652e604 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c | |||
@@ -178,21 +178,21 @@ static const enum omap_color_mode omap3_dss_supported_color_modes[] = { | |||
178 | }; | 178 | }; |
179 | 179 | ||
180 | static const char * const omap2_dss_clk_source_names[] = { | 180 | static const char * const omap2_dss_clk_source_names[] = { |
181 | [DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC] = "N/A", | 181 | [OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC] = "N/A", |
182 | [DSS_CLK_SRC_DSI_PLL_HSDIV_DSI] = "N/A", | 182 | [OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI] = "N/A", |
183 | [DSS_CLK_SRC_FCK] = "DSS_FCLK1", | 183 | [OMAP_DSS_CLK_SRC_FCK] = "DSS_FCLK1", |
184 | }; | 184 | }; |
185 | 185 | ||
186 | static const char * const omap3_dss_clk_source_names[] = { | 186 | static const char * const omap3_dss_clk_source_names[] = { |
187 | [DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC] = "DSI1_PLL_FCLK", | 187 | [OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC] = "DSI1_PLL_FCLK", |
188 | [DSS_CLK_SRC_DSI_PLL_HSDIV_DSI] = "DSI2_PLL_FCLK", | 188 | [OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI] = "DSI2_PLL_FCLK", |
189 | [DSS_CLK_SRC_FCK] = "DSS1_ALWON_FCLK", | 189 | [OMAP_DSS_CLK_SRC_FCK] = "DSS1_ALWON_FCLK", |
190 | }; | 190 | }; |
191 | 191 | ||
192 | static const char * const omap4_dss_clk_source_names[] = { | 192 | static const char * const omap4_dss_clk_source_names[] = { |
193 | [DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC] = "PLL1_CLK1", | 193 | [OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC] = "PLL1_CLK1", |
194 | [DSS_CLK_SRC_DSI_PLL_HSDIV_DSI] = "PLL1_CLK2", | 194 | [OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI] = "PLL1_CLK2", |
195 | [DSS_CLK_SRC_FCK] = "DSS_FCLK", | 195 | [OMAP_DSS_CLK_SRC_FCK] = "DSS_FCLK", |
196 | }; | 196 | }; |
197 | 197 | ||
198 | static const struct dss_param_range omap2_dss_param_range[] = { | 198 | static const struct dss_param_range omap2_dss_param_range[] = { |
@@ -340,7 +340,7 @@ bool dss_feat_color_mode_supported(enum omap_plane plane, | |||
340 | color_mode; | 340 | color_mode; |
341 | } | 341 | } |
342 | 342 | ||
343 | const char *dss_feat_get_clk_source_name(enum dss_clk_source id) | 343 | const char *dss_feat_get_clk_source_name(enum omap_dss_clk_source id) |
344 | { | 344 | { |
345 | return omap_current_dss_features->clksrc_names[id]; | 345 | return omap_current_dss_features->clksrc_names[id]; |
346 | } | 346 | } |
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h index ae25be2021ff..d03f558d181b 100644 --- a/drivers/video/omap2/dss/dss_features.h +++ b/drivers/video/omap2/dss/dss_features.h | |||
@@ -83,7 +83,7 @@ enum omap_display_type dss_feat_get_supported_displays(enum omap_channel channel | |||
83 | enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane); | 83 | enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane); |
84 | bool dss_feat_color_mode_supported(enum omap_plane plane, | 84 | bool dss_feat_color_mode_supported(enum omap_plane plane, |
85 | enum omap_color_mode color_mode); | 85 | enum omap_color_mode color_mode); |
86 | const char *dss_feat_get_clk_source_name(enum dss_clk_source id); | 86 | const char *dss_feat_get_clk_source_name(enum omap_dss_clk_source id); |
87 | 87 | ||
88 | bool dss_has_feature(enum dss_feat_id id); | 88 | bool dss_has_feature(enum dss_feat_id id); |
89 | void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end); | 89 | void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end); |
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 86e32bdcfbc4..8af1dc48453d 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c | |||
@@ -1160,7 +1160,7 @@ static int hdmi_power_on(struct omap_dss_device *dssdev) | |||
1160 | * dynamically by user. This can be moved to single location , say | 1160 | * dynamically by user. This can be moved to single location , say |
1161 | * Boardfile. | 1161 | * Boardfile. |
1162 | */ | 1162 | */ |
1163 | dss_select_dispc_clk_source(DSS_CLK_SRC_FCK); | 1163 | dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_FCK); |
1164 | 1164 | ||
1165 | /* bypass TV gamma table */ | 1165 | /* bypass TV gamma table */ |
1166 | dispc_enable_gamma_table(0); | 1166 | dispc_enable_gamma_table(0); |
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 4beaee19f5f9..c17dd59d9853 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -172,6 +172,15 @@ enum omap_overlay_manager_caps { | |||
172 | OMAP_DSS_OVL_MGR_CAP_DISPC = 1 << 0, | 172 | OMAP_DSS_OVL_MGR_CAP_DISPC = 1 << 0, |
173 | }; | 173 | }; |
174 | 174 | ||
175 | enum omap_dss_clk_source { | ||
176 | OMAP_DSS_CLK_SRC_FCK = 0, /* OMAP2/3: DSS1_ALWON_FCLK | ||
177 | * OMAP4: DSS_FCLK */ | ||
178 | OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC, /* OMAP3: DSI1_PLL_FCLK | ||
179 | * OMAP4: PLL1_CLK1 */ | ||
180 | OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI, /* OMAP3: DSI2_PLL_FCLK | ||
181 | * OMAP4: PLL1_CLK2 */ | ||
182 | }; | ||
183 | |||
175 | /* RFBI */ | 184 | /* RFBI */ |
176 | 185 | ||
177 | struct rfbi_timings { | 186 | struct rfbi_timings { |