Message ID | 20210921110029.21944-5-tony@atomide.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Prepare sdhci-omap to support more SoCs | expand |
On Tue, 21 Sept 2021 at 13:00, Tony Lindgren <tony@atomide.com> wrote: > > We need to support the legacy ti,non-removable property too. Let's warn > about the legacy property and mark the device as non-removable. > > Naturally all the mainline kernel devicetree files will get updated to use > the standard non-removable property with the sdhci-omap conversion. But we > also have folks updating their kernels with custom devicetree files that > we need to consider. > > Signed-off-by: Tony Lindgren <tony@atomide.com> > --- > drivers/mmc/host/sdhci-omap.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c > --- a/drivers/mmc/host/sdhci-omap.c > +++ b/drivers/mmc/host/sdhci-omap.c > @@ -1213,6 +1213,11 @@ static int sdhci_omap_probe(struct platform_device *pdev) > if (of_find_property(dev->of_node, "dmas", NULL)) > sdhci_switch_external_dma(host, true); > > + if (device_property_read_bool(dev, "ti,non-removable")) { > + dev_warn_once(dev, "using old ti,non-removable property\n"); Perhaps we should document this property for sdhci-omap and thus also set it as deprecated. What do you think? > + mmc->caps |= MMC_CAP_NONREMOVABLE; > + } > + > /* R1B responses is required to properly manage HW busy detection. */ > mmc->caps |= MMC_CAP_NEED_RSP_BUSY; > > -- > 2.33.0 Kind regards Uffe
* Ulf Hansson <ulf.hansson@linaro.org> [210923 18:43]: > On Tue, 21 Sept 2021 at 13:00, Tony Lindgren <tony@atomide.com> wrote: > > --- a/drivers/mmc/host/sdhci-omap.c > > +++ b/drivers/mmc/host/sdhci-omap.c > > @@ -1213,6 +1213,11 @@ static int sdhci_omap_probe(struct platform_device *pdev) > > if (of_find_property(dev->of_node, "dmas", NULL)) > > sdhci_switch_external_dma(host, true); > > > > + if (device_property_read_bool(dev, "ti,non-removable")) { > > + dev_warn_once(dev, "using old ti,non-removable property\n"); > > Perhaps we should document this property for sdhci-omap and thus also > set it as deprecated. What do you think? Yes good idea, I'll send a patch for that. Regards, Tony
diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -1213,6 +1213,11 @@ static int sdhci_omap_probe(struct platform_device *pdev) if (of_find_property(dev->of_node, "dmas", NULL)) sdhci_switch_external_dma(host, true); + if (device_property_read_bool(dev, "ti,non-removable")) { + dev_warn_once(dev, "using old ti,non-removable property\n"); + mmc->caps |= MMC_CAP_NONREMOVABLE; + } + /* R1B responses is required to properly manage HW busy detection. */ mmc->caps |= MMC_CAP_NEED_RSP_BUSY;
We need to support the legacy ti,non-removable property too. Let's warn about the legacy property and mark the device as non-removable. Naturally all the mainline kernel devicetree files will get updated to use the standard non-removable property with the sdhci-omap conversion. But we also have folks updating their kernels with custom devicetree files that we need to consider. Signed-off-by: Tony Lindgren <tony@atomide.com> --- drivers/mmc/host/sdhci-omap.c | 5 +++++ 1 file changed, 5 insertions(+)