Thread (22 messages) 22 messages, 6 authors, 2016-03-25

RE: [v6, 5/5] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0

From: Yangbo Lu <hidden>
Date: 2016-03-14 10:03:33
Also in: linux-arm-kernel, linux-clk, linux-devicetree, linux-i2c, linux-iommu, linux-mmc, linuxppc-dev, lkml

-----Original Message-----
From: Arnd Bergmann [mailto:arnd-r2nGTMty4D4@public.gmane.org]
Sent: Monday, March 14, 2016 6:26 AM
To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Cc: Yangbo Lu; devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-arm-
kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org; linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-
clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; iommu-cunTk1MwBs/ROKNJybVBZg@public.gmane.org
foundation.org; netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org;
ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org; Zhao Qiang; Russell King; Bhupesh Sharma; Joerg
Roedel; Santosh Shilimkar; Scott Wood; Rob Herring; Claudiu Manoil; Kumar
Gala; Yang-Leo Li; Xiaobo Xie
Subject: Re: [v6, 5/5] mmc: sdhci-of-esdhc: fix host version for T4240-
R1.0-R2.0

On Wednesday 09 March 2016 18:08:51 Yangbo Lu wrote:
quoted
@@ -567,10 +580,20 @@ static void esdhc_init(struct platform_device
*pdev, struct sdhci_host *host)
quoted
        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
[Lu Yangbo-B47093] Hi Arnd, we did have a discussion about using DTS in v1 before.
https://patchwork.kernel.org/patch/6834221/

We don't have a separate DTS file for each revision of an SOC and if we did, we'd constantly have people using the wrong one.
In addition, the device tree is stable ABI and errata are often discovered after device tree are deployed.
See the link for details.

So we decide to read SVR from the device-config/guts MMIO block other than using DTS.
Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help