From patchwork Mon Nov 11 20:06:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 3169571 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9AEED9F39E for ; Mon, 11 Nov 2013 20:10:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6CBA9203F3 for ; Mon, 11 Nov 2013 20:10:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F2FD6203F4 for ; Mon, 11 Nov 2013 20:10:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752784Ab3KKUJ7 (ORCPT ); Mon, 11 Nov 2013 15:09:59 -0500 Received: from mail-ee0-f41.google.com ([74.125.83.41]:54936 "EHLO mail-ee0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751036Ab3KKUJr (ORCPT ); Mon, 11 Nov 2013 15:09:47 -0500 Received: by mail-ee0-f41.google.com with SMTP id e53so2722062eek.28 for ; Mon, 11 Nov 2013 12:09:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WalxXdYZ1E2V/nRgP45FEyx/1EwqH0i8IllgECzlxCU=; b=rKEkbZLG5Rve5vQkO50N0FvAi8b88l7D5FJG6Yq6Fvetc0Ez1zkuae0kt3pV9+QOmZ ZxXH+uAYMR8MJEGu6OpXyJvphLxSHV3eJzgFyHrceYcZBggJ8SBrpXmd+O8lK7kaAiBy oNaEIKwK/rmPIg/QmvSpNxAwwJn19tQ17vkXbWXy54MGerdrZkyDL11kqJjVkyjWAkpR KBSlCmq0V7407p9RtLjZpovhAlGNq4QmlUkO3q9qWSksw6ZdboRRqwqfwlo4D63JA3Sn 3zbZYK09PniFFcGss2Brn4dA9dPOTopGxl9KpewHyRfpSNp4d88NJ58jE+NcwkPh06/p i61g== X-Received: by 10.15.73.130 with SMTP id h2mr5006049eey.56.1384200585790; Mon, 11 Nov 2013 12:09:45 -0800 (PST) Received: from localhost (cust.static.84-253-15-149.cybernet.ch. [84.253.15.149]) by mx.google.com with ESMTPSA id 1sm6034690eeg.4.2013.11.11.12.09.44 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 11 Nov 2013 12:09:45 -0800 (PST) From: Andreas Fenkart To: Chris Ball Cc: Tony Lindgren , Grant Likely , Felipe Balbi , Balaji T K , zonque@gmail.com, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, Andreas Fenkart Subject: [PATCH 3/3] mmc: omap_hsmmc: Extend debugfs for SDIO IRQ, GPIO and pinmux. Date: Mon, 11 Nov 2013 21:06:45 +0100 Message-Id: <1384200405-8402-4-git-send-email-afenkart@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1384200405-8402-1-git-send-email-afenkart@gmail.com> References: <1384200405-8402-1-git-send-email-afenkart@gmail.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add SDIO IRQ entries to debugfs entry. Note that PSTATE shows current state of data lines, incl. SDIO IRQ pending Signed-off-by: Andreas Fenkart --- drivers/mmc/host/omap_hsmmc.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 5a7fb4b..c4f71d0 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -81,6 +81,7 @@ static void apply_clk_hack(struct device *dev) #define OMAP_HSMMC_RSP54 0x0118 #define OMAP_HSMMC_RSP76 0x011C #define OMAP_HSMMC_DATA 0x0120 +#define OMAP_HSMMC_PSTATE 0x0124 #define OMAP_HSMMC_HCTL 0x0128 #define OMAP_HSMMC_SYSCTL 0x012C #define OMAP_HSMMC_STAT 0x0130 @@ -1794,6 +1795,20 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data) { struct mmc_host *mmc = s->private; struct omap_hsmmc_host *host = mmc_priv(mmc); + bool suspended; + + seq_puts(s, "\n"); + seq_printf(s, "sdio irq\t%s\n", ((host->flags & HSMMC_SDIO_IRQ_ENABLED) + ? "enabled" : "disabled")); + suspended = host->dev->power.runtime_status != RPM_ACTIVE; + if (host->flags & HSMMC_SWAKEUP_QUIRK) { + seq_printf(s, "pinmux config\t%s\n", (suspended ? + "gpio" : "sdio")); + if (suspended) + seq_printf(s, "sdio irq pin\t%s\n", + gpio_get_value(mmc_slot(host).gpio_cirq) ? + "high" : "low"); + } if (host->suspended) { seq_printf(s, "host suspended, can't read registers\n"); @@ -1801,9 +1816,11 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data) } pm_runtime_get_sync(host->dev); - + seq_puts(s, "\nregs:\n"); seq_printf(s, "CON:\t\t0x%08x\n", OMAP_HSMMC_READ(host->base, CON)); + seq_printf(s, "PSTATE:\t\t0x%08x\n", + OMAP_HSMMC_READ(host->base, PSTATE)); seq_printf(s, "HCTL:\t\t0x%08x\n", OMAP_HSMMC_READ(host->base, HCTL)); seq_printf(s, "SYSCTL:\t\t0x%08x\n",