From patchwork Fri Mar 21 12:20:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 3873621 Return-Path: X-Original-To: patchwork-linux-omap@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 4043A9F370 for ; Fri, 21 Mar 2014 12:21:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5F14A20268 for ; Fri, 21 Mar 2014 12:21:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 713DC2027D for ; Fri, 21 Mar 2014 12:21:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965502AbaCUMVe (ORCPT ); Fri, 21 Mar 2014 08:21:34 -0400 Received: from mail-ee0-f54.google.com ([74.125.83.54]:41444 "EHLO mail-ee0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965451AbaCUMVc (ORCPT ); Fri, 21 Mar 2014 08:21:32 -0400 Received: by mail-ee0-f54.google.com with SMTP id d49so1756196eek.13 for ; Fri, 21 Mar 2014 05:21:31 -0700 (PDT) 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=e8VegIbvyKIYMneTDH3wT2xFQISCUxASTHHm5KPkfRE=; b=trGz/N9OhdzBKLnlQ819WxiTh4RgeNnu7p3yIo+Ydib+apy6WcdI6pyxDH+cWlBv4I f7pPySQRVCyweqfN0fJHPZSdfIsKhR27yN76syOZ0VmubzUWgdLM8MV9yOQ0yQH6NDhL ucZiiPRG5PVTSdmjhYk2EEy/ZoxDFzd4rLU6p4iFA3IEPZI3oLIVxH/fw7Imb7r/9NJ5 QJtqmepIc4dHvx8puSwmL//SwIR04qKgKFKQWUbIuQAsB+O1epIidYSxFYNQFPRrGO9T /LLt4XdjJaLI9fQm+4DJRVa3EYTypPIUcxEkrUfhGUdeOAtXm/PVjCkMrB1PE4BtxU9w PAUA== X-Received: by 10.14.9.195 with SMTP id 43mr15194561eet.89.1395404491322; Fri, 21 Mar 2014 05:21:31 -0700 (PDT) Received: from localhost (ip-94-112-0-13.net.upcbroadband.cz. [94.112.0.13]) by mx.google.com with ESMTPSA id l42sm11236161eew.19.2014.03.21.05.21.29 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 21 Mar 2014 05:21:30 -0700 (PDT) From: Andreas Fenkart To: Tony Lindgren Cc: Chris Ball , 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 v9 resend 3/3] mmc: omap_hsmmc: Extend debugfs for SDIO IRQ, GPIO and pinmux Date: Fri, 21 Mar 2014 13:20:48 +0100 Message-Id: <1395404448-30030-4-git-send-email-afenkart@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395404448-30030-1-git-send-email-afenkart@gmail.com> References: <1395404448-30030-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, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 Signed-off-by: Tony Lindgren diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 2307c78..681bf68 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 @@ -1854,14 +1855,30 @@ 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); + const char *cirq_state; + bool suspended; - seq_printf(s, "mmc%d:\n ctx_loss:\t%d\n\nregs:\n", - mmc->index, host->context_loss); + seq_printf(s, "mmc%d:\n", mmc->index); + if (mmc->caps & MMC_CAP_SDIO_IRQ) + cirq_state = (host->flags & HSMMC_SDIO_IRQ_ENABLED) ? + "enabled" : "disabled"; + else + cirq_state = "polling"; + seq_printf(s, "sdio irq\t%s\n", cirq_state); - pm_runtime_get_sync(host->dev); + if (host->flags & HSMMC_SWAKEUP_QUIRK) { + suspended = host->dev->power.runtime_status != RPM_ACTIVE; + seq_printf(s, "pinmux config\t%s\n", (suspended ? + "gpio" : "sdio")); + } + seq_printf(s, "ctx_loss:\t%d\n", 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",