From patchwork Thu May 8 23:20:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 4139431 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 2B0579F1E1 for ; Thu, 8 May 2014 23:21:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 20404202EA for ; Thu, 8 May 2014 23:21:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 51DE0202E5 for ; Thu, 8 May 2014 23:21:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755909AbaEHXVW (ORCPT ); Thu, 8 May 2014 19:21:22 -0400 Received: from mail-ee0-f47.google.com ([74.125.83.47]:44571 "EHLO mail-ee0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755887AbaEHXVV (ORCPT ); Thu, 8 May 2014 19:21:21 -0400 Received: by mail-ee0-f47.google.com with SMTP id c13so2132734eek.6 for ; Thu, 08 May 2014 16:21:20 -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=66y06V/9cXP5tyPIBNHgTBLQw+26pTyHw80qdZvNM+I=; b=IhmLk1JCj1EUsYze0e+ngqjYOI8tdsX/pbD4CRDwf7D3lHPMAd4/Y4hylPtk8rOLCn 8iX6sjzRlxQl1QRZ2awMdEQpv4LzNS63WJBS22vE/n5fETMRss35cyEFVukcbjablBJf a9lVHzSE9aK7CE66LP1KDyufSMlkBGUY3+R3DXoQqSv9mxm+cYtty98LgBtXN25XOVKH TRlGVnBOweBZ6jkxCMN2rlZ8IQ8FU6rLwZc7SjLMAAvcScZR81Z66f808NZOLccnQZTR lGKn2TQJTGbkEHFfPpQedji/Opkind5XOB65dvCaVzHhh0SHADETrVUKYFQZhuiBb+k9 aG+w== X-Received: by 10.14.69.201 with SMTP id n49mr8697348eed.106.1399591280054; Thu, 08 May 2014 16:21:20 -0700 (PDT) Received: from localhost (13-242.62-81.cust.bluewin.ch. [81.62.242.13]) by mx.google.com with ESMTPSA id x45sm7324131eef.15.2014.05.08.16.21.18 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 May 2014 16:21:19 -0700 (PDT) From: Andreas Fenkart To: Tony Lindgren Cc: Chris Ball , Grant Likely , Felipe Balbi , Balaji T K , Andreas Mueller , 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 v11 4/7] mmc: omap_hsmmc: Extend debugfs by SDIO IRQ handling, runtime state Date: Fri, 9 May 2014 01:20:31 +0200 Message-Id: <1399591234-13089-4-git-send-email-afenkart@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1399591234-13089-1-git-send-email-afenkart@gmail.com> References: <1399591018-12930-1-git-send-email-afenkart@gmail.com> <1399591234-13089-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=-7.4 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 Acked-by: Balaji T K diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index f76462d..14857d7 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -83,6 +83,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,29 @@ 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_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); + seq_printf(s, "sdio irq mode\t%s\n", + (mmc->caps & MMC_CAP_SDIO_IRQ) ? "interrupt" : "polling"); - pm_runtime_get_sync(host->dev); + if (mmc->caps & MMC_CAP_SDIO_IRQ) { + seq_printf(s, "sdio irq \t%s\n", + (host->flags & HSMMC_SDIO_IRQ_ENABLED) ? "enabled" + : "disabled"); + } + + suspended = host->dev->power.runtime_status != RPM_ACTIVE; + seq_printf(s, "runtime state\t%s\n", (suspended ? "idle" : "active")); + 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",