From patchwork Fri Dec 30 11:32:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 9492019 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2E66560838 for ; Fri, 30 Dec 2016 11:33:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2716F1FFCA for ; Fri, 30 Dec 2016 11:33:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BF6120649; Fri, 30 Dec 2016 11:33:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4E9A1FFCA for ; Fri, 30 Dec 2016 11:33:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753867AbcL3Lcq (ORCPT ); Fri, 30 Dec 2016 06:32:46 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:47250 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753793AbcL3Lco (ORCPT ); Fri, 30 Dec 2016 06:32:44 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id CF0026145C; Fri, 30 Dec 2016 11:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1483097563; bh=nr4gobbzUxzdDEht200SxikBha3s+u6K+EPSnZgLTB8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gUXHkhcx+30naafBoMgzGMDeOR7XEsJTsMeY9sWfC1yft4/kd0LtwWKWyS0oC5Zik okdbY4zSKxnAO3sPEhb8GsKHwqHPF6mCmS8SBiosHb+FqTHdHT+HHT5T9p2LBdUWko pRi/XQXbmGCV+QQ42PfuJDdkB2M7ST6yd3jF4GkM= Received: from rharjani-linux.qualcomm.com (unknown [202.46.23.54]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: riteshh@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C9F1361481; Fri, 30 Dec 2016 11:32:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1483097563; bh=nr4gobbzUxzdDEht200SxikBha3s+u6K+EPSnZgLTB8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gUXHkhcx+30naafBoMgzGMDeOR7XEsJTsMeY9sWfC1yft4/kd0LtwWKWyS0oC5Zik okdbY4zSKxnAO3sPEhb8GsKHwqHPF6mCmS8SBiosHb+FqTHdHT+HHT5T9p2LBdUWko pRi/XQXbmGCV+QQ42PfuJDdkB2M7ST6yd3jF4GkM= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org C9F1361481 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=riteshh@codeaurora.org From: Ritesh Harjani To: ulf.hansson@linaro.org, adrian.hunter@intel.com Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, shawn.lin@rock-chips.com, stummala@codeaurora.org, georgi.djakov@linaro.org, linux-arm-msm@vger.kernel.org, pramod.gurav@linaro.org, jeremymc@redhat.com, venkatg@codeaurora.org, asutoshd@codeaurora.org, subhashj@codeaurora.org, Ritesh Harjani Subject: [RFC PATCH 1/3] mmc: sdhci: Add platform_dumpregs callback support to sdhci_ops. Date: Fri, 30 Dec 2016 17:02:09 +0530 Message-Id: <1483097531-9991-2-git-send-email-riteshh@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1483097531-9991-1-git-send-email-riteshh@codeaurora.org> References: <1483097531-9991-1-git-send-email-riteshh@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sahitya Tummala Add new host operation ->platform_dumpregs to provide a mechanism through which host drivers can dump platform specific registers in addition to SDHC registers during error conditions. Signed-off-by: Sahitya Tummala Signed-off-by: Ritesh Harjani --- drivers/mmc/host/sdhci.c | 3 +++ drivers/mmc/host/sdhci.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 2390980..73a8918 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -101,6 +101,9 @@ static void sdhci_dumpregs(struct sdhci_host *host) readl(host->ioaddr + SDHCI_ADMA_ADDRESS)); } + if (host->ops->platform_dumpregs) + host->ops->platform_dumpregs(host); + pr_err(DRIVER_NAME ": ===========================================\n"); } diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 0b66f21..400f3a1 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -564,6 +564,7 @@ struct sdhci_ops { struct mmc_card *card, unsigned int max_dtr, int host_drv, int card_drv, int *drv_type); + void (*platform_dumpregs)(struct sdhci_host *host); }; #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS