Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932915AbcCMW1g (ORCPT ); Sun, 13 Mar 2016 18:27:36 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:58435 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932195AbcCMW10 (ORCPT ); Sun, 13 Mar 2016 18:27:26 -0400 From: Arnd Bergmann To: linuxppc-dev@lists.ozlabs.org Cc: Yangbo Lu , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, iommu@lists.linux-foundation.org, netdev@vger.kernel.org, linux-mmc@vger.kernel.org, ulf.hansson@linaro.org, Zhao Qiang , Russell King , Bhupesh Sharma , Joerg Roedel , Santosh Shilimkar , scott.wood@nxp.com, Rob Herring , Claudiu Manoil , Kumar Gala , leoyang.li@nxp.com, xiaobo.xie@nxp.com Subject: Re: [v6, 5/5] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0 Date: Sun, 13 Mar 2016 23:26:28 +0100 Message-ID: <4947024.WeMycs2fID@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1457518131-11339-6-git-send-email-yangbo.lu@nxp.com> References: <1457518131-11339-1-git-send-email-yangbo.lu@nxp.com> <1457518131-11339-6-git-send-email-yangbo.lu@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:Qj5NhfPEpLz03ygtY5c4r/JOmskJqQskpZGyXuaDpCb5HrQIZRK TJXI04WV575zXCpTrkjNhIIZmDC9R4Avm8tznyvE4X07RNtuIe9DBkGQnKxRTuY74+6xzti cUCA1DzMsQbnMCPqdNtvYtVa7HDvaOfOCmSizE+pPG4xTDPLx2/N7RgXvb3xUJXOgqiwzA+ e6Ar3D5ss698qLZvzdO/g== X-UI-Out-Filterresults: notjunk:1;V01:K0:ObynSclBxu0=:581wd0yRaGwQBdho6iITC6 O5oudYG+ZtgYYS+7Bjnx1PWh7tjIZo8pUQhcRSkrPXb+5mP37bWMSgpipt+r/0jCAFrhElypV 6Xlr5GMPuXCMf71scrzY1o5cVWSEsXVgXjl0m6BUDsewMC/zpMywcXjRWdUHjyXelU6yQ2JiM JcbbI/urGHQhNZ8r5VeeJ/baE56b29Hc7HfvPbXYIkIRKURGvfd2VyUVoCeK7orbIirDfId+d f7VtLVLnQffa4INH1n1Fc4zHMgJ5LEB+qVM8DJY31BZbkaV1FcuHXyfHQt3UHz9KORK3YEGa5 i9Ik1L+gFOn59G+xeOjzhgp+hV3xM+raChAhGL7ZlL07nWyYG8ETl/FK20KN2sc2UyXlC09QO TtQCeFknjrrWiQAKut4C61HK5sUpBQFhgYZvFIwteJ98WKLzFu4ZPZLqMFD5ehuAcXhBad+ll BiMr9V7aYdnjk6f02FmjLt3+Rr+Q/MeIs6YYmjaQCDD6Pq4oGE6pj5yYRrVeayBm7y+orFY01 bSsLM2KUYZTyZiCP8QgLucP1WGsVoNVOouV34Pzhtk+w82d0p/mt2mPYaeUolkgXzC27NQZ4s MUxbNQnfL3tO29plxyVpqVtzzvsIO42AegIFJt6Hg9O80zAGPFzllZEJmu8AHlnpdOiSj+HJN 00EFdvAC9WbH5whKYIOcmwVKz2CAuw8u4MXB1+1V92GJyu4daFuDXfPQo+eVHw/Qgx7dpWDjD Y3RtO4kBP82MgpdW Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 846 Lines: 25 On Wednesday 09 March 2016 18:08:51 Yangbo Lu wrote: > @@ -567,10 +580,20 @@ static void esdhc_init(struct platform_device *pdev, struct sdhci_host *host) > struct sdhci_pltfm_host *pltfm_host; > struct sdhci_esdhc *esdhc; > u16 host_ver; > + u32 svr; > > pltfm_host = sdhci_priv(host); > esdhc = sdhci_pltfm_priv(pltfm_host); > > + fsl_guts_init(); > + svr = fsl_guts_get_svr(); > + if (svr) { > + esdhc->soc_ver = SVR_SOC_VER(svr); > + esdhc->soc_rev = SVR_REV(svr); > + } else { > + dev_err(&pdev->dev, "Failed to get SVR value!\n"); > + } > + This makes the driver non-portable. Better identify the specific workarounds based on the compatible string for this device, or add a boolean DT property for the quirk. Arnd