[Letux-kernel] [PATCH] mmc: hack pwrseq to fix gta04 bt problems
H. Nikolaus Schaller
hns at goldelico.com
Tue Feb 9 10:11:36 CET 2016
Hi,
can it be that simple?
Probably no.
Let's check with wl18xx driver where I have the omap5-pyra sample:
omap5-board-common.dtsi:
mmc3_pwrseq: sdhci0_pwrseq {
compatible = "mmc-pwrseq-simple";
clocks = <&clk32kgaudio>;
clock-names = "ext_clock";
};
vmmcsdio_fixed: fixedregulator-mmcsdio {
compatible = "regulator-fixed";
regulator-name = "vmmcsdio_fixed";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
gpio = <&gpio5 12 GPIO_ACTIVE_HIGH>; /* gpio140 WLAN_EN */
enable-active-high;
startup-delay-us = <70000>;
pinctrl-names = "default";
pinctrl-0 = <&wlan_pins>;
};
&mmc3 {
vmmc-supply = <&vmmcsdio_fixed>;
mmc-pwrseq = <&mmc3_pwrseq>;
bus-width = <4>;
non-removable;
cap-power-off-card;
...
wlcore: wlcore at 2 {
...
};
};
So that is interesting. There is no reset handled by mmc-pwrseq-simple. Just clock
enabled.
This means the patch should not affect. Needs testing of course (well, I have
not yet tested *any* suspend on the OMAP5, it is too fresh).
But other devices? Basically we remove the reset during suspend.
Which should not harm since the vmmc-supply is usually also disabled.
BR,
Nikolaus
Am 08.02.2016 um 22:17 schrieb Andreas Kemnade <andreas at kemnade.info>:
> The reset pin is set to 1 (= inactive, so the 0 in the code)
> if mmc is powered off. That make bluetooth usable without wifi on
> gta04
>
> Signed-off-by: Andreas Kemnade <andreas at kemnade.info>
> ---
> drivers/mmc/core/pwrseq_simple.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/pwrseq_simple.c b/drivers/mmc/core/pwrseq_simple.c
> index aba786d..6ac5a82 100644
> --- a/drivers/mmc/core/pwrseq_simple.c
> +++ b/drivers/mmc/core/pwrseq_simple.c
> @@ -69,7 +69,7 @@ static void mmc_pwrseq_simple_power_off(struct mmc_host *host)
> struct mmc_pwrseq_simple *pwrseq = container_of(host->pwrseq,
> struct mmc_pwrseq_simple, pwrseq);
>
> - mmc_pwrseq_simple_set_gpios_value(pwrseq, 1);
> + mmc_pwrseq_simple_set_gpios_value(pwrseq, 0);
>
> if (!IS_ERR(pwrseq->ext_clk) && pwrseq->clk_enabled) {
> clk_disable_unprepare(pwrseq->ext_clk);
> --
> 2.1.4
>
> _______________________________________________
> http://projects.goldelico.com/p/gta04-kernel/
> Letux-kernel mailing list
> Letux-kernel at openphoenux.org
> http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel
More information about the Letux-kernel
mailing list