clk: sunxi: sun9i-mmc: Implement reset callback for reset controls
Subsystems (4)
PATCH 1/1 clk: sunxi: sun9i-mmc: Implement reset callback for reset controls
Our MMC host driver now issues a reset, instead of just deasserting the reset control, since commit c34eda69ad4c ("mmc: sunxi: Reset the device at probe time"). The sun9i-mmc clock driver does not support this, and will fail, which results in MMC not probing.
This patch implements the reset callback by asserting the reset control, then deasserting it after a small delay.
--- drivers/clk/sunxi/clk-sun9i-mmc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/clk/sunxi/clk-sun9i-mmc.c +12 -0
@@ -16,6 +16,7 @@#include <linux/clk.h> #include <linux/clk-provider.h> +#include <linux/delay.h> #include <linux/init.h> #include <linux/of.h> #include <linux/of_device.h>
@@ -83,9 +84,20 @@ static int sun9i_mmc_reset_deassert(struct reset_controller_dev *rcdev,return 0 ; } +static int sun9i_mmc_reset_reset (struct reset_controller_dev *rcdev, +unsigned long id) +{ +sun9i_mmc_reset_assert (rcdev, id); +udelay (10 ); +sun9i_mmc_reset_deassert (rcdev, id); + +return 0 ; +} +static const struct reset_control_ops sun9i_mmc_reset_ops = { .assert = sun9i_mmc_reset_assert, .deassert = sun9i_mmc_reset_deassert, + .reset = sun9i_mmc_reset_reset, };static int sun9i_a80_mmc_config_clk_probe (struct platform_device *pdev)
Signature · 1 line
2.15.0
PATCH 1/1 clk: sunxi: sun9i-mmc: Implement reset callback for reset controls
Quoted 11 lines · Chen-Yu Tsai
Our MMC host driver now issues a reset, instead of just deasserting the reset control, since commit
c34eda69ad4c("mmc: sunxi: Reset the device at probe time"). The sun9i-mmc clock driver does not support this, and will fail, which results in MMC not probing.This patch implements the reset callback by asserting the reset control, then deasserting it after a small delay.
Fixes 7a6fca879f59 ("clk: sunxi: Add driver for A80 MMC config clocks/resets")Cc <[email protected]> # 4.14.xSigned-off-by Chen-Yu Tsai <[email protected]>
regards
Philipp
PATCH 1/1 clk: sunxi: sun9i-mmc: Implement reset callback for reset controls
In reply to Chen-Yu TsaiQuoted 11 lines · Chen-Yu Tsai
Our MMC host driver now issues a reset, instead of just deasserting the reset control, since commit
c34eda69ad4c("mmc: sunxi: Reset the device at probe time"). The sun9i-mmc clock driver does not support this, and will fail, which results in MMC not probing.This patch implements the reset callback by asserting the reset control, then deasserting it after a small delay.
Fixes 7a6fca879f59 ("clk: sunxi: Add driver for A80 MMC config clocks/resets")Cc <[email protected]> # 4.14.xSigned-off-by Chen-Yu Tsai <[email protected]>
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171218/5ca01503/attachment.sig>
PATCH 1/1 clk: sunxi: sun9i-mmc: Implement reset callback for reset controls
In reply to Chen-Yu TsaiQuoted 5 lines · Chen-Yu Tsai
Our MMC host driver now issues a reset, instead of just deasserting the reset control, since commit
c34eda69ad4c("mmc: sunxi: Reset the device at probe time"). The sun9i-mmc clock driver does not support this, and will fail, which results in MMC not probing.
Quoted 7 lines
This patch implements the reset callback by asserting the reset control, then deasserting it after a small delay.
Fixes 7a6fca879f59 ("clk: sunxi: Add driver for A80 MMC config clocks/resets")Cc <[email protected]> # 4.14.xSigned-off-by Chen-Yu Tsai <[email protected]>---
Did you want us to pick this up into clk-fixes? It seems to be causing MMC to not work for some time? That sounds annoying enough.
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH 1/1 clk: sunxi: sun9i-mmc: Implement reset callback for reset controls
Quoted 9 lines · Stephen Boyd
Quoted 8 lines · Chen-Yu Tsai
Our MMC host driver now issues a reset, instead of just deasserting the reset control, since commit
c34eda69ad4c("mmc: sunxi: Reset the device at probe time"). The sun9i-mmc clock driver does not support this, and will fail, which results in MMC not probing.This patch implements the reset callback by asserting the reset control, then deasserting it after a small delay.
Quoted 8 lines
Quoted 4 lines
Fixes 7a6fca879f59 ("clk: sunxi: Add driver for A80 MMC config clocks/resets")Cc <[email protected]> # 4.14.xSigned-off-by Chen-Yu Tsai <[email protected]>---
Did you want us to pick this up into clk-fixes? It seems to be causing MMC to not work for some time? That sounds annoying enough.
That would be great, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171219/86f9bd6a/attachment.sig>
Michael Turquette
AppliedPATCH 1/1 clk: sunxi: sun9i-mmc: Implement reset callback for reset controls
Quoting Maxime Ripard (2017-12-19 00:32:28)
Quoted 15 lines · Stephen Boyd
Quoted 14 lines · Chen-Yu Tsai
Quoted 12 lines
Our MMC host driver now issues a reset, instead of just deasserting the reset control, since commit
c34eda69ad4c("mmc: sunxi: Reset the device at probe time"). The sun9i-mmc clock driver does not support this, and will fail, which results in MMC not probing.This patch implements the reset callback by asserting the reset control, then deasserting it after a small delay.
Fixes 7a6fca879f59 ("clk: sunxi: Add driver for A80 MMC config clocks/resets")Cc <[email protected]> # 4.14.xSigned-off-by Chen-Yu Tsai <[email protected]>---
Quoted 5 lines
Quoted 3 lines
Did you want us to pick this up into clk-fixes? It seems to be causing MMC to not work for some time? That sounds annoying enough.
That would be great, thanks!
Applied to clk-fixes.
Regards,
Mike
Quoted 6 lines
Maxime
Signature · 3 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com