From: Jaehoon Chung <jh80.chung@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/2] mmc: rockchip: add clock init
Date: Fri, 29 Jul 2016 17:01:40 +0900 [thread overview]
Message-ID: <579B0D64.8090601@samsung.com> (raw)
In-Reply-To: <1469774525-7898-1-git-send-email-kever.yang@rock-chips.com>
Hi Kever,
On 07/29/2016 03:42 PM, Kever Yang wrote:
> Init clock for eMMC controller.
Sorry for too often requesting something.
If you add the commit msg in more detail, then it's more great.:)
"Initialize the maximum clock with CMU, before setting the rockchip sdhci host controller."
And when you send the patch, i recommend to use the prefix likes this.
"mmc: rockchip_sdhci: ..."
Because there are two controller for rockchip.(rockchip_dw_mmc and rockchip_sdhci)
If use the prefix, then other guys can know whether patch relevant to which driver.
Other things looks good to me. If you send the patch v3, then you can add with my reviewed tag for this patch.
Best Regards,
Jaehoon Chung
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
> Changes in v2:
> - update base on comments from Jaehoon Chung
>
> drivers/mmc/rockchip_sdhci.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c
> index 023c29b..fda3d45 100644
> --- a/drivers/mmc/rockchip_sdhci.c
> +++ b/drivers/mmc/rockchip_sdhci.c
> @@ -7,6 +7,7 @@
> */
>
> #include <common.h>
> +#include <clk.h>
> #include <dm.h>
> #include <fdtdec.h>
> #include <libfdt.h>
> @@ -32,15 +33,23 @@ static int arasan_sdhci_probe(struct udevice *dev)
> struct rockchip_sdhc_plat *plat = dev_get_platdata(dev);
> struct rockchip_sdhc *prv = dev_get_priv(dev);
> struct sdhci_host *host = &prv->host;
> + struct clk clk;
> int ret;
> u32 caps;
> + ulong max_freq = CONFIG_ROCKCHIP_SDHCI_MAX_FREQ;
>
> host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
> host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD;
>
> + ret = clk_get_by_index(dev, 0, &clk);
> + if (ret < 0)
> + debug("%s get clock fail\n", __func__);
> + else
> + max_freq = clk_set_rate(&clk, CONFIG_ROCKCHIP_SDHCI_MAX_FREQ);
> +
> caps = sdhci_readl(host, SDHCI_CAPABILITIES);
> ret = sdhci_setup_cfg(&plat->cfg, dev->name, host->bus_width,
> - caps, CONFIG_ROCKCHIP_SDHCI_MAX_FREQ, EMMC_MIN_FREQ,
> + caps, max_freq, EMMC_MIN_FREQ,
> host->version, host->quirks, 0);
>
> host->mmc = &plat->mmc;
>
prev parent reply other threads:[~2016-07-29 8:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-29 2:35 [U-Boot] [PATCH v2 0/2] rk3399: add soc basic driver support Kever Yang
2016-07-29 2:35 ` [U-Boot] [PATCH v2 1/2] rk3399: add basic soc driver Kever Yang
2016-07-29 8:00 ` Jaehoon Chung
2016-08-01 2:20 ` Simon Glass
2016-08-01 3:29 ` Kever Yang
2016-07-29 6:42 ` [U-Boot] [PATCH v2 2/2] mmc: rockchip: add clock init Kever Yang
2016-07-29 8:01 ` Jaehoon Chung [this message]
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=579B0D64.8090601@samsung.com \
--to=jh80.chung@samsung.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