From patchwork Wed Apr 13 06:50:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 703091 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3D6ob9B022894 for ; Wed, 13 Apr 2011 06:50:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755963Ab1DMGui (ORCPT ); Wed, 13 Apr 2011 02:50:38 -0400 Received: from na3sys009aog106.obsmtp.com ([74.125.149.77]:58161 "EHLO na3sys009aog106.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755295Ab1DMGuh (ORCPT ); Wed, 13 Apr 2011 02:50:37 -0400 Received: from mail-ey0-f171.google.com ([209.85.215.171]) (using TLSv1) by na3sys009aob106.postini.com ([74.125.148.12]) with SMTP ID DSNKTaVHvJ0vIXWQt/eahJl6W4cl9hwRjir9@postini.com; Tue, 12 Apr 2011 23:50:36 PDT Received: by mail-ey0-f171.google.com with SMTP id d26so129902eyd.30 for ; Tue, 12 Apr 2011 23:50:36 -0700 (PDT) Received: by 10.213.109.68 with SMTP id i4mr89634ebp.12.1302677435804; Tue, 12 Apr 2011 23:50:35 -0700 (PDT) Received: from deskari (a62-248-131-233.elisa-laajakaista.fi [62.248.131.233]) by mx.google.com with ESMTPS id q53sm194877eeh.4.2011.04.12.23.50.34 (version=SSLv3 cipher=OTHER); Tue, 12 Apr 2011 23:50:35 -0700 (PDT) From: Tomi Valkeinen To: linux-omap@vger.kernel.org Cc: archit@ti.com, Tomi Valkeinen Subject: [PATCH 2/5] OMAP: DSS2: DSI: fix dsi_dump_clocks() Date: Wed, 13 Apr 2011 09:50:14 +0300 Message-Id: <1302677417-4590-3-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1302677417-4590-1-git-send-email-tomi.valkeinen@ti.com> References: <1302677417-4590-1-git-send-email-tomi.valkeinen@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 13 Apr 2011 06:50:55 +0000 (UTC) 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 --- 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);