public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Max Krummenacher <max.krummenacher@toradex.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/6] clk: imx8qm: fix usdhc2 clocks
Date: Wed, 01 May 2019 16:18:28 +0200	[thread overview]
Message-ID: <1556720308.1765.38.camel@toradex.com> (raw)
In-Reply-To: <20190430100629.9212-4-marcel@ziswiler.com>

Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>

On Tue, 2019-04-30 at 12:06 +0200, Marcel Ziswiler wrote:
> Trying to bring up uSDHC2 the following error message was observed:
> 
> MMC:   imx8_clk_set_rate(Invalid clk ID #60)
> imx8_clk_set_rate(Invalid clk ID #60)
> usdhc at 5b030000 - probe failed: -22
> 
> This commit fixes this by properly setting resp. clocks.
> 
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> 
> ---
> 
>  drivers/clk/imx/clk-imx8qm.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/clk/imx/clk-imx8qm.c b/drivers/clk/imx/clk-imx8qm.c
> index 6b5561e178..a6b09d2109 100644
> --- a/drivers/clk/imx/clk-imx8qm.c
> +++ b/drivers/clk/imx/clk-imx8qm.c
> @@ -80,6 +80,12 @@ ulong imx8_clk_get_rate(struct clk *clk)
>  		resource = SC_R_SDHC_1;
>  		pm_clk = SC_PM_CLK_PER;
>  		break;
> +	case IMX8QM_SDHC2_IPG_CLK:
> +	case IMX8QM_SDHC2_CLK:
> +	case IMX8QM_SDHC2_DIV:
> +		resource = SC_R_SDHC_2;
> +		pm_clk = SC_PM_CLK_PER;
> +		break;
>  	case IMX8QM_UART0_IPG_CLK:
>  	case IMX8QM_UART0_CLK:
>  		resource = SC_R_UART_0;
> @@ -185,6 +191,12 @@ ulong imx8_clk_set_rate(struct clk *clk, unsigned long rate)
>  		resource = SC_R_SDHC_1;
>  		pm_clk = SC_PM_CLK_PER;
>  		break;
> +	case IMX8QM_SDHC2_IPG_CLK:
> +	case IMX8QM_SDHC2_CLK:
> +	case IMX8QM_SDHC2_DIV:
> +		resource = SC_R_SDHC_2;
> +		pm_clk = SC_PM_CLK_PER;
> +		break;
>  	case IMX8QM_ENET0_IPG_CLK:
>  	case IMX8QM_ENET0_AHB_CLK:
>  	case IMX8QM_ENET0_REF_DIV:
> @@ -273,6 +285,12 @@ int __imx8_clk_enable(struct clk *clk, bool enable)
>  		resource = SC_R_SDHC_1;
>  		pm_clk = SC_PM_CLK_PER;
>  		break;
> +	case IMX8QM_SDHC2_IPG_CLK:
> +	case IMX8QM_SDHC2_CLK:
> +	case IMX8QM_SDHC2_DIV:
> +		resource = SC_R_SDHC_2;
> +		pm_clk = SC_PM_CLK_PER;
> +		break;
>  	case IMX8QM_ENET0_IPG_CLK:
>  	case IMX8QM_ENET0_AHB_CLK:
>  	case IMX8QM_ENET0_REF_DIV:

  reply	other threads:[~2019-05-01 14:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-30 10:06 [U-Boot] [PATCH 0/6] apalis imx8qm 4gb wb it v1.0b module support Marcel Ziswiler
2019-04-30 10:06 ` [U-Boot] [PATCH 1/6] arm: dts: imx8qm: add lpuart1, lpuart2, lpuart3, lpuart4 Marcel Ziswiler
2019-05-01 14:18   ` Max Krummenacher
2019-04-30 10:06 ` [U-Boot] [PATCH 2/6] arm: dts: imx8qm: add support for i2c0, i2c1, i2c2, i2c3 and i2c4 Marcel Ziswiler
2019-05-01 14:18   ` Max Krummenacher
2019-04-30 10:06 ` [U-Boot] [PATCH 3/6] clk: imx8qm: fix usdhc2 clocks Marcel Ziswiler
2019-05-01 14:18   ` Max Krummenacher [this message]
2019-04-30 10:06 ` [U-Boot] [PATCH 4/6] imx8qm: fix cpu frequency reporting Marcel Ziswiler
2019-05-01 14:18   ` Max Krummenacher
2019-04-30 10:06 ` [U-Boot] [PATCH 5/6] imx8: fuse: fix fuse driver Marcel Ziswiler
2019-05-01 14:18   ` Max Krummenacher
2019-04-30 10:06 ` [U-Boot] [PATCH 6/6] board: toradex: add apalis imx8qm 4gb wb it v1.0b module support Marcel Ziswiler
2019-05-01 14:19   ` Max Krummenacher

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=1556720308.1765.38.camel@toradex.com \
    --to=max.krummenacher@toradex.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox