From patchwork Mon Apr 28 07:40:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 4075601 Return-Path: X-Original-To: patchwork-linux-mmc@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 29B22C0ACC for ; Mon, 28 Apr 2014 07:42:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 554B9202A7 for ; Mon, 28 Apr 2014 07:42:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 62EEE2028D for ; Mon, 28 Apr 2014 07:42:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753591AbaD1Hme (ORCPT ); Mon, 28 Apr 2014 03:42:34 -0400 Received: from mail-ee0-f46.google.com ([74.125.83.46]:38625 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753485AbaD1Hmc (ORCPT ); Mon, 28 Apr 2014 03:42:32 -0400 Received: by mail-ee0-f46.google.com with SMTP id t10so4515712eei.19 for ; Mon, 28 Apr 2014 00:42: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=boqa8OeUgeLcSYj9yMeeN/RUdOh+PBJGinIwlhukm+Y=; b=kDHnTCY8H3WebpFenLkOZaltEeipMQbe31+PvZcq+ChSHgX9Iv0RXqJcVPwFAEqlIo YdVP14KbXl6p/QbpxddoHpM1ATa4QppLWCdb0OQ+eyF1ZUfFcUZp+uNxpflbPtmVaszS s7kf1QAcOEN/s8n5leQPbdR7r4HawKErlWNoYZSPktUCgrKtJZ742T4HKOcJPV16GhI9 5pO7OxlLqIa41gdREGLJN1tPPouiCYfvAxPmMQETnjeRnnY+Ew1rD+IaYDEzq628EIPf cGPjhE+NtnOsfdEAh+tATYWnmNVeCZjL8QHUt+XRQocAqtgbIK5dcaqLItKnC1K2hwua kQXA== X-Received: by 10.14.9.195 with SMTP id 43mr292509eet.89.1398670951114; Mon, 28 Apr 2014 00:42:31 -0700 (PDT) Received: from localhost (ip-89-176-190-91.net.upcbroadband.cz. [89.176.190.91]) by mx.google.com with ESMTPSA id x43sm36387344eeo.26.2014.04.28.00.42.29 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 28 Apr 2014 00:42: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 v10 3/5] mmc: omap_hsmmc: Extend debugfs by SDIO IRQ handling, runtime state Date: Mon, 28 Apr 2014 09:40:58 +0200 Message-Id: <1398670860-30695-4-git-send-email-afenkart@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1398670860-30695-1-git-send-email-afenkart@gmail.com> References: <1398670860-30695-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 Signed-off-by: Tony Lindgren diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index e675042..76fe3bd 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1819,14 +1819,28 @@ 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); + 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",