Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ede365a authored by Tomi Valkeinen's avatar Tomi Valkeinen
Browse files

HACK: OMAP: DSS2: clk hack for OMAP2/3



The HWMOD data for OMAP2 and 3 are currently not up to date regarding
DSS (OMAP4 HWMOD data is fine). This patch makes the DSS driver to get
the opt clocks needed for OMAP2/3 with the old clock names, thus
allowing DSS driver to use runtime PM.

The HWMOD databases should be fixes ASAP, and this patch can be reverted
after that.

Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 69f06054
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -4435,6 +4435,9 @@ static int dsi_get_clocks(struct platform_device *dsidev)

	dsi->dss_clk = clk;

	if (cpu_is_omap34xx() || cpu_is_omap3630())
		clk = clk_get(&dsidev->dev, "dss2_alwon_fck");
	else
		clk = clk_get(&dsidev->dev, "sys_clk");
	if (IS_ERR(clk)) {
		DSSERR("can't get sys_clk\n");
+5 −0
Original line number Diff line number Diff line
@@ -691,6 +691,11 @@ static void dss_put_clocks(void)
	clk_put(dss.dss_clk);
}

struct clk *dss_get_ick(void)
{
	return clk_get(&dss.pdev->dev, "ick");
}

int dss_runtime_get(void)
{
	int r;
+2 −0
Original line number Diff line number Diff line
@@ -209,6 +209,8 @@ void dss_uninit_platform_driver(void);
int dss_runtime_get(void);
void dss_runtime_put(void);

struct clk *dss_get_ick(void);

void dss_select_hdmi_venc_clk_source(enum dss_hdmi_venc_clk_source_select);
const char *dss_get_generic_clk_source_name(enum omap_dss_clk_source clk_src);
void dss_dump_clocks(struct seq_file *s);
+4 −1
Original line number Diff line number Diff line
@@ -952,6 +952,9 @@ static int omap_rfbihw_probe(struct platform_device *pdev)

	msleep(10);

	if (cpu_is_omap24xx() || cpu_is_omap34xx() || cpu_is_omap3630())
		clk = dss_get_ick();
	else
		clk = clk_get(&pdev->dev, "ick");
	if (IS_ERR(clk)) {
		DSSERR("can't get ick\n");
+4 −1
Original line number Diff line number Diff line
@@ -741,6 +741,9 @@ static int venc_get_clocks(struct platform_device *pdev)
	venc.tv_clk = clk;

	if (dss_has_feature(FEAT_VENC_REQUIRES_TV_DAC_CLK)) {
		if (cpu_is_omap34xx() || cpu_is_omap3630())
			clk = clk_get(&pdev->dev, "dss_96m_fck");
		else
			clk = clk_get(&pdev->dev, "tv_dac_clk");
		if (IS_ERR(clk)) {
			DSSERR("can't get tv_dac_clk\n");