* [PATCH 1/2] mmc: dw-mmc: check the host->bus_hz before calling
@ 2013-02-18 10:12 Jaehoon Chung
2013-02-19 10:18 ` Seungwon Jeon
0 siblings, 1 reply; 2+ messages in thread
From: Jaehoon Chung @ 2013-02-18 10:12 UTC (permalink / raw)
To: linux-mmc
Cc: 'Chris Ball', Seungwon Jeon, Thomas Abraham,
Kyungmin Park
Check whether host->bus_hz is zero or not. before calling drv_data->setup_clock.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/mmc/host/dw_mmc.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 60063cc..c59078c 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2203,6 +2203,13 @@ int dw_mci_probe(struct dw_mci *host)
else
host->bus_hz = clk_get_rate(host->ciu_clk);
+ if (!host->bus_hz) {
+ dev_err(host->dev,
+ "Platform data must supply bus speed\n");
+ ret = -ENODEV;
+ goto err_clk_ciu;
+ }
+
if (drv_data && drv_data->setup_clock) {
ret = drv_data->setup_clock(host);
if (ret) {
@@ -2212,13 +2219,6 @@ int dw_mci_probe(struct dw_mci *host)
}
}
- if (!host->bus_hz) {
- dev_err(host->dev,
- "Platform data must supply bus speed\n");
- ret = -ENODEV;
- goto err_clk_ciu;
- }
-
host->quirks = host->pdata->quirks;
spin_lock_init(&host->lock);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH 1/2] mmc: dw-mmc: check the host->bus_hz before calling
2013-02-18 10:12 [PATCH 1/2] mmc: dw-mmc: check the host->bus_hz before calling Jaehoon Chung
@ 2013-02-19 10:18 ` Seungwon Jeon
0 siblings, 0 replies; 2+ messages in thread
From: Seungwon Jeon @ 2013-02-19 10:18 UTC (permalink / raw)
To: 'Jaehoon Chung', linux-mmc
Cc: 'Chris Ball', 'Thomas Abraham',
'Kyungmin Park'
On Monday, February 18, 2013, Jaehoon Chung wrote:
> Check whether host->bus_hz is zero or not. before calling drv_data->setup_clock.
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> drivers/mmc/host/dw_mmc.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 60063cc..c59078c 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -2203,6 +2203,13 @@ int dw_mci_probe(struct dw_mci *host)
> else
> host->bus_hz = clk_get_rate(host->ciu_clk);
>
> + if (!host->bus_hz) {
> + dev_err(host->dev,
> + "Platform data must supply bus speed\n");
> + ret = -ENODEV;
> + goto err_clk_ciu;
> + }
> +
> if (drv_data && drv_data->setup_clock) {
> ret = drv_data->setup_clock(host);
> if (ret) {
> @@ -2212,13 +2219,6 @@ int dw_mci_probe(struct dw_mci *host)
> }
> }
>
> - if (!host->bus_hz) {
> - dev_err(host->dev,
> - "Platform data must supply bus speed\n");
> - ret = -ENODEV;
> - goto err_clk_ciu;
> - }
> -
Currently checking 'host->bus_hz' is following 'setup_clock'
If specific implementation for 'setup_clock' is present, bus_hz may be updated.
When considering multiple platforms, it looks like proper.
Could you check the patch for more?
[PATCH v5 9/9] mmc: dw_mmc: add support for exynos specific implementation of dw-mshc
Thanks,
Seungwon Jeon
> host->quirks = host->pdata->quirks;
>
> spin_lock_init(&host->lock);
> --
> 1.7.9.5
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-19 10:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-18 10:12 [PATCH 1/2] mmc: dw-mmc: check the host->bus_hz before calling Jaehoon Chung
2013-02-19 10:18 ` Seungwon Jeon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox