Commit 1bb47835 authored by Archit Taneja's avatar Archit Taneja Committed by Tomi Valkeinen

OMAP2PLUS: DSS2: DSI: Generalize DSI PLL Clock Naming

DSI PLL output clock names have been made more generic. The clock name
describes what the source of the clock and what clock is used for. Some of
DSI PLL parameters like dividers and DSI PLL source have also been made more
generic.

dsi1_pll_fclk and dsi2_pll_fclk have been changed as dsi_pll_hsdiv_dispc_clk
and dsi_pll_hsdiv_dsi_clk respectively. Also, the hsdividers are now named
regm_dispc and regm_dsi instead of regm3 and regm4.

Functions and macros named on the basis of these clock names have also been
made generic.
Signed-off-by: default avatarArchit Taneja <archit@ti.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 067a57e4
......@@ -403,8 +403,8 @@ struct omap_dss_device {
struct {
u16 regn;
u16 regm;
u16 regm3;
u16 regm4;
u16 regm_dispc;
u16 regm_dsi;
u16 lp_clk_div;
......
......@@ -2338,7 +2338,7 @@ unsigned long dispc_fclk_rate(void)
r = dss_clk_get_rate(DSS_CLK_FCK);
else
#ifdef CONFIG_OMAP2_DSS_DSI
r = dsi_get_dsi1_pll_rate();
r = dsi_get_pll_hsdiv_dispc_rate();
#else
BUG();
#endif
......
......@@ -63,7 +63,7 @@ static int dpi_set_dsi_clk(struct omap_dss_device *dssdev, bool is_tft,
if (r)
return r;
*fck = dsi_cinfo.dsi1_pll_fclk;
*fck = dsi_cinfo.dsi_pll_hsdiv_dispc_clk;
*lck_div = dispc_cinfo.lck_div;
*pck_div = dispc_cinfo.pck_div;
......@@ -271,7 +271,7 @@ int dpi_check_timings(struct omap_dss_device *dssdev,
if (r)
return r;
fck = dsi_cinfo.dsi1_pll_fclk;
fck = dsi_cinfo.dsi_pll_hsdiv_dispc_clk;
lck_div = dispc_cinfo.lck_div;
pck_div = dispc_cinfo.pck_div;
}
......
This diff is collapsed.
......@@ -299,7 +299,7 @@ void dss_select_dispc_clk_source(enum dss_clk_source clk_src)
b = clk_src == DSS_CLK_SRC_FCK ? 0 : 1;
if (clk_src == DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC)
dsi_wait_dsi1_pll_active();
dsi_wait_pll_hsdiv_dispc_active();
REG_FLD_MOD(DSS_CONTROL, b, 0, 0); /* DISPC_CLK_SWITCH */
......@@ -316,7 +316,7 @@ void dss_select_dsi_clk_source(enum dss_clk_source clk_src)
b = clk_src == DSS_CLK_SRC_FCK ? 0 : 1;
if (clk_src == DSS_CLK_SRC_DSI_PLL_HSDIV_DSI)
dsi_wait_dsi2_pll_active();
dsi_wait_pll_hsdiv_dsi_active();
REG_FLD_MOD(DSS_CONTROL, b, 1, 1); /* DSI_CLK_SWITCH */
......
......@@ -152,21 +152,21 @@ struct dsi_clock_info {
unsigned long fint;
unsigned long clkin4ddr;
unsigned long clkin;
unsigned long dsi1_pll_fclk;
unsigned long dsi2_pll_fclk;
unsigned long dsi_pll_hsdiv_dispc_clk; /* DSI1_PLL_CLK */
unsigned long dsi_pll_hsdiv_dsi_clk; /* DSI2_PLL_CLK */
unsigned long lp_clk;
/* dividers */
u16 regn;
u16 regm;
u16 regm3;
u16 regm4;
u16 regm_dispc; /* REGM3 */
u16 regm_dsi; /* REGM4 */
u16 lp_clk_div;
u8 highfreq;
bool use_dss2_fck;
bool use_sys_clk;
};
struct seq_file;
......@@ -278,7 +278,7 @@ void dsi_restore_context(void);
int dsi_init_display(struct omap_dss_device *display);
void dsi_irq_handler(void);
unsigned long dsi_get_dsi1_pll_rate(void);
unsigned long dsi_get_pll_hsdiv_dispc_rate(void);
int dsi_pll_set_clock_div(struct dsi_clock_info *cinfo);
int dsi_pll_calc_clock_div_pck(bool is_tft, unsigned long req_pck,
struct dsi_clock_info *cinfo,
......@@ -289,8 +289,8 @@ void dsi_pll_uninit(void);
void dsi_get_overlay_fifo_thresholds(enum omap_plane plane,
u32 fifo_size, enum omap_burst_size *burst_size,
u32 *fifo_low, u32 *fifo_high);
void dsi_wait_dsi1_pll_active(void);
void dsi_wait_dsi2_pll_active(void);
void dsi_wait_pll_hsdiv_dispc_active(void);
void dsi_wait_pll_hsdiv_dsi_active(void);
#else
static inline int dsi_init_platform_driver(void)
{
......@@ -299,10 +299,10 @@ static inline int dsi_init_platform_driver(void)
static inline void dsi_uninit_platform_driver(void)
{
}
static inline void dsi_wait_dsi1_pll_active(void)
static inline void dsi_wait_pll_hsdiv_dispc_active(void)
{
}
static inline void dsi_wait_dsi2_pll_active(void)
static inline void dsi_wait_pll_hsdiv_dsi_active(void)
{
}
#endif
......
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