aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/dw_mmc-pltfm.c
diff options
context:
space:
mode:
authorDinh Nguyen <dinguyen@altera.com>2014-02-17 21:31:01 -0500
committerChris Ball <chris@printf.net>2014-02-26 21:30:12 -0500
commitec1e5d703e4a75fb19e99a92d20b4b70861bf483 (patch)
tree795d51e433509239f84a33f9aa599018b6423681 /drivers/mmc/host/dw_mmc-pltfm.c
parent47a1f522d7ff5105c7efa56fe7fd41d46202f8cc (diff)
mmc: dw_mmc: Add support for SOCFPGA's platform specific implementation
Like the rockchip, Altera's SOCFPGA platform specific implementation of the dw_mmc driver requires using the HOLD register for SD commands. This patch renames dw_mci_rockchip_prepare_command to dw_mci_pltfm_prepare_command so that SOCFPGA and Rockchip can use it. Signed-off-by: Dinh Nguyen <dinguyen@altera.com> Acked-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Tested-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc/host/dw_mmc-pltfm.c')
-rw-r--r--drivers/mmc/host/dw_mmc-pltfm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index 2553bfbfc6df..d4a47a9f5584 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -25,13 +25,17 @@
25#include "dw_mmc.h" 25#include "dw_mmc.h"
26#include "dw_mmc-pltfm.h" 26#include "dw_mmc-pltfm.h"
27 27
28static void dw_mci_rockchip_prepare_command(struct dw_mci *host, u32 *cmdr) 28static void dw_mci_pltfm_prepare_command(struct dw_mci *host, u32 *cmdr)
29{ 29{
30 *cmdr |= SDMMC_CMD_USE_HOLD_REG; 30 *cmdr |= SDMMC_CMD_USE_HOLD_REG;
31} 31}
32 32
33static const struct dw_mci_drv_data rockchip_drv_data = { 33static const struct dw_mci_drv_data rockchip_drv_data = {
34 .prepare_command = dw_mci_rockchip_prepare_command, 34 .prepare_command = dw_mci_pltfm_prepare_command,
35};
36
37static const struct dw_mci_drv_data socfpga_drv_data = {
38 .prepare_command = dw_mci_pltfm_prepare_command,
35}; 39};
36 40
37int dw_mci_pltfm_register(struct platform_device *pdev, 41int dw_mci_pltfm_register(struct platform_device *pdev,
@@ -92,6 +96,8 @@ static const struct of_device_id dw_mci_pltfm_match[] = {
92 { .compatible = "snps,dw-mshc", }, 96 { .compatible = "snps,dw-mshc", },
93 { .compatible = "rockchip,rk2928-dw-mshc", 97 { .compatible = "rockchip,rk2928-dw-mshc",
94 .data = &rockchip_drv_data }, 98 .data = &rockchip_drv_data },
99 { .compatible = "altr,socfpga-dw-mshc",
100 .data = &socfpga_drv_data },
95 {}, 101 {},
96}; 102};
97MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match); 103MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);