mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
mmc: sdhci-esdhc-imx: support voltage-range property
Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
This commit is contained in:
parent
9369c97cc7
commit
07bf2b54cd
2 changed files with 9 additions and 1 deletions
|
|
@ -864,6 +864,7 @@ static const struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
|
|||
#ifdef CONFIG_OF
|
||||
static int
|
||||
sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
|
||||
struct sdhci_host *host,
|
||||
struct esdhc_platform_data *boarddata)
|
||||
{
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
|
|
@ -900,11 +901,14 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
|
|||
if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
|
||||
boarddata->delay_line = 0;
|
||||
|
||||
mmc_of_parse_voltage(np, &host->ocr_mask);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static inline int
|
||||
sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
|
||||
struct sdhci_host *host,
|
||||
struct esdhc_platform_data *boarddata)
|
||||
{
|
||||
return -ENODEV;
|
||||
|
|
@ -999,7 +1003,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
|
|||
host->ioaddr + ESDHC_TUNING_CTRL);
|
||||
|
||||
boarddata = &imx_data->boarddata;
|
||||
if (sdhci_esdhc_imx_probe_dt(pdev, boarddata) < 0) {
|
||||
if (sdhci_esdhc_imx_probe_dt(pdev, host, boarddata) < 0) {
|
||||
if (!host->mmc->parent->platform_data) {
|
||||
dev_err(mmc_dev(host->mmc), "no board data!\n");
|
||||
err = -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue