From patchwork Wed Jul 16 14:19:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Niebel X-Patchwork-Id: 4567331 Return-Path: X-Original-To: patchwork-linux-arm@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 E2C129F37C for ; Wed, 16 Jul 2014 14:10:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 259B9201C0 for ; Wed, 16 Jul 2014 14:10:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 42C02201BA for ; Wed, 16 Jul 2014 14:10:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X7Psi-0005r8-7B; Wed, 16 Jul 2014 14:08:28 +0000 Received: from smtprelay01.ispgateway.de ([80.67.31.28]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X7Psb-0005Vw-W4 for linux-arm-kernel@lists.infradead.org; Wed, 16 Jul 2014 14:08:22 +0000 Received: from [89.246.71.91] (helo=mail6.tqsc.de) by smtprelay01.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1X7PsF-0000Mg-HQ; Wed, 16 Jul 2014 16:07:59 +0200 Received: from sc1006092vm.tqsc.de ([192.168.169.50] helo=ubuntu.tqsc.de) by mail6.tqsc.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1X7PsF-0003FT-5F; Wed, 16 Jul 2014 16:07:59 +0200 From: Markus Niebel To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] mmc: sdhci-esdhc-imx: implement DSR support Date: Wed, 16 Jul 2014 16:19:49 +0200 Message-Id: <1405520389-32649-3-git-send-email-list-09_linux_arm@tqsc.de> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1405520389-32649-1-git-send-email-list-09_linux_arm@tqsc.de> References: <1405520389-32649-1-git-send-email-list-09_linux_arm@tqsc.de> X-Df-Sender: MTQ1NzgzNQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140716_070822_388149_BC90E83A X-CRM114-Status: GOOD ( 11.54 ) X-Spam-Score: -0.0 (/) Cc: Markus Niebel , ulf.hansson@linaro.org, linux-mmc@vger.kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, 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 From: Markus Niebel nor that we have DSR support implement the configuration side for i.MX SDHCI controller Signed-off-by: Markus Niebel --- drivers/mmc/host/sdhci-esdhc-imx.c | 15 +++++++++++++++ include/linux/platform_data/mmc-esdhc-imx.h | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index ccec0e3..7db39d8 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -942,6 +942,16 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line)) boarddata->delay_line = 0; + if (of_find_property(np, "dsr", NULL)) { + u32 tmp; + + of_property_read_u32(np, "dsr", &tmp); + boarddata->dsr_req = true; + boarddata->dsr = (u16)tmp; + } else { + boarddata->dsr_req = true; + } + return 0; } #else @@ -1119,6 +1129,11 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; } + if (boarddata->dsr_req) { + host->mmc->dsr_req = 1; + host->mmc->dsr = boarddata->dsr; + } + err = sdhci_add_host(host); if (err) goto disable_clk; diff --git a/include/linux/platform_data/mmc-esdhc-imx.h b/include/linux/platform_data/mmc-esdhc-imx.h index 75f70f6..8b88a40 100644 --- a/include/linux/platform_data/mmc-esdhc-imx.h +++ b/include/linux/platform_data/mmc-esdhc-imx.h @@ -35,6 +35,8 @@ enum cd_types { * @wp_type: type of write_protect method (see wp_types enum above) * @cd_type: type of card_detect method (see cd_types enum above) * @support_vsel: indicate it supports 1.8v switching + * @dsr_req: indicate DSR is requested + * @dsr: requested driver stage setting */ struct esdhc_platform_data { @@ -46,5 +48,7 @@ struct esdhc_platform_data { unsigned int f_max; bool support_vsel; unsigned int delay_line; + bool dsr_req; + u16 dsr; }; #endif /* __ASM_ARCH_IMX_ESDHC_H */