From patchwork Wed Sep 21 06:57:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangbo Lu X-Patchwork-Id: 9342929 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 B6CF0607D0 for ; Wed, 21 Sep 2016 07:15:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D2762A148 for ; Wed, 21 Sep 2016 07:15:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90E702A14D; Wed, 21 Sep 2016 07:15:03 +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 5C1342A14C for ; Wed, 21 Sep 2016 07:15:02 +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 1bmbib-0000fk-Cw; Wed, 21 Sep 2016 07:13:21 +0000 Received: from mail-sn1nam02on0083.outbound.protection.outlook.com ([104.47.36.83] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bmbgA-00074G-Vh for linux-arm-kernel@lists.infradead.org; Wed, 21 Sep 2016 07:10:59 +0000 Received: from BN3PR0301CA0037.namprd03.prod.outlook.com (10.160.180.175) by BY2PR0301MB0709.namprd03.prod.outlook.com (10.160.63.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.8; Wed, 21 Sep 2016 07:10:29 +0000 Received: from BN1BFFO11FD047.protection.gbl (2a01:111:f400:7c10::1:152) by BN3PR0301CA0037.outlook.office365.com (2a01:111:e400:4000::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.8 via Frontend Transport; Wed, 21 Sep 2016 07:10:29 +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 BN1BFFO11FD047.mail.protection.outlook.com (10.58.145.2) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.629.5 via Frontend Transport; Wed, 21 Sep 2016 07:10:28 +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 u8L79HVr027711; Wed, 21 Sep 2016 00:10:20 -0700 From: Yangbo Lu To: , , Scott Wood , Arnd Bergmann Subject: [v12, 8/8] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0 Date: Wed, 21 Sep 2016 14:57:20 +0800 Message-ID: <1474441040-11946-9-git-send-email-yangbo.lu@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 In-Reply-To: <1474441040-11946-1-git-send-email-yangbo.lu@nxp.com> References: <1474441040-11946-1-git-send-email-yangbo.lu@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131189154288163234; (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)(1109001)(1110001)(339900001)(199003)(189002)(8936002)(189998001)(33646002)(50466002)(48376002)(19580395003)(5003940100001)(86362001)(36756003)(87936001)(586003)(230783001)(2906002)(97736004)(626004)(68736007)(356003)(50226002)(8666005)(4326007)(106466001)(2950100001)(7846002)(229853001)(76176999)(5001770100001)(11100500001)(92566002)(19580405001)(5660300001)(50986999)(105606002)(47776003)(81166006)(305945005)(81156014)(77096005)(85426001)(104016004)(8676002)(7416002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB0709; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD047; 1:LhkogGp4UgxswLZFYoez/FLWYG1cn0XPKuMnkPeA9H0U5DwcOmvDN52+Yb/XhSpI61/rBB9YkZ8wQNIg3095flCsXyINI7M2kdAvH7ZudRKOPj8ZRLy0NgZ2Z+OlAVh3wsS0uiaAQfmKpQx/wvDipeAeBpgmhJb6RgqqKM5zvU5M6nkXM3VKa6M060J0NJO+o5RR4wcG8hgz7S5w7EOOu2LcIohkUI9yeO6AfENU/R4DaQqtdjYiGdVxmPf+Clt8fka+KplqEqKeEj2krfKq7ZTLmPOBGGO+CZOpIdGMGQcMEpUNJ8ypg4u1gDGtuYsE5rCgtxWh8G7ohdD8MlqQyHgZsJp6KTu9CHw8CaEmnsH0aUDc2FzQ+4T8ERgzsvlb2wbuVlkkIPBse3zjhl58VApnkacuSj2PjWvx65bhOtjNaJclaIeac+BAqkA4LY3HYPMkj6IgneZGFh3eNpmE5aI+UPsApaksLQBd9efF/KuBz/QLAS/FfTAo1ID1FDGcde9e3spIz21zqkcBMxYatiNhAmg3Hp8mxZ2pD9p8oaW8BlYPMlekD2bfApFTLs+RV/JSC1MblzHXWwbRzQUh9NPFiKeneAR8WRdJ4WwNyi/JWW4W+i6B7alTGgAfDRAX+dXIifeV6ubz/Zj5Cn28/upiUiq8MeR7ecWq9koJk+ZHMXdrOZMbbJ9TrkZHP6JpEWxv0nnZPDM/Shjv4TiDVEYhnkPa9JHf4hPThM3O+f6K4x/UVdUW8qaw68wdhe+i MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 4bc11856-4a27-467c-7844-08d3e1ee5e2f X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0709; 2:/1H0iPPAHhSfcO6yD1138WC3Lmjngv8Q9lWGANp/OFebHbC8UxmW/fJ0TkMlG/X8fSexXywnXSyCq48lDCQVV0lGGD+fn4nUl3D3+s5+lNwXX/aXq9QlYeewaS+jPtdqHqPSDANmrLM562Es939W3EflPrt9fZUNMM5gZhg3zsDiGgQPvaM4zcA6P8f6kZJB; 3:ExdakJVY3kGd4k2p9kCT7Lo9lPuABPju7yO+ZvoPtiBU4znvOxKLbKO7Ia18oBhOO3eM7xWaEwAu7cLddvqGxpY1w6MFOHc/3OAc7wbzJmrgO2r+2IAahMfd5N7QoBzgB56lmVmEpQ/rsMa2syX9GcOULS4rCuwuxgfg9xt3tLx9RarIm86ckfITJbY9ci4XMo3irs3V5AFt8tZZraFQCj1JQEmCf25imhKu2A1KWTQ= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0709; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0709; 25:/na75Op7d9CBcBLuEeHJhoB50XnJ+szgcmDN8tFbQJJNobJZHQufC/rtnwVqs6tipVy3T2USVi+3J+B1bGZQdEwIusBTGwR1Twtx0bXP+NR+vTq2jKRZhOCzVoGjY/4L7mzWM8IyFHjewZxvJBwzU8Q9n81+QK55nWGasFyjxA26x8o/7OQS9N35ZPwmq06wz1W4dSPnrvTVS4jsfWS8F2Rzq/6XGmqKBk3cfPIrFlAYtIhOufEHsr4botEJUxICnta6b+TZetkIqg4GusB55z2Vf+S7qsrfXk0s/ajrL7583g66iKqFRK2paw52CCEFIAP4k0v5YPbwM5PbW6AhU6Uxihj7JB+0VGpbZgkSGREPFL2+K4h+dfZkLHEOVxUU6v/ij+fYRAbkNzIn5CYLGrNHxkMzydwaLKZJIiszQQFz1kVXtFdGJivZjkhODGdDJab9r5yDPP5VaikzIdNr/QSBQvncY9O/ppZQB+AKoDSafpAD1P8ukTkYqJcjEFUXwuNyisTSwcSeBJPdkR4T8xiIjSjdWE2PBwYoyQ/cKUlDBiFXJZKMxEXMtV7tseRI3VlLhAQir3S11KuHrklap8Dbw36D38PsBRrPI0IiZs/PoB8VNOk5615oZ2mjnvzXOdMhXVDEgehBNq5Y/SMLHF9At/oAMljoj8QD5CtUGHBTTuuFKMblDNtbTiKzlSkHEBlEko04V2HMZklN8sZvBdsBYP/QAgpog67GJgjRj+VwjVnWzklxqTKwtmbTaUSi X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0709; 31:q9MHYT8A74mWH8XXXtyl5et55muyEoR1n3Agr+u2BrtWdULyy7Q+DfPHkd5vwfrACFkVCf+svIWjohSTqpnXeR8jMwp9LsPdD2DOXpuOu/j0ny4pLgMq5fdrDU9GtHsj+imQdrYY4mhWu0ShFb2BDzduypprSRkrdBTDKGTJK30EOgR4zv7h2Rf05bgU2v1RoAW7vuaS4DpfW2h/QxVNUB1WE/kukkBzFto5d2ucXJs=; 4:V1qNOSdZ+MPmOeaCbyASxCqIO50Ce2DiZgCer+a3/+H156ShJA1y1LD6jVCKOIjFmnL7jwMIe2hCSURfU2GZ9w6RPqAPlh4lkzVUkuk45ZCDEi4Fd5JDGdl1HLVEZE7IkQWQwVXRVigKhcXrpLQyUKBU1h5OZNYmi4Z+b5T7xhudRiIPUrFudIdA83ZUqxv9ZbeyiAHwDpIPSOM75PP4SCH5uY6EP/aeUo4sFrZCdNql/9vxmNfAv2Pjrfa6CbXQIQ6YIrRQZ+U301T1EnHRkDkb2zxa8TPfRfCZMr4Ou24ipHeqA3fSNKra6RDUjdm+NZRbxcSw9lY1dHEkDfGMcGX97y7Pxj3m/SwOkgeA8/Cr/J79hbx3PtLUK8t43g8L8jK1vpJ3/i8VG+jFOQQlZXU62IVgaBmEPniWl6r6iUH5yq7szNVxG/ap/iOPixj7ELz0iR/0Hldm2U01VH+txOdSuUizJ/h9QY+XKgox9u59HCDvCFkuMd+2Cs9HRxD9UtYJPdSd4YKVR87++XWMUjHrQ+V5xydTfkeESzhTEME= 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)(13023025)(13024025)(13018025)(13017025)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:BY2PR0301MB0709; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR0301MB0709; X-Forefront-PRVS: 007271867D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0301MB0709; 23:1AfPwz+5iVM1Cjs2XlWFlKNBKJiRfNV5UGoJ0F7?= =?us-ascii?Q?evrbkxMvM9oh5vfINfNtys6RUVAOSf7hbZ6FpX6O6yxTfHAQTwFGwkh0NPGw?= =?us-ascii?Q?AbzzzSWURzEzkp1/IsvQKoE2i4vEtlBFOy7q06BcrKLzs+uPLZWrn/HB5+ju?= =?us-ascii?Q?RlQn6KI/LF8oMV1VTp7T7NwCZ+zgrBDHUmQMyB1OjWyD2wssyceSS/T7oXz+?= =?us-ascii?Q?Rm0IkCrD/cnplIhN1s9uL6O9EkYjt9QOIganeR7B7SZNroLSbbZcwdxJQydd?= =?us-ascii?Q?hAq5nNhUOaiIzqxi5Bw+T0l1Ngq90bKRT656slGESzQF+BqaAnYMHphZNn99?= =?us-ascii?Q?AKD2gBucNW0BoIN0vfuQkvDlAtSRgGUUqpxScVihkqlhnl2q/baTqXumGH/f?= =?us-ascii?Q?h5EWOf1uW4ItX7Kweo5gc6JwItZ+PswtSKfgAkaGsKqpzHJa4n49AOW0yZG4?= =?us-ascii?Q?zKfwVYD36d5geHoErZ68K4ofElMpTWQDxrgxInLBTQ9j24seSxaXHJVudEcJ?= =?us-ascii?Q?Ttz1RQZCnxuoCAvd97lDitk5ELYgPqI6fDf7Ou9cl3qCoE9nLmb0pXaASXkq?= =?us-ascii?Q?HM+umCKxGDC69J5NndpkobgSU/uezuWBXF5fM7wJVG5BFCHMPUjS1+zJKIym?= =?us-ascii?Q?IERuarNFODJ1J2OrlPFWwNWnfKh7E8A+g3FpgAGX2WV4eVm89A2V35b0ZxBk?= =?us-ascii?Q?Io3OrIgfTDvU11YAxSZhqyn8XuGE9irrLNg+vwePTx+C52fzf2QINJVQZvHP?= =?us-ascii?Q?9r6SGFMTySQvIkNaJOVZ1RiZV3sheBNQWR5dYej22L9lTZJLDYOKr0hH1LTJ?= =?us-ascii?Q?+JiE5TksuHOy6fSAgPt9thnt9pCNmqADfbT88ucBfNTn7s3fMXbm0cmDpbAD?= =?us-ascii?Q?kuhuNBmMXJ1Aouc3RKMXM0nWhmjeIiEoF/BDURK2o/0ACbUhPUI6RzX+yk0C?= =?us-ascii?Q?YmLWPj7FJMBslwnduLomklaWtnTZdjNrNxJfnzJAAT3d9ZqxAKLYF0yJ9W1O?= =?us-ascii?Q?wxRKixPqrx6HZo9MUufwZmU6YhuGnczf4l50rQg14eNr3lasUa1RMiaYS8xC?= =?us-ascii?Q?7aEdbrQmbVHyw43sy+6V+JPGQiJf2sEKFQikEz0HM4WBqb4gQSH2YWtFRcKV?= =?us-ascii?Q?tESm7JVY9EKN1yrqNZPCXTDnrNLiL1ajpOhqjfu0VT5G0BbRudTCLVwylBUW?= =?us-ascii?Q?jGK9Q/ykVsbIPoDbnpkV168yjfW1/2CAnp2ug?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0709; 6:uophTg7Yvr37ZHEFHUOlTpnxH6RZyOe1+9BEqBhX1c95roD9bI8/Zcht2dcM0WyF7H1VeqEVDWSTKTJMuXcoNr3vIyI7O62bDpsSWz56rx4OeCUosfhd3sFBrRNxi4qljIt+EbdKGjn1YkwvfnWK56XOGviVc41DHNMuW1wmDzkzPdUPPHwlOxkqHJGLQVU7kqli7LLpo3/DUHTbVisH9bZ1uRsJkb3Fq/TujMS0RC/Cy3nylFCoSJpWkh6pohJFNFG1yqbnZgB0veiyFNT4OFF0B05/lVlfyfCW5/vIUco=; 5:jlWzysz17YSeY6JYfCvusTwMRwNWS8nbzLKN8WFLrM7ZbYs0ylMzmc8R4k2GnsRlz7pOmYtLqZ2WAPHdbygBoWIbKP6B/70qIWhsRKjmj0rtkLykdIXrvudsRLU8cGHlFct7VYNrZ2e8HSoA3Z3JLTzJ1t4Y/kyIPxGbqamq0js=; 24:lXA5Yz40sfpdZGWj3u9/D+xRUKIXiw2HGBMmiJ9uijuxqRBLVj47vGyG8XM6cie7oc9P/a6yN/m2czHs4KxseHhbmta4xvPDOj/yYlXBovc=; 7:TIS4c0QVvwODKDG/wpbU6z90ieGMm8oh91vhtl5Gld1Vgv4ziDeaNrZ+7fzdn5eZ447nqyFTitFtmMzCl0aXRCRhLtD2+K2gq9qa+ujERqwuEcoKTUGJBtxKjrcQ2FQsTvPfePGm5vjrIfIw4wxlPAKoKs5vbBO81TaavbpXdMkuib4Ti6X5vH+Sjf++xR+rVvYvk+SrhbTJMn50vSWYvJH1ZFco3DNoqIbNyi3W4/W0E16H+wDE1L39BuhWLp7icq/jZhMiSET6akaRekk8lKTQD9kY2RV+pwO0h1BZnUX/kb5q0MvAMgkqMYkM/4oR SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2016 07:10:28.3951 (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: BY2PR0301MB0709 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160921_001051_534137_27DA0FA7 X-CRM114-Status: GOOD ( 20.93 ) 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 , Xiaobo Xie , Minghuan Lian , linux-i2c@vger.kernel.org, linux-clk@vger.kernel.org, Qiang Zhao , Russell King , Bhupesh Sharma , Joerg Roedel , Jochen Friedrich , Claudiu Manoil , devicetree@vger.kernel.org, Kumar Gala , Rob Herring , Santosh Shilimkar , linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Leo Li , iommu@lists.linux-foundation.org, Yangbo Lu , linuxppc-dev@lists.ozlabs.org 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 Changes for v12: - Matched soc through .family field instead of .soc_id --- 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..57bdb9e 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[] = { + { .family = "QorIQ T4240", .revision = "1.0", }, + { .family = "QorIQ 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)