From patchwork Fri Apr 15 08:11:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 710321 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 p3F8BaFa017297 for ; Fri, 15 Apr 2011 08:11:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750705Ab1DOILe (ORCPT ); Fri, 15 Apr 2011 04:11:34 -0400 Received: from na3sys009aog101.obsmtp.com ([74.125.149.67]:42566 "EHLO na3sys009aog101.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750973Ab1DOILa (ORCPT ); Fri, 15 Apr 2011 04:11:30 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]) (using TLSv1) by na3sys009aob101.postini.com ([74.125.148.12]) with SMTP ID DSNKTaf9sV0R8Qwk7uc8YSImRiiR/ucuOmxv@postini.com; Fri, 15 Apr 2011 01:11:30 PDT Received: by mail-wy0-f174.google.com with SMTP id 21so2668811wya.5 for ; Fri, 15 Apr 2011 01:11:29 -0700 (PDT) Received: by 10.227.177.69 with SMTP id bh5mr795222wbb.155.1302855089233; Fri, 15 Apr 2011 01:11:29 -0700 (PDT) Received: from deskari (a62-248-131-233.elisa-laajakaista.fi [62.248.131.233]) by mx.google.com with ESMTPS id y12sm1450529wby.8.2011.04.15.01.11.27 (version=SSLv3 cipher=OTHER); Fri, 15 Apr 2011 01:11:28 -0700 (PDT) From: Tomi Valkeinen To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: archit@ti.com, Tomi Valkeinen Subject: [PATCH 2/5] OMAP: DSS2: DSI: fix dsi_dump_clocks() Date: Fri, 15 Apr 2011 11:11:08 +0300 Message-Id: <1302855071-5510-3-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1302855071-5510-1-git-send-email-tomi.valkeinen@ti.com> References: <1302855071-5510-1-git-send-email-tomi.valkeinen@ti.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@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]); Fri, 15 Apr 2011 08:11:38 +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 8604153..1464ac4 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -1491,7 +1491,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 dss_clk_source dispc_clk_src, dsi_clk_src; @@ -1500,13 +1499,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);