Re: [RFC/RFT 4/6] mmc: sdhci-msm: convert driver to use runtime PM apis

2015-04-23 Thread Rajendra Nayak
> "Rajendra Nayak" writes: > >>> On 23 April 2015 at 10:45, Rajendra Nayak >>> wrote: With platform support now in place to manage clocks from within runtime PM callbacks, get rid of all clock handling from the driver and convert the driver to use runtime PM apis. >

Re: [RFC/RFT 4/6] mmc: sdhci-msm: convert driver to use runtime PM apis

2015-04-23 Thread Kevin Hilman
"Rajendra Nayak" writes: >> On 23 April 2015 at 10:45, Rajendra Nayak wrote: >>> With platform support now in place to manage clocks from within runtime >>> PM >>> callbacks, get rid of all clock handling from the driver and convert the >>> driver to use runtime PM apis. >>> >>> Signed-off-by: R

Re: [RFC/RFT 4/6] mmc: sdhci-msm: convert driver to use runtime PM apis

2015-04-23 Thread Rajendra Nayak
> On 23 April 2015 at 10:45, Rajendra Nayak wrote: >> With platform support now in place to manage clocks from within runtime >> PM >> callbacks, get rid of all clock handling from the driver and convert the >> driver to use runtime PM apis. >> >> Signed-off-by: Rajendra Nayak >> Cc: >> --- >>

Re: [RFC/RFT 4/6] mmc: sdhci-msm: convert driver to use runtime PM apis

2015-04-23 Thread Rajendra Nayak
> On 23 April 2015 at 10:45, Rajendra Nayak wrote: >> With platform support now in place to manage clocks from within runtime >> PM >> callbacks, get rid of all clock handling from the driver and convert the >> driver to use runtime PM apis. >> >> Signed-off-by: Rajendra Nayak >> Cc: >> --- >>

Re: [RFC/RFT 4/6] mmc: sdhci-msm: convert driver to use runtime PM apis

2015-04-23 Thread Ulf Hansson
On 23 April 2015 at 10:45, Rajendra Nayak wrote: > With platform support now in place to manage clocks from within runtime PM > callbacks, get rid of all clock handling from the driver and convert the > driver to use runtime PM apis. > > Signed-off-by: Rajendra Nayak > Cc: > --- > drivers/mmc/h

Re: [PATCH] mmc: core: add missing pm event in mmc_pm_notify to fix hib restore

2015-04-23 Thread Ulf Hansson
On 23 April 2015 at 12:43, wrote: > From: Grygorii Strashko > > The PM_RESTORE_PREPARE is not handled now in mmc_pm_notify(), > as result mmc_rescan() could be scheduled and executed at > late hibernation restore stages when MMC device is suspended > already - which, in turn, will lead to system

[PATCH v2] mmc: sdio: add reset callback to bus operations

2015-04-23 Thread Andreas Fenkart
Some drivers schedule automatic hw resets. An example is mwifiex, which schedules a card reset if the command handler between driver and card firmware becomes out of sync Signed-off-by: Andreas Fenkart --- drivers/mmc/core/sdio.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers

[PATCH] mmc: core: add missing pm event in mmc_pm_notify to fix hib restore

2015-04-23 Thread grygorii.strashko
From: Grygorii Strashko The PM_RESTORE_PREPARE is not handled now in mmc_pm_notify(), as result mmc_rescan() could be scheduled and executed at late hibernation restore stages when MMC device is suspended already - which, in turn, will lead to system crash on TI dra7-evm board: WARNING: CPU: 0 P

Re: [PATCH 0/7 v4] mmc: sh_mmcif: add parent clk support

2015-04-23 Thread Laurent Pinchart
Hi Morimoto-san, Thank you for the patches. On Thursday 23 April 2015 08:11:36 Kuninori Morimoto wrote: > Hi Ulf, Simon > > These patches are v4 of sh_mmcif. > Current sh_mmcif driver was used on Renesas SH-Mobile series, > and it is also used on Renesas R-Car series. > But, R-Car series can set

Re: [PATCH 3/7 v4] mmc: sh_mmcif: remove unnecessary int clk from struct sh_mmcif_host

2015-04-23 Thread Geert Uytterhoeven
On Thu, Apr 23, 2015 at 10:15 AM, Kuninori Morimoto wrote: > From: Kuninori Morimoto > > struct sh_mmcif_host has 1) int clk, 2) struct clock *hclk, > and host->clk = clk_get_rate(host->hclk). > This int clk is not necessary. Let's remove it. > And, current hclk is confusable naming. Let's rename

Re: [PATCH 4/7 v4] mmc: sh_mmcif: separate sh_mmcif_clk_update() into setup and prepare

2015-04-23 Thread Geert Uytterhoeven
On Thu, Apr 23, 2015 at 10:16 AM, Kuninori Morimoto wrote: > From: Kuninori Morimoto > > Current sh_mmcif_clk_update() is called from probe() and set_ios(), > but, the purpose of later one is just clk_prepare_enable(). > No need to setup mmc->f_max/f_min in many times. > This patch separe sh_mmci

[RFC/RFT 4/6] mmc: sdhci-msm: convert driver to use runtime PM apis

2015-04-23 Thread Rajendra Nayak
With platform support now in place to manage clocks from within runtime PM callbacks, get rid of all clock handling from the driver and convert the driver to use runtime PM apis. Signed-off-by: Rajendra Nayak Cc: --- drivers/mmc/host/sdhci-msm.c | 46 +++-

[PATCH 7/7 v4] ARM: shmobile: r8a7791: add MMCIF parent clock range

2015-04-23 Thread Kuninori Morimoto
From: Kuninori Morimoto Signed-off-by: Kuninori Morimoto Tested-by: Keita Kobayashi --- v3 -> v4 - new patch arch/arm/boot/dts/r8a7791.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index 3e9f824..47eb36a 100644 --- a

[PATCH 6/7 v4] ARM: shmobile: r8a7790: add MMCIF parent clock range

2015-04-23 Thread Kuninori Morimoto
From: Kuninori Morimoto Signed-off-by: Kuninori Morimoto Tested-by: Keita Kobayashi --- v3 -> v4 - new patch arch/arm/boot/dts/r8a7790.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index f3b8430..ac61636 100644 ---

[PATCH 5/7 v4] mmc: sh_mmcif: calculate best clock with parent clock

2015-04-23 Thread Kuninori Morimoto
From: Kuninori Morimoto MMCIF IP on R-Car series has parent clock which can be set several rate, and it was not implemented on old SH-Mobile series (= SH-Mobile series parent clock was fixed rate) R-Car series MMCIF can use more high speed access if it setup parent clock. This patch adds parent c

[PATCH 4/7 v4] mmc: sh_mmcif: separate sh_mmcif_clk_update() into setup and prepare

2015-04-23 Thread Kuninori Morimoto
From: Kuninori Morimoto Current sh_mmcif_clk_update() is called from probe() and set_ios(), but, the purpose of later one is just clk_prepare_enable(). No need to setup mmc->f_max/f_min in many times. This patch separe sh_mmcif_clk_update() into clk_prepare_enable() and mmc->f_max/f_min setup. S

[PATCH 3/7 v4] mmc: sh_mmcif: remove unnecessary int clk from struct sh_mmcif_host

2015-04-23 Thread Kuninori Morimoto
From: Kuninori Morimoto struct sh_mmcif_host has 1) int clk, 2) struct clock *hclk, and host->clk = clk_get_rate(host->hclk). This int clk is not necessary. Let's remove it. And, current hclk is confusable naming. Let's rename it to clk. Signed-off-by: Kuninori Morimoto Tested-by: Keita Kobayas

linux-mmc@vger.kernel.org

2015-04-23 Thread Kuninori Morimoto
From: Kuninori Morimoto Signed-off-by: Kuninori Morimoto Tested-by: Keita Kobayashi Acked-by: Geert Uytterhoeven --- v3 -> v4 - no change drivers/mmc/host/sh_mmcif.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/drivers/mmc/host/sh_

[PATCH 1/7 v4] mmc: sh_mmcif: move mmcif_of_match to upside

2015-04-23 Thread Kuninori Morimoto
From: Kuninori Morimoto Signed-off-by: Kuninori Morimoto Tested-by: Keita Kobayashi Acked-by: Geert Uytterhoeven --- v3 -> v4 - no change drivers/mmc/host/sh_mmcif.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/h

[PATCH 0/7 v4] mmc: sh_mmcif: add parent clk support

2015-04-23 Thread Kuninori Morimoto
Hi Ulf, Simon These patches are v4 of sh_mmcif. Current sh_mmcif driver was used on Renesas SH-Mobile series, and it is also used on Renesas R-Car series. But, R-Car series can setup parent clock. We couldn't setup it when SH-Mobile. These patches are tested by Kobayashi-san on Lager board. Sim