From patchwork Mon Nov 18 07:54:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Fenkart X-Patchwork-Id: 3195571 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 2175C9F3AE for ; Mon, 18 Nov 2013 07:57:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5239D206F5 for ; Mon, 18 Nov 2013 07:57:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 85274206C4 for ; Mon, 18 Nov 2013 07:57:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751406Ab3KRH5D (ORCPT ); Mon, 18 Nov 2013 02:57:03 -0500 Received: from mail-ee0-f50.google.com ([74.125.83.50]:43461 "EHLO mail-ee0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751111Ab3KRH5B (ORCPT ); Mon, 18 Nov 2013 02:57:01 -0500 Received: by mail-ee0-f50.google.com with SMTP id e53so424345eek.23 for ; Sun, 17 Nov 2013 23:57:00 -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=T70dNTWf4GEG4GgqOGnqJqI8epIUSQt+O7ZLl/bVWBk=; b=LvJXX/gWo5rPgsvmsx4qFG+UzzGvLspM0DTi8IPP0D5x3gowhnIWZvPhdkb1cDq2uz 6BCxXL8xC42xxBLKRyTuPvcIJtr864fzMzdFfem/XzYJNEi8ILP6L+gpsBpRtZqqB6nt 0wGlJ/DSE6zCkqSdg64ocljJgK6MRBIBLHzw5G22I266Re2GCm0JRpC7Z2sHo/VOF3BK P5I+8PDL0ifcDyFLW3pxJ/lqjMCqSjswyfLSWOf4kNPzprY3sKxxF/X36MbB/vgJafx4 BVBu7dM5/wRpp89URywwIdevRFq+bd0zjf37zCMoU5+1LV4fy5ZlLOKjPVeezYpcrY4l 3MjQ== X-Received: by 10.14.104.201 with SMTP id i49mr157616eeg.78.1384761420307; Sun, 17 Nov 2013 23:57:00 -0800 (PST) Received: from localhost (ip-94-112-2-16.net.upcbroadband.cz. [94.112.2.16]) by mx.google.com with ESMTPSA id a51sm35125160eeh.8.2013.11.17.23.56.58 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 17 Nov 2013 23:56:59 -0800 (PST) From: Andreas Fenkart To: Chris Ball Cc: Tony Lindgren , Grant Likely , Felipe Balbi , Balaji T K , zonque@gmail.com, linux-doc@vger.kernel.org, linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, Andreas Fenkart Subject: [PATCH v3 3/3] mmc: omap_hsmmc: Extend debugfs for SDIO IRQ, GPIO and pinmux. Date: Mon, 18 Nov 2013 08:54:00 +0100 Message-Id: <1384761240-11005-4-git-send-email-afenkart@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1384761240-11005-1-git-send-email-afenkart@gmail.com> References: <1384761240-11005-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.3 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 diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index b94ab08..d90b4a1 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -81,6 +81,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 @@ -1796,6 +1797,20 @@ 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_puts(s, "\n"); + seq_printf(s, "sdio irq\t%s\n", ((host->flags & HSMMC_SDIO_IRQ_ENABLED) + ? "enabled" : "disabled")); + suspended = host->dev->power.runtime_status != RPM_ACTIVE; + if (host->flags & HSMMC_SWAKEUP_QUIRK) { + seq_printf(s, "pinmux config\t%s\n", (suspended ? + "gpio" : "sdio")); + if (suspended) + seq_printf(s, "sdio irq pin\t%s\n", + gpio_get_value(mmc_slot(host).gpio_cirq) ? + "high" : "low"); + } if (host->suspended) { seq_printf(s, "host suspended, can't read registers\n"); @@ -1803,9 +1818,11 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data) } 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",