From patchwork Wed Apr 13 06:50:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 703101 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 p3D6ob9C022894 for ; Wed, 13 Apr 2011 06:50:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756020Ab1DMGuk (ORCPT ); Wed, 13 Apr 2011 02:50:40 -0400 Received: from na3sys009aog105.obsmtp.com ([74.125.149.75]:51904 "EHLO na3sys009aog105.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755295Ab1DMGuk (ORCPT ); Wed, 13 Apr 2011 02:50:40 -0400 Received: from mail-ey0-f182.google.com ([209.85.215.182]) (using TLSv1) by na3sys009aob105.postini.com ([74.125.148.12]) with SMTP ID DSNKTaVHvlBF/Xv8+0N31l7ZpTnGu/cLOE6v@postini.com; Tue, 12 Apr 2011 23:50:39 PDT Received: by eyg7 with SMTP id 7so194876eyg.27 for ; Tue, 12 Apr 2011 23:50:37 -0700 (PDT) Received: by 10.14.122.201 with SMTP id t49mr2858411eeh.25.1302677437555; Tue, 12 Apr 2011 23:50:37 -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.35 (version=SSLv3 cipher=OTHER); Tue, 12 Apr 2011 23:50:36 -0700 (PDT) From: Tomi Valkeinen To: linux-omap@vger.kernel.org Cc: archit@ti.com, Tomi Valkeinen Subject: [PATCH 3/5] OMAP: DSS2: improve clock debugfs output Date: Wed, 13 Apr 2011 09:50:15 +0300 Message-Id: <1302677417-4590-4-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) OMAP4 has clocks set up in a bit interesting way, causing, for example, the DSS's "ick" to be called "dss_fck". This patch changes the debugfs output to show both the DSS's name for the clock (ie. basically the clock alias), and the real name from the clock struct. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/dss.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index a8d4402..118d320 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c @@ -1026,6 +1026,14 @@ static void core_dump_clocks(struct seq_file *s) dss.dss_video_fck }; + const char *names[5] = { + "ick", + "fck", + "sys_clk", + "tv_fck", + "video_fck" + }; + seq_printf(s, "- CORE -\n"); seq_printf(s, "internal clk count\t\t%u\n", dss.num_clks_enabled); @@ -1033,8 +1041,11 @@ static void core_dump_clocks(struct seq_file *s) for (i = 0; i < 5; i++) { if (!clocks[i]) continue; - seq_printf(s, "%-15s\t%lu\t%d\n", + seq_printf(s, "%s (%s)%*s\t%lu\t%d\n", + names[i], clocks[i]->name, + 24 - strlen(names[i]) - strlen(clocks[i]->name), + "", clk_get_rate(clocks[i]), clocks[i]->usecount); }