From patchwork Tue Feb 25 12:49:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 3716681 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 AB40D9F2F7 for ; Tue, 25 Feb 2014 12:54:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA98D201EC for ; Tue, 25 Feb 2014 12:54:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E73B1201E9 for ; Tue, 25 Feb 2014 12:54:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752896AbaBYMye (ORCPT ); Tue, 25 Feb 2014 07:54:34 -0500 Received: from mail-ea0-f177.google.com ([209.85.215.177]:39034 "EHLO mail-ea0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752040AbaBYMyd (ORCPT ); Tue, 25 Feb 2014 07:54:33 -0500 Received: by mail-ea0-f177.google.com with SMTP id h10so102524eak.36 for ; Tue, 25 Feb 2014 04:54:31 -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=mu5C3rRjErkKbxGE9oonxllyL2tRu9j87NgVfcCewd0=; b=0VzsEZUUNIRNOhA1Sbzh5IohL3OMckDvkgqJ8yxEZ0O6+L5nnSaF7gX0ptXkq4wTOH zN/WXkTYfE9PLAbRu3uCuqOGQBLiR3VR385yeeM8TB33sOg0WjuYDeFQup/7PiO33Z2L xvITbJnyOmAmek1RfMiiz/oS31g08cjv8X7jaePExFeM1y6TAiWC0od7C+ll/qNLq5p5 xlUPgdRboGbHyUBr73Hwws1dVEtyz43J4U55Vwd0cCwr9+a7eIMPXOGpEbOeSKEuyDZE dJl+PMfPBiy979M8pojJGZwQm3zTnEXaLBhZkvCwcHIb9DNBjZylsJiUNYYfU+3xV1ML LCsA== X-Received: by 10.14.94.135 with SMTP id n7mr103404eef.40.1393332871818; Tue, 25 Feb 2014 04:54:31 -0800 (PST) Received: from localhost (ip-94-112-0-13.net.upcbroadband.cz. [94.112.0.13]) by mx.google.com with ESMTPSA id m1sm76133800een.7.2014.02.25.04.54.23 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 25 Feb 2014 04:54:30 -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 v7 4/4] mmc: omap_hsmmc: Extend debugfs for SDIO IRQ, GPIO and pinmux. Date: Tue, 25 Feb 2014 13:49:38 +0100 Message-Id: <1393332578-28599-1-git-send-email-afenkart@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1393331866-28307-4-git-send-email-afenkart@gmail.com> References: <1393331866-28307-4-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=-3.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, KHOP_BIG_TO_CC, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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 Acked-by: Tony Lindgren diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 452c05a..cf03481 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 @@ -1792,14 +1793,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",