Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1356756 > unrolled thread

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

Started byArnd Bergmann <arnd@arndb.de>
First post2016-03-13 23:30 +0100
Last post2016-03-14 19:20 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [v6, 5/5] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0 Arnd Bergmann <arnd@arndb.de> - 2016-03-13 23:30 +0100
    RE: [v6, 5/5] mmc: sdhci-of-esdhc: fix host version for  T4240-R1.0-R2.0 Yangbo Lu <yangbo.lu@nxp.com> - 2016-03-14 11:10 +0100
      Re: [v6, 5/5] mmc: sdhci-of-esdhc: fix host version for  T4240-R1.0-R2.0 Scott Wood <scott.wood@nxp.com> - 2016-03-14 19:20 +0100

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

FromArnd Bergmann <arnd@arndb.de>
Date2016-03-13 23:30 +0100
SubjectRe: [v6, 5/5] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0
Message-ID<rcmGm-3k2-21@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


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

FromYangbo Lu <yangbo.lu@nxp.com>
Date2016-03-14 11:10 +0100
SubjectRE: [v6, 5/5] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0
Message-ID<rcxBM-2ly-13@gated-at.bofh.it>
In reply to#1356756
> -----Original Message-----
> From: Arnd Bergmann [mailto:arnd@arndb.de]
> Sent: Monday, March 14, 2016 6:26 AM
> 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; 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:
> > @@ -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

[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.

[toc] | [prev] | [next] | [standalone]


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

FromScott Wood <scott.wood@nxp.com>
Date2016-03-14 19:20 +0100
SubjectRe: [v6, 5/5] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0
Message-ID<rcFg0-7qA-71@gated-at.bofh.it>
In reply to#1357115
On 03/14/2016 02:29 AM, Yangbo Lu wrote:
>> -----Original Message-----
>> From: Arnd Bergmann [mailto:arnd@arndb.de]
>> Sent: Monday, March 14, 2016 6:26 AM
>> 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; 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:
>>> @@ -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
> 
> [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.

Also note that this driver is already only for fsl-specific hardware,
and it will still work even if fsl_guts doesn't find anything to bind to
-- it just wouldn't be able to detect errata based on SVR in that case.

-Scott

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web