From patchwork Mon Dec 2 23:21:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 3272251 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CFA55C0D4A for ; Mon, 2 Dec 2013 23:25:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 04FC920373 for ; Mon, 2 Dec 2013 23:25:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3ACE020255 for ; Mon, 2 Dec 2013 23:25:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753935Ab3LBXZX (ORCPT ); Mon, 2 Dec 2013 18:25:23 -0500 Received: from mail-ee0-f53.google.com ([74.125.83.53]:55621 "EHLO mail-ee0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753894Ab3LBXZV (ORCPT ); Mon, 2 Dec 2013 18:25:21 -0500 Received: by mail-ee0-f53.google.com with SMTP id b57so1013289eek.12 for ; Mon, 02 Dec 2013 15:25:19 -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=w91yE4FmPCXVsqgt8bOma3g3jXKtrUds1oE8qgQy/b0=; b=cQR5+v6DUAfJqVc1t4P2PNYHL2TVhclSluy22Y+G7gHidQHp0U3YSHaBLwuMZNYIBM mLZGbGAVze2ZPKKO0pIkzgss8R6kQc2G7q/kwgdqAqgVvrU+8oxfJzegAxSvsfVh58qU EWOpG5bkxRSPzvxC4E9FrDe86Lqxz7y6Igbz/lO4b35Zt3PMfc3d7XJrS5pTrmZk3Aze 1o6wfE6gX8SkWOCXNa/7KOK06ZFP+LH6rrdU5LS5eKLEH2YUSYQ5P3HV7rs0KWyioCdj KdrPK9fMr7Bqe5UznqmVkLD937UDszUwWMIYKnL/FWRWtHIdwvt+j1J7K6XOp5FI2Ov+ /91A== X-Received: by 10.15.108.73 with SMTP id cc49mr101468eeb.93.1386026719546; Mon, 02 Dec 2013 15:25:19 -0800 (PST) Received: from localhost (ip-94-112-2-16.net.upcbroadband.cz. [94.112.2.16]) by mx.google.com with ESMTPSA id 4sm63582883eed.14.2013.12.02.15.25.17 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Dec 2013 15:25:18 -0800 (PST) From: Andreas Fenkart To: Chris Ball Cc: Tony Lindgren , Grant Likely , Felipe Balbi , Balaji T K , zonque@gmail.com, galak@codeaurora.org, linux-doc@vger.kernel.org, linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, Andreas Fenkart Subject: [PATCH v5 3/3] mmc: omap_hsmmc: Extend debugfs for SDIO IRQ, GPIO and pinmux. Date: Tue, 3 Dec 2013 00:21:52 +0100 Message-Id: <1386026512-23446-4-git-send-email-afenkart@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1386026512-23446-1-git-send-email-afenkart@gmail.com> References: <1386026512-23446-1-git-send-email-afenkart@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 2c14171..5fe3f24 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -82,6 +82,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 @@ -1789,14 +1790,25 @@ 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")); seq_printf(s, "mmc%d:\n ctx_loss:\t%d\n\nregs:\n", mmc->index, host->context_loss); 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",