diff mbox series

mmc: sdhci-pci: Add max-frequency device property for Intel controllers

Message ID 20181127115833.8498-1-adrian.hunter@intel.com (mailing list archive)
State New, archived
Headers show
Series mmc: sdhci-pci: Add max-frequency device property for Intel controllers | expand

Commit Message

Adrian Hunter Nov. 27, 2018, 11:58 a.m. UTC
Add support for the mmc max-frequency device property for Intel BYT-based
host controllers.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 drivers/mmc/host/sdhci-pci-core.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Ulf Hansson Dec. 5, 2018, 2:23 p.m. UTC | #1
On Tue, 27 Nov 2018 at 13:00, Adrian Hunter <adrian.hunter@intel.com> wrote:
>
> Add support for the mmc max-frequency device property for Intel BYT-based
> host controllers.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>

Applied for next, thanks!

Kind regards
Uffe

> ---
>  drivers/mmc/host/sdhci-pci-core.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> index c4115bae5db1..5fe48d0f5c7e 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -710,11 +710,15 @@ static int intel_execute_tuning(struct mmc_host *mmc, u32 opcode)
>  static void byt_probe_slot(struct sdhci_pci_slot *slot)
>  {
>         struct mmc_host_ops *ops = &slot->host->mmc_host_ops;
> +       struct device *dev = &slot->chip->pdev->dev;
> +       struct mmc_host *mmc = slot->host->mmc;
>
>         byt_read_dsm(slot);
>
>         ops->execute_tuning = intel_execute_tuning;
>         ops->start_signal_voltage_switch = intel_start_signal_voltage_switch;
> +
> +       device_property_read_u32(dev, "max-frequency", &mmc->f_max);
>  }
>
>  static int byt_emmc_probe_slot(struct sdhci_pci_slot *slot)
> --
> 2.17.1
>
diff mbox series

Patch

diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index c4115bae5db1..5fe48d0f5c7e 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -710,11 +710,15 @@  static int intel_execute_tuning(struct mmc_host *mmc, u32 opcode)
 static void byt_probe_slot(struct sdhci_pci_slot *slot)
 {
 	struct mmc_host_ops *ops = &slot->host->mmc_host_ops;
+	struct device *dev = &slot->chip->pdev->dev;
+	struct mmc_host *mmc = slot->host->mmc;
 
 	byt_read_dsm(slot);
 
 	ops->execute_tuning = intel_execute_tuning;
 	ops->start_signal_voltage_switch = intel_start_signal_voltage_switch;
+
+	device_property_read_u32(dev, "max-frequency", &mmc->f_max);
 }
 
 static int byt_emmc_probe_slot(struct sdhci_pci_slot *slot)