From: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mmc: sh_mmcif: Add support rmobile
Date: Wed, 3 Dec 2014 17:57:48 +0900 [thread overview]
Message-ID: <1417597068-5478-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> (raw)
Renesas R-Mobile/R-Car ARM SoC of MMC has the same IP that are supported by
sh_mmcif. This adds support R-Mobile/R-Car ARM SoC with the setting of the
clock support.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
---
drivers/mmc/sh_mmcif.c | 2 +-
drivers/mmc/sh_mmcif.h | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c
index 3a2022c..76ba93b 100644
--- a/drivers/mmc/sh_mmcif.c
+++ b/drivers/mmc/sh_mmcif.c
@@ -596,7 +596,7 @@ int mmcif_mmc_init(void)
host->clk = CONFIG_SH_MMCIF_CLK;
sh_mmcif_cfg.f_min = MMC_CLK_DIV_MIN(host->clk);
- sh_mmcif_cfg.f_max = MMC_CLK_DIV_MAX;
+ sh_mmcif_cfg.f_max = MMC_CLK_DIV_MAX(host->clk);
mmc = mmc_create(&sh_mmcif_cfg, host);
if (mmc == NULL) {
diff --git a/drivers/mmc/sh_mmcif.h b/drivers/mmc/sh_mmcif.h
index 70034e2..4b6752f 100644
--- a/drivers/mmc/sh_mmcif.h
+++ b/drivers/mmc/sh_mmcif.h
@@ -199,8 +199,13 @@ struct sh_mmcif_regs {
#define SOFT_RST_OFF (0 << 31)
#define CLKDEV_EMMC_DATA 52000000 /* 52MHz */
+#ifdef CONFIG_RMOBILE
+#define MMC_CLK_DIV_MIN(clk) (clk / (1 << 9))
+#define MMC_CLK_DIV_MAX(clk) (clk / (1 << 1))
+#else
#define MMC_CLK_DIV_MIN(clk) (clk / (1 << 8))
-#define MMC_CLK_DIV_MAX CLKDEV_EMMC_DATA
+#define MMC_CLK_DIV_MAX(clk) CLKDEV_EMMC_DATA
+#endif
#define MMC_BUS_WIDTH_1 0
#define MMC_BUS_WIDTH_4 2
--
2.1.3
reply other threads:[~2014-12-03 8:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1417597068-5478-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com \
--to=nobuhiro.iwamatsu.yj@renesas.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.