mmc: dw_mmc: Add support for SOCFPGA's platform specific implementation
authorDinh Nguyen <dinguyen@altera.com>
Tue, 18 Feb 2014 02:31:01 +0000 (20:31 -0600)
committerChris Ball <chris@printf.net>
Thu, 27 Feb 2014 02:30:12 +0000 (21:30 -0500)
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>
drivers/mmc/host/dw_mmc-pltfm.c

index 2553bfbfc6df1b273b5e63f3a0b3ef650bf2aed1..d4a47a9f55848cbc40f383c3378a9c20304667d6 100644 (file)
 #include "dw_mmc.h"
 #include "dw_mmc-pltfm.h"
 
-static void dw_mci_rockchip_prepare_command(struct dw_mci *host, u32 *cmdr)
+static void dw_mci_pltfm_prepare_command(struct dw_mci *host, u32 *cmdr)
 {
        *cmdr |= SDMMC_CMD_USE_HOLD_REG;
 }
 
 static const struct dw_mci_drv_data rockchip_drv_data = {
-       .prepare_command        = dw_mci_rockchip_prepare_command,
+       .prepare_command        = dw_mci_pltfm_prepare_command,
+};
+
+static const struct dw_mci_drv_data socfpga_drv_data = {
+       .prepare_command        = dw_mci_pltfm_prepare_command,
 };
 
 int dw_mci_pltfm_register(struct platform_device *pdev,
@@ -92,6 +96,8 @@ static const struct of_device_id dw_mci_pltfm_match[] = {
        { .compatible = "snps,dw-mshc", },
        { .compatible = "rockchip,rk2928-dw-mshc",
                .data = &rockchip_drv_data },
+       { .compatible = "altr,socfpga-dw-mshc",
+               .data = &socfpga_drv_data },
        {},
 };
 MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);