Message ID | 1443442624-7056-4-git-send-email-p.marczak@samsung.com |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show |
Hi, On 28 September 2015 at 06:17, Przemyslaw Marczak <p.marczak@samsung.com> wrote: > After rework of code by: > > commit: d952796 Exynos5: Use clock_get_periph_rate generic API > > function get_mmc_clk() always returns -1 for Exynos 4. > > This was caused by omitting, that SDHCI driver for Exynos 4, > calls get_mmc_clk(), with mmc device number as argument, > instead of pinmux peripheral id, like DW MMC driver for Exynos 5. > > By this commit, the code directly calls a proper function > to get mmc clock for Exynos 4, without checking the peripheral id. > > Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> > --- > Changes V2: > - cleanup commit message > --- > arch/arm/mach-exynos/clock.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) I'll pick this up if needed. I tested that it does not break exynos5, but have not tested it on exynos4. Acked-by: Simon Glass <sjg@chromium.org> Regars, Simon
Hello Simon, On 09/29/2015 06:47 AM, Simon Glass wrote: > Hi, > > On 28 September 2015 at 06:17, Przemyslaw Marczak <p.marczak@samsung.com> wrote: >> After rework of code by: >> >> commit: d952796 Exynos5: Use clock_get_periph_rate generic API >> >> function get_mmc_clk() always returns -1 for Exynos 4. >> >> This was caused by omitting, that SDHCI driver for Exynos 4, >> calls get_mmc_clk(), with mmc device number as argument, >> instead of pinmux peripheral id, like DW MMC driver for Exynos 5. >> >> By this commit, the code directly calls a proper function >> to get mmc clock for Exynos 4, without checking the peripheral id. >> >> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> >> --- >> Changes V2: >> - cleanup commit message >> --- >> arch/arm/mach-exynos/clock.c | 10 ++++------ >> 1 file changed, 4 insertions(+), 6 deletions(-) > > I'll pick this up if needed. I tested that it does not break exynos5, > but have not tested it on exynos4. > > Acked-by: Simon Glass <sjg@chromium.org> > > Regars, > Simon > Thank you for testing. I tested this on Trats2 / Odroid U3 and X2 - all based on Exynos4412. I must only check Trats (Exynos 4210), since Lukasz mentioned about some issue. Anyway I think, that it can be picked up. Best regards,
Hi, On 09/30/2015 04:26 PM, Przemyslaw Marczak wrote: > Hello Simon, > > On 09/29/2015 06:47 AM, Simon Glass wrote: >> Hi, >> >> On 28 September 2015 at 06:17, Przemyslaw Marczak <p.marczak@samsung.com> wrote: >>> After rework of code by: >>> >>> commit: d952796 Exynos5: Use clock_get_periph_rate generic API >>> >>> function get_mmc_clk() always returns -1 for Exynos 4. >>> >>> This was caused by omitting, that SDHCI driver for Exynos 4, >>> calls get_mmc_clk(), with mmc device number as argument, >>> instead of pinmux peripheral id, like DW MMC driver for Exynos 5. >>> >>> By this commit, the code directly calls a proper function >>> to get mmc clock for Exynos 4, without checking the peripheral id. >>> >>> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> >>> --- >>> Changes V2: >>> - cleanup commit message >>> --- >>> arch/arm/mach-exynos/clock.c | 10 ++++------ >>> 1 file changed, 4 insertions(+), 6 deletions(-) >> >> I'll pick this up if needed. I tested that it does not break exynos5, >> but have not tested it on exynos4. >> >> Acked-by: Simon Glass <sjg@chromium.org> >> >> Regars, >> Simon >> > > Thank you for testing. I tested this on Trats2 / Odroid U3 and X2 - all based on Exynos4412. I must only check Trats (Exynos 4210), since Lukasz mentioned about some issue. Anyway I think, that it can be picked up. Looks good to me. Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Best Regards, Jaehoon Chung > > Best regards,
Hello, On 09/30/2015 09:26 AM, Przemyslaw Marczak wrote: > Hello Simon, > > On 09/29/2015 06:47 AM, Simon Glass wrote: >> Hi, >> >> On 28 September 2015 at 06:17, Przemyslaw Marczak >> <p.marczak@samsung.com> wrote: >>> After rework of code by: >>> >>> commit: d952796 Exynos5: Use clock_get_periph_rate generic API >>> >>> function get_mmc_clk() always returns -1 for Exynos 4. >>> >>> This was caused by omitting, that SDHCI driver for Exynos 4, >>> calls get_mmc_clk(), with mmc device number as argument, >>> instead of pinmux peripheral id, like DW MMC driver for Exynos 5. >>> >>> By this commit, the code directly calls a proper function >>> to get mmc clock for Exynos 4, without checking the peripheral id. >>> >>> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> >>> --- >>> Changes V2: >>> - cleanup commit message >>> --- >>> arch/arm/mach-exynos/clock.c | 10 ++++------ >>> 1 file changed, 4 insertions(+), 6 deletions(-) >> >> I'll pick this up if needed. I tested that it does not break exynos5, >> but have not tested it on exynos4. >> >> Acked-by: Simon Glass <sjg@chromium.org> >> >> Regars, >> Simon >> > > Thank you for testing. I tested this on Trats2 / Odroid U3 and X2 - all > based on Exynos4412. I must only check Trats (Exynos 4210), since Lukasz > mentioned about some issue. Anyway I think, that it can be picked up. > > Best regards, + Tested on Trats (Exynos4210) Patchset fixes, sdhci issue on this board. Best regards,
diff --git a/arch/arm/mach-exynos/clock.c b/arch/arm/mach-exynos/clock.c index 1c6baa1..18eadf5 100644 --- a/arch/arm/mach-exynos/clock.c +++ b/arch/arm/mach-exynos/clock.c @@ -1661,6 +1661,9 @@ unsigned long get_mmc_clk(int dev_index) { enum periph_id id; + if (cpu_is_exynos4()) + return exynos4_get_mmc_clk(dev_index); + switch (dev_index) { case 0: id = PERIPH_ID_SDMMC0; @@ -1679,12 +1682,7 @@ unsigned long get_mmc_clk(int dev_index) return -1; } - if (cpu_is_exynos5()) - return clock_get_periph_rate(id); - else if (cpu_is_exynos4()) - return exynos4_get_mmc_clk(dev_index); - - return 0; + return clock_get_periph_rate(id); } void set_mmc_clk(int dev_index, unsigned int div)
After rework of code by: commit: d952796 Exynos5: Use clock_get_periph_rate generic API function get_mmc_clk() always returns -1 for Exynos 4. This was caused by omitting, that SDHCI driver for Exynos 4, calls get_mmc_clk(), with mmc device number as argument, instead of pinmux peripheral id, like DW MMC driver for Exynos 5. By this commit, the code directly calls a proper function to get mmc clock for Exynos 4, without checking the peripheral id. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> --- Changes V2: - cleanup commit message --- arch/arm/mach-exynos/clock.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)