From patchwork Tue Sep 6 08:28:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangbo Lu X-Patchwork-Id: 9316031 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 19B1E601C0 for ; Tue, 6 Sep 2016 08:45:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 209EE2871A for ; Tue, 6 Sep 2016 08:45:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 13A0828BF4; Tue, 6 Sep 2016 08:45: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=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 509D52871A for ; Tue, 6 Sep 2016 08:45:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bhBys-0003BK-8L; Tue, 06 Sep 2016 08:43:46 +0000 Received: from mail-by2nam01on0041.outbound.protection.outlook.com ([104.47.34.41] helo=NAM01-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bhBwn-0001Xp-Ok for linux-arm-kernel@lists.infradead.org; Tue, 06 Sep 2016 08:41:47 +0000 Received: from BN3PR0301CA0024.namprd03.prod.outlook.com (10.160.180.162) by BLUPR0301MB2003.namprd03.prod.outlook.com (10.164.22.17) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.9; Tue, 6 Sep 2016 08:41:15 +0000 Received: from BN1BFFO11FD033.protection.gbl (2a01:111:f400:7c10::1:184) by BN3PR0301CA0024.outlook.office365.com (2a01:111:e400:4000::34) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.609.9 via Frontend Transport; Tue, 6 Sep 2016 08:41:15 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; nxp.com; dmarc=fail action=none header.from=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD033.mail.protection.outlook.com (10.58.144.96) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.587.6 via Frontend Transport; Tue, 6 Sep 2016 08:41:14 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u868e7Ns032344; Tue, 6 Sep 2016 01:41:07 -0700 From: Yangbo Lu To: , , Scott Wood , Arnd Bergmann Subject: [v11, 8/8] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0 Date: Tue, 6 Sep 2016 16:28:23 +0800 Message-ID: <1473150503-9550-9-git-send-email-yangbo.lu@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 In-Reply-To: <1473150503-9550-1-git-send-email-yangbo.lu@nxp.com> References: <1473150503-9550-1-git-send-email-yangbo.lu@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131176248750979521; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(50226002)(106466001)(8936002)(2906002)(50986999)(189998001)(48376002)(229853001)(85426001)(33646002)(50466002)(86362001)(47776003)(5003940100001)(356003)(7846002)(8666005)(92566002)(5660300001)(76176999)(7416002)(626004)(305945005)(4326007)(97736004)(105606002)(5001770100001)(77096005)(230783001)(81156014)(104016004)(81166006)(8676002)(36756003)(11100500001)(19580395003)(19580405001)(68736007)(586003)(2950100001)(87936001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0301MB2003; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD033; 1:lJ3MhplbTMQSkjX/AqqS8s2gSpwhE1J5UxkaGAN0BLNHRhyhnQ2fy3cFalaNfsmm4RgLWpGC0dd3DIyfW7Y8TG0Jdyt2tZQg7z+39pvvLqNJgLp3SnbUJ3dpRd3VUfMQz9wh7vKPZcCw0V12JoTapQnEdRzyp7SfZ8kvkbxWOg0dPyWK0pk7PZh2MPcX656dvw6fJ7daKRYVGTS6anpV7Lwj2e4EKgVNdA78XmToEZwd03G40fy8n7BFmWsUHjbx4OzLYJ7fZ/gd/sJNQGW+b03Lgkf56soXoJL8lcO0mT++olGQpm/wViF4BQYJEitZjotnsfYl9G/OiHdL2OqTaFbKwdo1SMzms7ZEaeOWtC/rDCJ+VkzM76RfO5vCo7U4CRYN7bCO/AcTUDEAsR2PW3x87i+vZjfG9K+TtRhwW8KX2eeKGxCN12DFFWoOR6+TU72N9HC2aZUkrA4vSb5OfszabbawZoa3yxdKNADtyAfn2AxsbGaQmcRrNrBvglYDR03UPjBSkPpF4WtrludSicvSrMrGWsAeIH1jicas/qMnBPb2IxUxjy1+Uf2m7Zi2D3+ehqFhLtYZiYZb2kjyvmLCoo+sg5oLnwxebSwdZ7uLnsxzrGJ46riiBpR+uHEpqH0xSww1LuQDqGU1xLo5NOA68ZY3R9i7X99j3T2W3OXAj7PlSfbleFdHReZLB1sTGvqLCrAdW6AQLU/WSg5uw//1LVYfNhSg00jngmLfR/R7p5dczDmfb8oy3eHVFkde MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: d0098f28-93aa-41f3-39c1-08d3d631903c X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB2003; 2:xOlXNP9HHKg6XPcTgR0HO8oy957Wsbbbbu9ZlXxKeLrwQYheY90P9CHG+gT544v0qwIiKh3KY1scHhJHKuFa2hQI+L6pPODPxsdtAM6F8fUCkHzKb77DpF9wQa8tSyDpZQkXl/lVQ6ar/cTqCFnGzRXdNfKkA3UP6x44jlIeIHDkOrhWoUM94yWeFXB9BBW8; 3:mef9IfGZ1rDX+fvKLtVTRRZuv4JiSAvSAJGQqTvRiJq5tKvS9halTV2M5Io3e2B6yi71R+n/Zn7NhGM9KbKZ5r0O6CwJFZ8DYRlC8RI0ZM4sLoLG3pS8iaWr0VeLnEUncGgJC6kNG9daC6+SnFGxHV7cAB6RiS0L330dPWXiC7l6CNOcPb1ZihHAtjyBqmlmJY/EZ7pMOe4fCozfEAR/4N37ddb+u6AjAIkrGvt411Y= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0301MB2003; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB2003; 25:BuAnXmhF8FCKrLdAgEZwLole9z5BTbbXy7SIRk2b1IOa3nsSbkrmcfp94rV/otzNeXDxjnwV3fxzEtbF26u9H6QRSRh48pSAwthUARJqDkFuacv7GnEZ9tgVVuMRhd9if108fJDF+KCcXCUS81neN4TUj8rEz3Ic37LKpmmwHAVltPJLg47mTQHvS4tFeA49dEBV9MDnMpD/LqTihxZyFsiwPiZ9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4Vxnj5o5SsnHJO2M5EHo+G1dFnLz8XlxLHvuZ/lLBz/xtjLk5c8PkjqFpUBXypTf6rafh1qc+eZimktPRx0NTomdgGCVsuR/gA1i5qE4dCvm9LlD1zxnSnv0EbW4BvFwV+6p6mtB5JZGZsBFWE56JOF0YNjy3Xdxhin8DCQDbNjQEgmugDkUs5fUSgA0cKV7tcCKmxWfFytQh7zRf2r0w6PBoNBXeWE48AH7eBdzVz10bwr84qDgZMt9+DGRRHWOQteI8MMD5kr0RuR4ImA5W0ryu91ZcmAXLc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13015025)(13017025)(13023025)(13024025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:BLUPR0301MB2003; BCL:0; PCL:0; RULEID:(400006); SRVR:BLUPR0301MB2003; X-Forefront-PRVS: 0057EE387C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0301MB2003; 23:jSGluJsDvOb5NtElgXQVSZY6jNHkEIZM67lv/r5?= =?us-ascii?Q?WJDnz72xaIzLlFAZFwB+BlXmII4Vv0whPnO9mGsh85ptnBJmuPr92gmAeQq0?= =?us-ascii?Q?V1rREJPS+AF8l1U2YblfA4JhCyuJV3oFz1yD2DFLFYy9S2jKzPU7pItUZzhy?= =?us-ascii?Q?9vcBRl/3xHnCcM4ECCDmumLkvU8s13VB5mJD1Ge6wai4Ik4Y/1EUAsDBA953?= =?us-ascii?Q?BRtpbig3zhjR4+TJSM1pjJWjG6+iU92i+Z6YBQNyIGWtA2qNpbVQVmQSw97j?= =?us-ascii?Q?Ef8zp+ZEsBm+tDwzb/NabwR0wQIdto7XY4j1QsaPmtHV16WthaDjtMBQ5xPl?= =?us-ascii?Q?5hIc4xxmWxageX5ieoKGZP/X/wZ35y/ypbOUFOLwJWJWeJy5Elv5EeAiCPGZ?= =?us-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JLUmzRGvIXp3lGXLXCKsvOlVd62vdRA5GonBhB07ZEI8npQ5v6AWFxQ8zP8PGev7igYFFPg+dM5we7cWLPanyn1wM5aeDNoP/HkdZE34C45HY9ZA0bockyVxJFZytXIVKExLjjhmeciaKqpfu8ftmtDrZzv06+Gg/mREZmdVC9ebLSF1YY1YnEcgD0EF/5Ae6GV7r8iNBXBDCEOCXcYqOlJQFuZGM8MChbgX/4XF2MyWYvQgbC3AhS3RmkQ1AwtHmIKA9ZEYgCCmO0=; 5:gRvKfTZXqJGHkMfwCPifti9ZFj3sS9CRAxuV5hlWdseEusFEsObLDkkYOTug2d2C5rLFtFbFSCtcG4Ap499qfWSx5EEWesniw/uCqo2qx/vddkkTnEyeXPHnqOyjyt9pA6nnyIflPifmw9UjW8KmgWDFiySA9JLg/s4wwHF4/+U=; 24:vJiPL4yO4PyT1hM6FDdpwTfQoXv45AsY+wM2StJpfDxqmrBo99apk9muEkXJiDFTjcFHWv3vMOMB928MhArZXe9cbxDxE+e8OqBV7VoW6Ro=; 7:QyUCCinAiRlLxySYOpRNZxvOCWJjPC5m/W5Tle/8EaW4Atvhbq0OAI6izE9zAvXiwKSfJGrzKI/DXuohCAPgmexb4CKZ/FWWfjunw6DI4FgpvSZ+8IfmiNA4GxajI3ELqTGKcCUUOQ4htTDI1D2eR3HbcMexmbIpYLpWo3ImLv5HSkMBaSlEdpuVO1cTZnTaf5g0gOm+sYXEQN+ATv2Y4zjQVBWMhl/xSt8YUNlGP8Ckz/Co5ljSMNoj/nVkKs7i SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2016 08:41:14.7079 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB2003 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160906_014138_288093_D51C0E42 X-CRM114-Status: GOOD ( 20.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Russell King , Yangbo Lu , Bhupesh Sharma , netdev@vger.kernel.org, Joerg Roedel , Santosh Shilimkar , linux-kernel@vger.kernel.org, Jochen Friedrich , xiaobo.xie@nxp.com, iommu@lists.linux-foundation.org, Rob Herring , linux-i2c@vger.kernel.org, Claudiu Manoil , Kumar Gala , leoyang.li@nxp.com, linuxppc-dev@lists.ozlabs.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Qiang Zhao Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The eSDHC of T4240-R1.0-R2.0 has incorrect vender version and spec version. Acturally the right version numbers should be VVN=0x13 and SVN = 0x1. This patch adds the GUTS driver support for eSDHC driver to match SoC. And fix host version to avoid that incorrect version numbers break down the ADMA data transfer. Signed-off-by: Yangbo Lu Acked-by: Ulf Hansson Acked-by: Scott Wood --- Changes for v2: - Got SVR through iomap instead of dts Changes for v3: - Managed GUTS through syscon instead of iomap in eSDHC driver Changes for v4: - Got SVR by GUTS driver instead of SYSCON Changes for v5: - Changed to get SVR through API fsl_guts_get_svr() - Combined patch 4, patch 5 and patch 6 into one Changes for v6: - Added 'Acked-by: Ulf Hansson' Changes for v7: - None Changes for v8: - Added 'Acked-by: Scott Wood' Changes for v9: - None Changes for v10: - None Changes for v11: - Changed to use soc_device_match --- drivers/mmc/host/Kconfig | 1 + drivers/mmc/host/sdhci-of-esdhc.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 5274f50..a1135a9 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -144,6 +144,7 @@ config MMC_SDHCI_OF_ESDHC depends on MMC_SDHCI_PLTFM depends on PPC || ARCH_MXC || ARCH_LAYERSCAPE select MMC_SDHCI_IO_ACCESSORS + select FSL_GUTS help This selects the Freescale eSDHC controller support. diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index fb71c86..0a31aa5 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include "sdhci-pltfm.h" #include "sdhci-esdhc.h" @@ -28,6 +29,7 @@ struct sdhci_esdhc { u8 vendor_ver; u8 spec_ver; + bool quirk_incorrect_hostver; }; /** @@ -73,6 +75,8 @@ static u32 esdhc_readl_fixup(struct sdhci_host *host, static u16 esdhc_readw_fixup(struct sdhci_host *host, int spec_reg, u32 value) { + struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); + struct sdhci_esdhc *esdhc = sdhci_pltfm_priv(pltfm_host); u16 ret; int shift = (spec_reg & 0x2) * 8; @@ -80,6 +84,12 @@ static u16 esdhc_readw_fixup(struct sdhci_host *host, ret = value & 0xffff; else ret = (value >> shift) & 0xffff; + /* Workaround for T4240-R1.0-R2.0 eSDHC which has incorrect + * vendor version and spec version information. + */ + if ((spec_reg == SDHCI_HOST_VERSION) && + (esdhc->quirk_incorrect_hostver)) + ret = (VENDOR_V_23 << SDHCI_VENDOR_VER_SHIFT) | SDHCI_SPEC_200; return ret; } @@ -558,6 +568,12 @@ static const struct sdhci_pltfm_data sdhci_esdhc_le_pdata = { .ops = &sdhci_esdhc_le_ops, }; +static struct soc_device_attribute soc_incorrect_hostver[] = { + { .soc_id = "*name:T4240*", .revision = "1.0", }, + { .soc_id = "*name:T4240*", .revision = "2.0", }, + { }, +}; + static void esdhc_init(struct platform_device *pdev, struct sdhci_host *host) { struct sdhci_pltfm_host *pltfm_host; @@ -571,6 +587,10 @@ static void esdhc_init(struct platform_device *pdev, struct sdhci_host *host) esdhc->vendor_ver = (host_ver & SDHCI_VENDOR_VER_MASK) >> SDHCI_VENDOR_VER_SHIFT; esdhc->spec_ver = host_ver & SDHCI_SPEC_VER_MASK; + if (soc_device_match(soc_incorrect_hostver)) + esdhc->quirk_incorrect_hostver = true; + else + esdhc->quirk_incorrect_hostver = false; } static int sdhci_esdhc_probe(struct platform_device *pdev)