All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] dw_mmc: turn on the IO supply
Date: Fri, 29 Mar 2019 15:09:52 +0100	[thread overview]
Message-ID: <3303930.9oTdIFOcIx@diego> (raw)
In-Reply-To: <20190322191436.6268-5-urjaman@gmail.com>

Am Freitag, 22. März 2019, 20:14:36 CET schrieb Urja Rannikko:
> Fixes the microSD slot on the ASUS C201.
> 
> Signed-off-by: Urja Rannikko <urjaman@gmail.com>
> ---
>  drivers/mmc/dw_mmc.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
> index 93a836eac3..e1960b213a 100644
> --- a/drivers/mmc/dw_mmc.c
> +++ b/drivers/mmc/dw_mmc.c
> @@ -13,6 +13,7 @@
>  #include <mmc.h>
>  #include <dwmmc.h>
>  #include <wait_bit.h>
> +#include <power/regulator.h>
>  
>  #define PAGE_SIZE 4096
>  
> @@ -440,6 +441,7 @@ static int dwmci_set_ios(struct mmc *mmc)
>  #endif
>  	struct dwmci_host *host = (struct dwmci_host *)mmc->priv;
>  	u32 ctype, regs;
> +	int ret;
>  
>  	debug("Buswidth = %d, clock: %d\n", mmc->bus_width, mmc->clock);
>  
> @@ -469,6 +471,19 @@ static int dwmci_set_ios(struct mmc *mmc)
>  	if (host->clksel)
>  		host->clksel(host);
>  
> +#ifdef CONFIG_DM_REGULATOR

this should be 
	#if CONFIG_IS_ENABLED(DM_REGULATOR)

because otherwise an SPL-build using the mmc driver may fail with

drivers/mmc/dw_mmc.c: In function ‘dwmci_set_ios’:
drivers/mmc/dw_mmc.c:475:9: error: ‘struct mmc’ has no member named ‘vqmmc_supply’
  if (mmc->vqmmc_supply) {
         ^~
drivers/mmc/dw_mmc.c:477:27: error: ‘struct mmc’ has no member named ‘vqmmc_supply’
    regulator_set_value(mmc->vqmmc_supply, 1800000);
                           ^~
drivers/mmc/dw_mmc.c:479:27: error: ‘struct mmc’ has no member named ‘vqmmc_supply’
    regulator_set_value(mmc->vqmmc_supply, 3300000);
                           ^~
drivers/mmc/dw_mmc.c:481:44: error: ‘struct mmc’ has no member named ‘vqmmc_supply’
   ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true);


> +	if (mmc->vqmmc_supply) {
> +		if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180)
> +			regulator_set_value(mmc->vqmmc_supply, 1800000);
> +		else
> +			regulator_set_value(mmc->vqmmc_supply, 3300000);
> +
> +		ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true);
> +		if (ret)
> +			return ret;
> +	}
> +#endif
> +
>  	return 0;
>  }
>  
> 

  reply	other threads:[~2019-03-29 14:09 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22 19:14 [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes Urja Rannikko
2019-03-22 19:14 ` [U-Boot] [PATCH 1/4] pinctrl: exit pinconfig_post_bind if there are no subnodes Urja Rannikko
2019-03-30 21:18   ` Simon Glass
2019-04-21 18:41   ` [U-Boot] [U-Boot, " Philipp Tomsich
2019-04-23 14:33   ` Philipp Tomsich
2019-03-22 19:14 ` [U-Boot] [PATCH 2/4] rk3288-board: remove pinctrl call for debug uart Urja Rannikko
2019-03-30 21:18   ` Simon Glass
2019-03-31 21:54     ` Urja Rannikko
2019-04-21 18:41   ` [U-Boot] [U-Boot, " Philipp Tomsich
2019-04-23 14:33   ` Philipp Tomsich
2019-03-22 19:14 ` [U-Boot] [PATCH 3/4] rk3288-board: cosmetic: document selecting RK PWM Urja Rannikko
2019-03-30 21:18   ` Simon Glass
2019-03-31 21:46     ` Urja Rannikko
2019-03-22 19:14 ` [U-Boot] [PATCH 4/4] dw_mmc: turn on the IO supply Urja Rannikko
2019-03-29 14:09   ` Heiko Stübner [this message]
2019-03-31 19:45     ` Urja Rannikko
2019-04-02  8:25       ` Heiko Stuebner
2019-04-01 17:44   ` [U-Boot] [PATCH v2] " Urja Rannikko
2019-04-11 20:07     ` Urja Rannikko
2019-05-13 12:25       ` Urja Rannikko
2019-05-13 12:54     ` Heiko Stuebner
2019-05-13 13:25       ` [U-Boot] [PATCH v3] " Urja Rannikko
2019-05-18 16:08         ` Simon Glass
2019-05-20  7:03         ` Peng Fan
2019-07-26  7:06           ` Kever Yang
2019-07-30  0:47             ` Peng Fan
2019-03-29 13:56 ` [U-Boot] [PATCH 0/4] Veyron Speedy / ASUS C201 fixes Heiko Stübner
2019-03-31 19:34   ` Urja Rannikko
2019-03-31 20:44     ` Heiko Stübner
2019-03-31 22:19 ` Urja Rannikko
2019-04-11 20:14 ` Urja Rannikko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3303930.9oTdIFOcIx@diego \
    --to=heiko@sntech.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.