diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-04-25 15:57:12 +0400 |
---|---|---|
committer | Chris Ball <chris@printf.net> | 2014-05-22 15:26:28 +0400 |
commit | 03231f9b781f24205c0af0398ce3cbef70090939 (patch) | |
tree | 87626b628c3ab8e25133833f7f7b304207fa9dbb /drivers/mmc/host/sdhci-pxav2.c | |
parent | 2317f56c055fcad524bf6a873df48a754e7ebc4d (diff) | |
download | linux-03231f9b781f24205c0af0398ce3cbef70090939.tar.xz |
mmc: sdhci: convert reset into a library function
Rather than having platform_reset_enter/platform_reset_exit methods,
turn the core of the reset handling into a library function which
platforms can call at the appropriate moment in their (new) reset
method.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Markus Pargmann <mpa@pengutronix.de>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc/host/sdhci-pxav2.c')
-rw-r--r-- | drivers/mmc/host/sdhci-pxav2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c index d24c282e5eb8..2eee0c8b88eb 100644 --- a/drivers/mmc/host/sdhci-pxav2.c +++ b/drivers/mmc/host/sdhci-pxav2.c @@ -51,11 +51,13 @@ #define MMC_CARD 0x1000 #define MMC_WIDTH 0x0100 -static void pxav2_set_private_registers(struct sdhci_host *host, u8 mask) +static void pxav2_reset(struct sdhci_host *host, u8 mask) { struct platform_device *pdev = to_platform_device(mmc_dev(host->mmc)); struct sdhci_pxa_platdata *pdata = pdev->dev.platform_data; + sdhci_reset(host, mask); + if (mask == SDHCI_RESET_ALL) { u16 tmp = 0; @@ -111,8 +113,8 @@ static void pxav2_mmc_set_bus_width(struct sdhci_host *host, int width) static const struct sdhci_ops pxav2_sdhci_ops = { .get_max_clock = sdhci_pltfm_clk_get_max_clock, - .platform_reset_exit = pxav2_set_private_registers, .set_bus_width = pxav2_mmc_set_bus_width, + .reset = pxav2_reset, }; #ifdef CONFIG_OF |