From patchwork Tue Jan 10 06:41:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 9506491 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 3A2D4601E9 for ; Tue, 10 Jan 2017 06:43:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 334A127FB6 for ; Tue, 10 Jan 2017 06:43:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2801728462; Tue, 10 Jan 2017 06:43:20 +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 D53C62823D for ; Tue, 10 Jan 2017 06:43:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754849AbdAJGme (ORCPT ); Tue, 10 Jan 2017 01:42:34 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:41624 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751620AbdAJGmc (ORCPT ); Tue, 10 Jan 2017 01:42:32 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id ED96261405; Tue, 10 Jan 2017 06:42:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1484030551; bh=nr4gobbzUxzdDEht200SxikBha3s+u6K+EPSnZgLTB8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FX+cQjyxrh010o57puSB64PURuf1AmWYkz1zuAgo5UJ3cEvvCHj1+/OYHID/2YfEe d7TLrbR1DxXc0qNkyOY0VChetKzkCJbYCTfSzSOIWpWM/Bpdwg9wJPr2FOKF42NMcF YcaUdMo7masGkiX3JSyaA1i2Cd7qsG0NkApdiOPI= 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 3AB1E6141B; Tue, 10 Jan 2017 06:42:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1484030551; bh=nr4gobbzUxzdDEht200SxikBha3s+u6K+EPSnZgLTB8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FX+cQjyxrh010o57puSB64PURuf1AmWYkz1zuAgo5UJ3cEvvCHj1+/OYHID/2YfEe d7TLrbR1DxXc0qNkyOY0VChetKzkCJbYCTfSzSOIWpWM/Bpdwg9wJPr2FOKF42NMcF YcaUdMo7masGkiX3JSyaA1i2Cd7qsG0NkApdiOPI= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 3AB1E6141B 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: adrian.hunter@intel.com, ulf.hansson@linaro.org Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, shawn.lin@rock-chips.com, linux-arm-msm@vger.kernel.org, georgi.djakov@linaro.org, asutoshd@codeaurora.org, stummala@codeaurora.org, venkatg@codeaurora.org, pramod.gurav@linaro.org, jeremymc@redhat.com, Ritesh Harjani Subject: [RESEND RFC 1/3] mmc: sdhci: Add platform_dumpregs callback support to sdhci_ops. Date: Tue, 10 Jan 2017 12:11:53 +0530 Message-Id: <1484030515-16722-2-git-send-email-riteshh@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1484030515-16722-1-git-send-email-riteshh@codeaurora.org> References: <1484030515-16722-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