mbox series

[0/2] mmc: core: Fix the behaviour of pwrseq_emmc

Message ID 1494281343-18963-1-git-send-email-ulf.hansson@linaro.org
Headers show
Series mmc: core: Fix the behaviour of pwrseq_emmc | expand

Message

Ulf Hansson May 8, 2017, 10:09 p.m. UTC
In case if a pwrseq-emmc has been bound to the host, a call to mmc_power_up()
triggers an eMMC HW reset via the pwrseq_emmc's ->post_power_on() callback.
This isn't really what we want, as mmc_power_up() is called each time when
resuming the card.

Let's fix this behaviour and avoid doing the emmc HW reset unless really needed.

Ulf Hansson (2):
  mmc: pwrseq: Add reset callback to the struct mmc_pwrseq_ops
  mmc: core: Don't do eMMC HW reset when resuming the eMMC card

 drivers/mmc/core/core.c        | 2 ++
 drivers/mmc/core/mmc.c         | 2 ++
 drivers/mmc/core/pwrseq.c      | 8 ++++++++
 drivers/mmc/core/pwrseq.h      | 3 +++
 drivers/mmc/core/pwrseq_emmc.c | 2 +-
 5 files changed, 16 insertions(+), 1 deletion(-)

-- 
2.7.4

Comments

Marek Szyprowski May 9, 2017, 5:25 a.m. UTC | #1
Hi Ulf,

On 2017-05-09 00:09, Ulf Hansson wrote:
> In case if a pwrseq-emmc has been bound to the host, a call to mmc_power_up()

> triggers an eMMC HW reset via the pwrseq_emmc's ->post_power_on() callback.

> This isn't really what we want, as mmc_power_up() is called each time when

> resuming the card.

>

> Let's fix this behaviour and avoid doing the emmc HW reset unless really needed.

>

> Ulf Hansson (2):

>    mmc: pwrseq: Add reset callback to the struct mmc_pwrseq_ops

>    mmc: core: Don't do eMMC HW reset when resuming the eMMC card


Works fine on Odroid U3 with eMMC (tested suspend/resume cycle and reboot).

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>


>   drivers/mmc/core/core.c        | 2 ++

>   drivers/mmc/core/mmc.c         | 2 ++

>   drivers/mmc/core/pwrseq.c      | 8 ++++++++

>   drivers/mmc/core/pwrseq.h      | 3 +++

>   drivers/mmc/core/pwrseq_emmc.c | 2 +-

>   5 files changed, 16 insertions(+), 1 deletion(-)

>


Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

--
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