All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: linux-omap@vger.kernel.org
Cc: archit@ti.com, Tomi Valkeinen <tomi.valkeinen@ti.com>
Subject: [PATCH 2/5] OMAP: DSS2: DSI: fix dsi_dump_clocks()
Date: Wed, 13 Apr 2011 09:50:14 +0300	[thread overview]
Message-ID: <1302677417-4590-3-git-send-email-tomi.valkeinen@ti.com> (raw)
In-Reply-To: <1302677417-4590-1-git-send-email-tomi.valkeinen@ti.com>

On OMAP4, reading DSI_PLL_CONFIGURATION2 register requires the L3 clock
(CIO_CLK_ICG) to PLL. Currently dsi_dump_clocks() tries to read that
register without enabling the L3 clock, leading to crash if DSI is not
in use.

The status of the bit being read from DSI_PLL_CONFIGURATION2 is
available from dsi_clock_info->use_sys_clk, so we can avoid the whole
problem by just using that.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dsi.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 74334b5..1cc4f37 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1481,7 +1481,6 @@ void dsi_pll_uninit(void)
 
 void dsi_dump_clocks(struct seq_file *s)
 {
-	int clksel;
 	struct dsi_clock_info *cinfo = &dsi.current_cinfo;
 	enum omap_dss_clk_source dispc_clk_src, dsi_clk_src;
 
@@ -1490,13 +1489,10 @@ void dsi_dump_clocks(struct seq_file *s)
 
 	enable_clocks(1);
 
-	clksel = REG_GET(DSI_PLL_CONFIGURATION2, 11, 11);
-
 	seq_printf(s,	"- DSI PLL -\n");
 
 	seq_printf(s,	"dsi pll source = %s\n",
-			clksel == 0 ?
-			"dss_sys_clk" : "pclkfree");
+			cinfo->use_sys_clk ? "dss_sys_clk" : "pclkfree");
 
 	seq_printf(s,	"Fint\t\t%-16luregn %u\n", cinfo->fint, cinfo->regn);
 
-- 
1.7.1


  parent reply	other threads:[~2011-04-13  6:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13  6:50 [PATCH 0/5] OMAP: DSS2: miscellaneous patches Tomi Valkeinen
2011-04-13  6:50 ` [PATCH 1/5] OMAP: DSS2: Convert simple/strict_strto* to kstrto* Tomi Valkeinen
2011-04-13  6:50 ` Tomi Valkeinen [this message]
2011-04-13  6:50 ` [PATCH 3/5] OMAP: DSS2: improve clock debugfs output Tomi Valkeinen
2011-04-13  6:50 ` [PATCH 4/5] OMAP: DSS2: DSI: fix use_sys_clk & highfreq Tomi Valkeinen
2011-04-13  6:50 ` [PATCH 5/5] OMAP: DSS2: fix panel Kconfig dependencies Tomi Valkeinen
2011-04-15  8:11 [PATCH 0/5] OMAP: DSS: fixes for rc Tomi Valkeinen
2011-04-15  8:11 ` [PATCH 2/5] OMAP: DSS2: DSI: fix dsi_dump_clocks() Tomi Valkeinen
2011-04-15  8:11   ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1302677417-4590-3-git-send-email-tomi.valkeinen@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=archit@ti.com \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.