All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>, u-boot@lists.denx.de
Cc: peng.fan@nxp.com, faiz_abbas@ti.com, sjg@chromium.org,
	michael@walle.cc, git@xilinx.com, monstr@monstr.eu,
	somaashokreddy@gmail.com,
	T Karthik Reddy <t.karthik.reddy@xilinx.com>
Subject: Re: [PATCH v3 1/7] mmc: zynq_sdhci: Return errors from arasan_sdhci_set_tapdelay
Date: Mon, 2 Aug 2021 08:08:57 +0900	[thread overview]
Message-ID: <38f532e7-1603-c9c5-bb1f-c21ac5b1d741@samsung.com> (raw)
In-Reply-To: <20210730122842.3264-2-ashok.reddy.soma@xilinx.com>

On 7/30/21 9:28 PM, Ashok Reddy Soma wrote:
> Change return type of arasan_sdhci_set_tapdelay() to int, to facilitate
> returning errors. Get return values from input and output set clock phase
> functions inside arasan_sdhci_set_tapdelay() and return those errors.
> 
> Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>

Best Regards,
Jaehoon Chung

> ---
> 
> Changes in v3:
>  - Added new line after return at two places
> 
> Changes in v2:
>  - Split patch 1/7 to two patches, one for zynq_sdhci and other one
>    for sdhci
> 
>  drivers/mmc/zynq_sdhci.c | 23 ++++++++++++++++++-----
>  1 file changed, 18 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
> index ba87ee8dd5..1ecc2ec669 100644
> --- a/drivers/mmc/zynq_sdhci.c
> +++ b/drivers/mmc/zynq_sdhci.c
> @@ -422,7 +422,7 @@ static int sdhci_versal_sampleclk_set_phase(struct sdhci_host *host,
>  	return 0;
>  }
>  
> -static void arasan_sdhci_set_tapdelay(struct sdhci_host *host)
> +static int arasan_sdhci_set_tapdelay(struct sdhci_host *host)
>  {
>  	struct arasan_sdhci_priv *priv = dev_get_priv(host->mmc->dev);
>  	struct arasan_sdhci_clk_data *clk_data = &priv->clk_data;
> @@ -431,18 +431,31 @@ static void arasan_sdhci_set_tapdelay(struct sdhci_host *host)
>  	u8 timing = mode2timing[mmc->selected_mode];
>  	u32 iclk_phase = clk_data->clk_phase_in[timing];
>  	u32 oclk_phase = clk_data->clk_phase_out[timing];
> +	int ret;
>  
>  	dev_dbg(dev, "%s, host:%s, mode:%d\n", __func__, host->name, timing);
>  
>  	if (IS_ENABLED(CONFIG_ARCH_ZYNQMP) &&
>  	    device_is_compatible(dev, "xlnx,zynqmp-8.9a")) {
> -		sdhci_zynqmp_sampleclk_set_phase(host, iclk_phase);
> -		sdhci_zynqmp_sdcardclk_set_phase(host, oclk_phase);
> +		ret = sdhci_zynqmp_sampleclk_set_phase(host, iclk_phase);
> +		if (ret)
> +			return ret;
> +
> +		ret = sdhci_zynqmp_sdcardclk_set_phase(host, oclk_phase);
> +		if (ret)
> +			return ret;
>  	} else if (IS_ENABLED(CONFIG_ARCH_VERSAL) &&
>  		   device_is_compatible(dev, "xlnx,versal-8.9a")) {
> -		sdhci_versal_sampleclk_set_phase(host, iclk_phase);
> -		sdhci_versal_sdcardclk_set_phase(host, oclk_phase);
> +		ret = sdhci_versal_sampleclk_set_phase(host, iclk_phase);
> +		if (ret)
> +			return ret;
> +
> +		ret = sdhci_versal_sdcardclk_set_phase(host, oclk_phase);
> +		if (ret)
> +			return ret;
>  	}
> +
> +	return 0;
>  }
>  
>  static void arasan_dt_read_clk_phase(struct udevice *dev, unsigned char timing,
> 


  reply	other threads:[~2021-08-01 23:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 12:28 [PATCH v3 0/7] Arasan sdhci driver updates Ashok Reddy Soma
2021-07-30 12:28 ` [PATCH v3 1/7] mmc: zynq_sdhci: Return errors from arasan_sdhci_set_tapdelay Ashok Reddy Soma
2021-08-01 23:08   ` Jaehoon Chung [this message]
2021-07-30 12:28 ` [PATCH v3 2/7] mmc: sdhci: Change prototype of set_delay to return errors Ashok Reddy Soma
2021-08-01 23:09   ` Jaehoon Chung
2021-07-30 12:28 ` [PATCH v3 3/7] zynqmp_firmware: Add zynqmp firmware related enums Ashok Reddy Soma
2021-07-30 12:28 ` [PATCH v3 4/7] mmc: zynq_sdhci: Add xilinx_pm_request() method to set tapdelays Ashok Reddy Soma
2021-07-30 12:28 ` [PATCH v3 5/7] mmc: zynq_sdhci: Move setting tapdelay code to driver Ashok Reddy Soma
2021-07-30 12:28 ` [PATCH v3 6/7] mmc: zynq_sdhci: Wait till sd card detect state is stable Ashok Reddy Soma
2021-07-30 12:28 ` [PATCH v3 7/7] mmc: zynq_sdhci: Use set_control_reg from sdhci.c Ashok Reddy Soma

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=38f532e7-1603-c9c5-bb1f-c21ac5b1d741@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=ashok.reddy.soma@xilinx.com \
    --cc=faiz_abbas@ti.com \
    --cc=git@xilinx.com \
    --cc=michael@walle.cc \
    --cc=monstr@monstr.eu \
    --cc=peng.fan@nxp.com \
    --cc=sjg@chromium.org \
    --cc=somaashokreddy@gmail.com \
    --cc=t.karthik.reddy@xilinx.com \
    --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.