From patchwork Fri May 23 08:30:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 4228951 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 085B19F1CD for ; Fri, 23 May 2014 08:31:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 33B1F20383 for ; Fri, 23 May 2014 08:31:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 555162017D for ; Fri, 23 May 2014 08:31:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751527AbaEWIbo (ORCPT ); Fri, 23 May 2014 04:31:44 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:44925 "EHLO mail-ee0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751325AbaEWIbm (ORCPT ); Fri, 23 May 2014 04:31:42 -0400 Received: by mail-ee0-f45.google.com with SMTP id d49so3393237eek.4 for ; Fri, 23 May 2014 01:31:40 -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=2fNJgR45seNdFARlHz2Omv/Fonb058R5Xv7ip2l96jY=; b=En5c3N1fCv9Kk33IS4SnXnCFaoZb0TFtbOoFRaDvu+E079QmHtGWzd+gNk9UWFLXNH r2tyoCqKw5VDgf3e5yllykUsyXMQAx81WBzfaLelYvbFgwMUBo4gr6u5W+lnQSdpbbgt d4OdOzUCd/KTF2+dUwQgCvEkH3ohv1CgXwnzax/gtMqdM0v0gfbYWQxULW6AAMmZxNo3 mSWVzLm/fOYagp/UbHUxPj/wo92VZBAV5aCN9FEG5iXw6rhJsSg0NRIaDhS2Vi9F6dHw 7PA5pG2TZG5bTJ7Cct6uAxB/GP39QgmninJE+o+7pfMgiKo1C30GVXu8bZr7o8AZ+8OD aVtA== X-Received: by 10.15.21.200 with SMTP id d48mr5722351eeu.25.1400833900347; Fri, 23 May 2014 01:31:40 -0700 (PDT) Received: from localhost (ip-89-176-190-91.net.upcbroadband.cz. [89.176.190.91]) by mx.google.com with ESMTPSA id w6sm6600593eej.7.2014.05.23.01.31.38 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 23 May 2014 01:31:39 -0700 (PDT) From: Andreas Fenkart To: Tony Lindgren Cc: Chris Ball , Grant Likely , Felipe Balbi , Balaji T K , Andreas Mueller , Sebastian Reichel , 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 v13 3/7] mmc: omap_hsmmc: Extend debugfs by SDIO IRQ handling, runtime state Date: Fri, 23 May 2014 10:30:30 +0200 Message-Id: <1400833834-15893-4-git-send-email-afenkart@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1400833834-15893-1-git-send-email-afenkart@gmail.com> References: <1400833834-15893-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=-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=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 Acked-by: Balaji T K Signed-off-by: Andreas Fenkart diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 0125eea..cfd2bfb 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -56,6 +56,7 @@ #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 @@ -1816,10 +1817,23 @@ 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); +#ifdef CONFIG_PM + bool suspended; +#endif 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"); + + if (mmc->caps & MMC_CAP_SDIO_IRQ) { + seq_printf(s, "sdio irq \t%s\n", + (host->flags & HSMMC_SDIO_IRQ_ENABLED) ? "enabled" + : "disabled"); + } #ifdef CONFIG_PM + 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); #endif @@ -1827,6 +1841,8 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data) 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",