* [U-Boot] [PATCH] mmc: rockchip_sdhci: add clock init for mmc
@ 2016-10-07 9:23 ` Kever Yang
2016-10-09 23:01 ` Jaehoon Chung
0 siblings, 1 reply; 3+ messages in thread
From: Kever Yang @ 2016-10-07 9:23 UTC (permalink / raw)
To: u-boot
Init the clock rate to CONFIG_ROCKCHIP_SDHCI_MAX_FREQ with clock driver
api.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---
drivers/mmc/rockchip_sdhci.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c
index c56e1a3..e787343 100644
--- a/drivers/mmc/rockchip_sdhci.c
+++ b/drivers/mmc/rockchip_sdhci.c
@@ -12,6 +12,7 @@
#include <libfdt.h>
#include <malloc.h>
#include <sdhci.h>
+#include <clk.h>
/* 400KHz is max freq for card ID etc. Use that as min */
#define EMMC_MIN_FREQ 400000
@@ -33,7 +34,10 @@ static int arasan_sdhci_probe(struct udevice *dev)
struct rockchip_sdhc *prv = dev_get_priv(dev);
struct sdhci_host *host = &prv->host;
int ret;
+ struct clk clk;
+ ret = clk_get_by_index(dev, 0, &clk);
+ clk_set_rate(&clk, CONFIG_ROCKCHIP_SDHCI_MAX_FREQ);
host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD;
ret = sdhci_setup_cfg(&plat->cfg, host, CONFIG_ROCKCHIP_SDHCI_MAX_FREQ,
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] mmc: rockchip_sdhci: add clock init for mmc
2016-10-07 9:23 ` [U-Boot] [PATCH] mmc: rockchip_sdhci: add clock init for mmc Kever Yang
@ 2016-10-09 23:01 ` Jaehoon Chung
2016-10-10 6:40 ` Kever Yang
0 siblings, 1 reply; 3+ messages in thread
From: Jaehoon Chung @ 2016-10-09 23:01 UTC (permalink / raw)
To: u-boot
On 10/07/2016 06:23 PM, Kever Yang wrote:
> Init the clock rate to CONFIG_ROCKCHIP_SDHCI_MAX_FREQ with clock driver
> api.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
> drivers/mmc/rockchip_sdhci.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c
> index c56e1a3..e787343 100644
> --- a/drivers/mmc/rockchip_sdhci.c
> +++ b/drivers/mmc/rockchip_sdhci.c
> @@ -12,6 +12,7 @@
> #include <libfdt.h>
> #include <malloc.h>
> #include <sdhci.h>
> +#include <clk.h>
>
> /* 400KHz is max freq for card ID etc. Use that as min */
> #define EMMC_MIN_FREQ 400000
> @@ -33,7 +34,10 @@ static int arasan_sdhci_probe(struct udevice *dev)
> struct rockchip_sdhc *prv = dev_get_priv(dev);
> struct sdhci_host *host = &prv->host;
> int ret;
> + struct clk clk;
>
> + ret = clk_get_by_index(dev, 0, &clk);
What purpose do you use "ret" value?
Best Regards,
Jaehoon Chung
> + clk_set_rate(&clk, CONFIG_ROCKCHIP_SDHCI_MAX_FREQ);
> host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD;
>
> ret = sdhci_setup_cfg(&plat->cfg, host, CONFIG_ROCKCHIP_SDHCI_MAX_FREQ,
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] mmc: rockchip_sdhci: add clock init for mmc
2016-10-09 23:01 ` Jaehoon Chung
@ 2016-10-10 6:40 ` Kever Yang
0 siblings, 0 replies; 3+ messages in thread
From: Kever Yang @ 2016-10-10 6:40 UTC (permalink / raw)
To: u-boot
Hi Jaehoon,
On 10/10/2016 07:01 AM, Jaehoon Chung wrote:
> On 10/07/2016 06:23 PM, Kever Yang wrote:
>> Init the clock rate to CONFIG_ROCKCHIP_SDHCI_MAX_FREQ with clock driver
>> api.
>>
>> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
>> ---
>>
>> drivers/mmc/rockchip_sdhci.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c
>> index c56e1a3..e787343 100644
>> --- a/drivers/mmc/rockchip_sdhci.c
>> +++ b/drivers/mmc/rockchip_sdhci.c
>> @@ -12,6 +12,7 @@
>> #include <libfdt.h>
>> #include <malloc.h>
>> #include <sdhci.h>
>> +#include <clk.h>
>>
>> /* 400KHz is max freq for card ID etc. Use that as min */
>> #define EMMC_MIN_FREQ 400000
>> @@ -33,7 +34,10 @@ static int arasan_sdhci_probe(struct udevice *dev)
>> struct rockchip_sdhc *prv = dev_get_priv(dev);
>> struct sdhci_host *host = &prv->host;
>> int ret;
>> + struct clk clk;
>>
>> + ret = clk_get_by_index(dev, 0, &clk);
> What purpose do you use "ret" value?
Forgot to do the error check with 'ret', will add it at V2.
Thanks,
- Kever
>
> Best Regards,
> Jaehoon Chung
>
>> + clk_set_rate(&clk, CONFIG_ROCKCHIP_SDHCI_MAX_FREQ);
>> host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD;
>>
>> ret = sdhci_setup_cfg(&plat->cfg, host, CONFIG_ROCKCHIP_SDHCI_MAX_FREQ,
>>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-10 6:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20161007092411epcas1p431c3976e72dd78d2def7b9afde578d02@epcas1p4.samsung.com>
2016-10-07 9:23 ` [U-Boot] [PATCH] mmc: rockchip_sdhci: add clock init for mmc Kever Yang
2016-10-09 23:01 ` Jaehoon Chung
2016-10-10 6:40 ` Kever Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox