From patchwork Mon Nov 25 13:26:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 3230841 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 8D22C9F3A0 for ; Mon, 25 Nov 2013 13:30:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5FC7B2011F for ; Mon, 25 Nov 2013 13:30:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A48E2010B for ; Mon, 25 Nov 2013 13:30:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756617Ab3KYN3y (ORCPT ); Mon, 25 Nov 2013 08:29:54 -0500 Received: from mail-ea0-f170.google.com ([209.85.215.170]:61959 "EHLO mail-ea0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753665Ab3KYN3v (ORCPT ); Mon, 25 Nov 2013 08:29:51 -0500 Received: by mail-ea0-f170.google.com with SMTP id k10so2464193eaj.1 for ; Mon, 25 Nov 2013 05:29:49 -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=N+Y4XExbOl0h4+kCunW9mdf/wjQ9Kd3Aug2+umS0QlM=; b=UOTK8mmToB+BCLToxtLd/p4nWq2plOX9OaGiq6hSn4GWN8imIQk/IV/e1yAQ8HWK4y iRAk7XDcjKtSYjiGuK1BaaHD81LOI36OIO5EnOKLBbWuwfoccMclR+5HG0t2j/c2glV0 ShgoKap5gHJpcLy3gtNLWD3h7nunk/SESQ+dgNCfVrCWs7kiJmlH5rzv7HUO7DrMz3o3 iJu9NojZeKrPv3AilRVvwxUm+rpzYS/k7WFp0/QFySRmDjmZaCJ57HPWBl9jII5Ayl2a DXIYJaD81h90b5h2DWsLNkZ7+F6O3OGoSOUb7QwQ74dSPOcR04XbotimQlKxIMIRr6z+ rC+w== X-Received: by 10.14.119.136 with SMTP id n8mr196011eeh.82.1385386189698; Mon, 25 Nov 2013 05:29:49 -0800 (PST) Received: from localhost (ip-94-112-2-16.net.upcbroadband.cz. [94.112.2.16]) by mx.google.com with ESMTPSA id o47sm94802706eem.21.2013.11.25.05.29.48 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 25 Nov 2013 05:29:49 -0800 (PST) From: Andreas Fenkart To: Chris Ball Cc: Tony Lindgren , Grant Likely , Felipe Balbi , Balaji T K , zonque@gmail.com, linux-doc@vger.kernel.org, linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, Andreas Fenkart Subject: [PATCH v3 3/3] mmc: omap_hsmmc: Extend debugfs for SDIO IRQ, GPIO and pinmux. Date: Mon, 25 Nov 2013 14:26:49 +0100 Message-Id: <1385386009-14981-4-git-send-email-afenkart@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1385386009-14981-1-git-send-email-afenkart@gmail.com> References: <1385386009-14981-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 c8c54f5..f7ceca0 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 @@ -1795,6 +1796,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"); @@ -1802,9 +1817,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",