From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3qNb8Q60vlzDq70 for ; Mon, 14 Mar 2016 09:26:45 +1100 (AEDT) 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> 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-Type: text/plain; charset="us-ascii" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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