[U-Boot] [PATCH 03/12] mmc: sdhci: Add support for platform/board specific tuning

Michal Simek michal.simek at xilinx.com
Wed Jan 18 10:11:56 CET 2017


On 18.1.2017 10:04, Siva Durga Prasad Paladugu wrote:
> Add support to execute platform/board specific tuning needed
> for SDR104 and SDR50 UHS modes.This patch adds hook routine
> to support specific tuning requirements.
> 
> Signed-off-by: Siva Durga Prasad Paladugu <sivadur at xilinx.com>
> ---
>  drivers/mmc/sdhci.c | 8 ++++++++
>  include/sdhci.h     | 1 +
>  2 files changed, 9 insertions(+)
> 
> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
> index 5ae56e0..7b968d5 100644
> --- a/drivers/mmc/sdhci.c
> +++ b/drivers/mmc/sdhci.c
> @@ -309,11 +309,19 @@ static int sdhci_execute_tuning(struct mmc *mmc, u8 opcode)
>  	struct mmc_cmd cmd;
>  	struct mmc_data data;
>  	u32 ctrl;
> +	int err;
>  	u8 tuning_loop_counter = 40;
>  	struct sdhci_host *host = mmc->priv;
>  
>  	debug("%s\n", __func__);
>  
> +	if (host->ops->platform_execute_tuning) {
> +		err = host->ops->platform_execute_tuning(mmc, opcode);
> +		if (err)
> +			return err;
> +		return 0;
> +	}
> +

This can be just this:
	if (host->ops->platform_execute_tuning)
		return host->ops->platform_execute_tuning(mmc, opcode);

M



More information about the U-Boot mailing list