Message ID | 20c6efa9a4c7423bbfb9352705c4a53a@hyperstone.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] mmc: mmc_spi: parse speed mode options | expand |
On Thu, Mar 31, 2022 at 07:28:47AM +0000, Christian Löhle wrote: > Since SD and MMC Highspeed modes are also valid for SPI let's parse > them too. Makes sense to me. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Signed-off-by: Christian Loehle <cloehle@hyperstone.com> > --- > drivers/mmc/host/of_mmc_spi.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c > index 3629550528b6..bf54776fb26c 100644 > --- a/drivers/mmc/host/of_mmc_spi.c > +++ b/drivers/mmc/host/of_mmc_spi.c > @@ -70,6 +70,10 @@ struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi) > } else { > oms->pdata.caps |= MMC_CAP_NEEDS_POLL; > } > + if (device_property_read_bool(dev, "cap-sd-highspeed")) > + oms->pdata.caps |= MMC_CAP_SD_HIGHSPEED; > + if (device_property_read_bool(dev, "cap-mmc-highspeed")) > + oms->pdata.caps |= MMC_CAP_MMC_HIGHSPEED; > > dev->platform_data = &oms->pdata; > return dev->platform_data; > -- > 2.34.1 > Hyperstone GmbH | Reichenaustr. 39a | 78467 Konstanz > Managing Director: Dr. Jan Peter Berns. > Commercial register of local courts: Freiburg HRB381782 >
On Thu, 31 Mar 2022 at 09:28, Christian Löhle <CLoehle@hyperstone.com> wrote: > > Since SD and MMC Highspeed modes are also valid for SPI let's parse > them too. > > Signed-off-by: Christian Loehle <cloehle@hyperstone.com> Applied for next, thanks! Kind regards Uffe > --- > drivers/mmc/host/of_mmc_spi.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c > index 3629550528b6..bf54776fb26c 100644 > --- a/drivers/mmc/host/of_mmc_spi.c > +++ b/drivers/mmc/host/of_mmc_spi.c > @@ -70,6 +70,10 @@ struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi) > } else { > oms->pdata.caps |= MMC_CAP_NEEDS_POLL; > } > + if (device_property_read_bool(dev, "cap-sd-highspeed")) > + oms->pdata.caps |= MMC_CAP_SD_HIGHSPEED; > + if (device_property_read_bool(dev, "cap-mmc-highspeed")) > + oms->pdata.caps |= MMC_CAP_MMC_HIGHSPEED; > > dev->platform_data = &oms->pdata; > return dev->platform_data; > -- > 2.34.1 > Hyperstone GmbH | Reichenaustr. 39a | 78467 Konstanz > Managing Director: Dr. Jan Peter Berns. > Commercial register of local courts: Freiburg HRB381782 >
diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c index 3629550528b6..bf54776fb26c 100644 --- a/drivers/mmc/host/of_mmc_spi.c +++ b/drivers/mmc/host/of_mmc_spi.c @@ -70,6 +70,10 @@ struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi) } else { oms->pdata.caps |= MMC_CAP_NEEDS_POLL; } + if (device_property_read_bool(dev, "cap-sd-highspeed")) + oms->pdata.caps |= MMC_CAP_SD_HIGHSPEED; + if (device_property_read_bool(dev, "cap-mmc-highspeed")) + oms->pdata.caps |= MMC_CAP_MMC_HIGHSPEED; dev->platform_data = &oms->pdata; return dev->platform_data;
Since SD and MMC Highspeed modes are also valid for SPI let's parse them too. Signed-off-by: Christian Loehle <cloehle@hyperstone.com> --- drivers/mmc/host/of_mmc_spi.c | 4 ++++ 1 file changed, 4 insertions(+)