diff mbox

[-next,1/2] mmc: sdhci-xenon: Fix the work flow in xenon_remove().

Message ID e05202317167dc118edd6e2404b3eebc03de57bb.1493275842.git.huziji@marvell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hu Ziji April 28, 2017, 2:34 a.m. UTC
sdhci_remove_host() might execute SOFT_RESET_ALL.
Inside xenon_remove(), Xenon SDHC should be enabled during
sdhci_remove_host().

Move xenon_sdhc_unprepare after sdhci_remove_host() such that Xenon
SDHC is disabled after sdhci_remove_host() completes.

Signed-off-by: Hu Ziji <huziji@marvell.com>
Reported-by: Jisheng Zhang <jszhang@marvell.com>
Tested-by: Jisheng Zhang <jszhang@marvell.com>
---
 drivers/mmc/host/sdhci-xenon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Adrian Hunter April 28, 2017, 7:45 a.m. UTC | #1
On 28/04/17 05:34, Hu Ziji wrote:
> sdhci_remove_host() might execute SOFT_RESET_ALL.
> Inside xenon_remove(), Xenon SDHC should be enabled during
> sdhci_remove_host().
> 
> Move xenon_sdhc_unprepare after sdhci_remove_host() such that Xenon
> SDHC is disabled after sdhci_remove_host() completes.
> 
> Signed-off-by: Hu Ziji <huziji@marvell.com>
> Reported-by: Jisheng Zhang <jszhang@marvell.com>
> Tested-by: Jisheng Zhang <jszhang@marvell.com>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/mmc/host/sdhci-xenon.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c
> index 3b82a0b..786c3ed 100644
> --- a/drivers/mmc/host/sdhci-xenon.c
> +++ b/drivers/mmc/host/sdhci-xenon.c
> @@ -514,10 +514,10 @@ static int xenon_remove(struct platform_device *pdev)
>  
>  	xenon_clean_phy(host);
>  
> -	xenon_sdhc_unprepare(host);
> -
>  	sdhci_remove_host(host, 0);
>  
> +	xenon_sdhc_unprepare(host);
> +
>  	clk_disable_unprepare(pltfm_host->clk);
>  
>  	sdhci_pltfm_free(pdev);
> 

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

Patch

diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c
index 3b82a0b..786c3ed 100644
--- a/drivers/mmc/host/sdhci-xenon.c
+++ b/drivers/mmc/host/sdhci-xenon.c
@@ -514,10 +514,10 @@  static int xenon_remove(struct platform_device *pdev)
 
 	xenon_clean_phy(host);
 
-	xenon_sdhc_unprepare(host);
-
 	sdhci_remove_host(host, 0);
 
+	xenon_sdhc_unprepare(host);
+
 	clk_disable_unprepare(pltfm_host->clk);
 
 	sdhci_pltfm_free(pdev);