From: Yinbo Zhu <yinbo.zhu@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/5] mmc: fsl_esdhc: ppc: set sdhc clock
Date: Tue, 26 Mar 2019 03:08:55 +0000 [thread overview]
Message-ID: <20190326031031.12216-2-yinbo.zhu@nxp.com> (raw)
In-Reply-To: <20190326031031.12216-1-yinbo.zhu@nxp.com>
From: Yinbo Zhu <yinbo.zhu@nxp.com>
This patch is to set sdhc clock for ppc
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
---
drivers/mmc/fsl_esdhc.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 9e34557d16..a65e5c19db 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -1428,7 +1428,9 @@ void fdt_fixup_esdhc(void *blob, bd_t *bd)
#endif
#if CONFIG_IS_ENABLED(DM_MMC)
+#ifndef CONFIG_PPC
#include <asm/arch/clock.h>
+#endif
__weak void init_clk_usdhc(u32 index)
{
}
@@ -1454,7 +1456,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
- priv->esdhc_regs = (struct fsl_esdhc *)addr;
+ priv->esdhc_regs = (struct fsl_esdhc *)(addr);
priv->dev = dev;
priv->mode = -1;
if (data) {
@@ -1560,7 +1562,11 @@ static int fsl_esdhc_probe(struct udevice *dev)
priv->sdhc_clk = clk_get_rate(&priv->per_clk);
} else {
+#ifndef CONFIG_PPC
priv->sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK + dev->seq);
+#else
+ priv->sdhc_clk = gd->arch.sdhc_clk;
+#endif
if (priv->sdhc_clk <= 0) {
dev_err(dev, "Unable to get clk for %s\n", dev->name);
return -EINVAL;
--
2.17.1
next prev parent reply other threads:[~2019-03-26 3:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-26 3:08 [U-Boot] [PATCH v2 1/5] ppc: t2080qds: add eSDHC node Yinbo Zhu
2019-03-26 3:08 ` Yinbo Zhu [this message]
2019-04-07 9:36 ` [U-Boot] [PATCH v2 2/5] mmc: fsl_esdhc: ppc: set sdhc clock Prabhakar Kushwaha
2019-03-26 3:08 ` [U-Boot] [PATCH v2 3/5] mmc: fsl_esdhc: ppc: adopt 32 bit address Yinbo Zhu
2019-03-26 3:09 ` [U-Boot] [PATCH v2 4/5] configs: enable device tree support for T2080QDS Yinbo Zhu
2019-03-26 3:09 ` [U-Boot] [PATCH v2 5/5] configs: enable eSDHC device module in T2080QDS Yinbo Zhu
2019-03-26 9:07 ` Yinbo Zhu
2019-03-28 8:09 ` Yinbo Zhu
2019-04-07 9:46 ` Prabhakar Kushwaha
2019-04-11 11:08 ` Yinbo Zhu
2019-04-07 9:39 ` Prabhakar Kushwaha
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=20190326031031.12216-2-yinbo.zhu@nxp.com \
--to=yinbo.zhu@nxp.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.