From patchwork Sun May 11 11:28:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 4150281 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 61EC19F23C for ; Sun, 11 May 2014 11:30:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8BD31202DD for ; Sun, 11 May 2014 11:30:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B1639202F0 for ; Sun, 11 May 2014 11:30:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758086AbaEKLaJ (ORCPT ); Sun, 11 May 2014 07:30:09 -0400 Received: from mail-vc0-f174.google.com ([209.85.220.174]:34618 "EHLO mail-vc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758044AbaEKLaI (ORCPT ); Sun, 11 May 2014 07:30:08 -0400 Received: by mail-vc0-f174.google.com with SMTP id lh14so2993282vcb.5 for ; Sun, 11 May 2014 04:30:07 -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=vBh3Bzg+y5XsFeThColTiSaB6Kj5pDKtmvnX4I5UQbE=; b=oIEI8qePpjYbnWaKBJGxO/Amj9XYJZaj402YiAB0R/rUVSPH6in05haafsILT9zAf9 JPgNIXqFZVHO+qOHCny+J7e6JtUkaWSoQXtLP2XccZA/Q4GCuOa6nPV7o0gltfTOv7cu Qw73pFaUtzDANciSyF0uDvFPUlgxkQt52UEpj/hi1uXKrohBXYTDJTO4lg6/TheU1XhI xDv/3hi2Uu7JO9PyyyumQUDfp0DmjDokaHYArN5MtycQPztNwNmQerlB6UDRSo61D3Bd FpDre53l4l0MMvvjy29fEh04f1MP6GLFVDjfDvK0MuyS4Empp7WMtHiz1dhHfah6HP+7 PUzw== X-Received: by 10.52.27.209 with SMTP id v17mr14055952vdg.23.1399807807405; Sun, 11 May 2014 04:30:07 -0700 (PDT) Received: from localhost (ip-89-176-190-91.net.upcbroadband.cz. [89.176.190.91]) by mx.google.com with ESMTPSA id bl6sm17265760vdd.20.2014.05.11.04.30.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 11 May 2014 04:30:06 -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 v11 3/6] mmc: omap_hsmmc: Extend debugfs by SDIO IRQ handling, runtime state Date: Sun, 11 May 2014 13:28:55 +0200 Message-Id: <1399807738-32223-4-git-send-email-afenkart@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1399807738-32223-1-git-send-email-afenkart@gmail.com> References: <1399807738-32223-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 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 4ee4645..1a9d31f 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 @@ -1825,14 +1826,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",