Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dinh Nguyen and committed by
Chris Ball
ec1e5d70 47a1f522

+8 -2
+8 -2
drivers/mmc/host/dw_mmc-pltfm.c
··· 25 25 #include "dw_mmc.h" 26 26 #include "dw_mmc-pltfm.h" 27 27 28 - static void dw_mci_rockchip_prepare_command(struct dw_mci *host, u32 *cmdr) 28 + static void dw_mci_pltfm_prepare_command(struct dw_mci *host, u32 *cmdr) 29 29 { 30 30 *cmdr |= SDMMC_CMD_USE_HOLD_REG; 31 31 } 32 32 33 33 static 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 + 37 + static const struct dw_mci_drv_data socfpga_drv_data = { 38 + .prepare_command = dw_mci_pltfm_prepare_command, 35 39 }; 36 40 37 41 int dw_mci_pltfm_register(struct platform_device *pdev, ··· 96 92 { .compatible = "snps,dw-mshc", }, 97 93 { .compatible = "rockchip,rk2928-dw-mshc", 98 94 .data = &rockchip_drv_data }, 95 + { .compatible = "altr,socfpga-dw-mshc", 96 + .data = &socfpga_drv_data }, 99 97 {}, 100 98 }; 101 99 MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match);