From: Tomi Valkeinen Date: Wed, 22 Oct 2014 11:49:14 +0000 (+0300) Subject: OMAPDSS: DSI: use common DSS PLL support X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=2daea7af772ef22d902614fdd1af3bc54c82aae1;p=deliverable%2Flinux.git OMAPDSS: DSI: use common DSS PLL support Now that we have the common DSS PLL support, change DSI to use it. This results in quite a lot of changes, but almost all of them are trivial name changes. The functions to calculate and program the PLL settings can be removed from dsi.c, as the common PLL API contains the same functionality. We also need to create struct dss_pll_hw entries for PLL hardware features for different OMAP platforms, instead of using the dss_features.c as the old code does. Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index 0e9a74bb9fc2..0729c08ac75a 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c @@ -3028,7 +3028,7 @@ static void dispc_mgr_get_lcd_divisor(enum omap_channel channel, int *lck_div, unsigned long dispc_fclk_rate(void) { - struct platform_device *dsidev; + struct dss_pll *pll; unsigned long r = 0; switch (dss_get_dispc_clk_source()) { @@ -3036,12 +3036,12 @@ unsigned long dispc_fclk_rate(void) r = dss_get_dispc_clk_rate(); break; case OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC: - dsidev = dsi_get_dsidev_from_id(0); - r = dsi_get_pll_hsdiv_dispc_rate(dsidev); + pll = dss_pll_find("dsi0"); + r = pll->cinfo.clkout[0]; break; case OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC: - dsidev = dsi_get_dsidev_from_id(1); - r = dsi_get_pll_hsdiv_dispc_rate(dsidev); + pll = dss_pll_find("dsi1"); + r = pll->cinfo.clkout[0]; break; default: BUG(); @@ -3053,7 +3053,7 @@ unsigned long dispc_fclk_rate(void) unsigned long dispc_mgr_lclk_rate(enum omap_channel channel) { - struct platform_device *dsidev; + struct dss_pll *pll; int lcd; unsigned long r; u32 l; @@ -3068,12 +3068,12 @@ unsigned long dispc_mgr_lclk_rate(enum omap_channel channel) r = dss_get_dispc_clk_rate(); break; case OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC: - dsidev = dsi_get_dsidev_from_id(0); - r = dsi_get_pll_hsdiv_dispc_rate(dsidev); + pll = dss_pll_find("dsi0"); + r = pll->cinfo.clkout[0]; break; case OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC: - dsidev = dsi_get_dsidev_from_id(1); - r = dsi_get_pll_hsdiv_dispc_rate(dsidev); + pll = dss_pll_find("dsi1"); + r = pll->cinfo.clkout[0]; break; default: BUG(); diff --git a/drivers/video/fbdev/omap2/dss/dpi.c b/drivers/video/fbdev/omap2/dss/dpi.c index 81dd5e61e75e..2edf5caa002f 100644 --- a/drivers/video/fbdev/omap2/dss/dpi.c +++ b/drivers/video/fbdev/omap2/dss/dpi.c @@ -31,6 +31,7 @@ #include #include #include +#include #include