mmc: dw_mmc-socfpga: Remove the SOCFPGA specific platform for dw_mmc
PATCH v2 1/3 mmc: dw_mmc-socfpga: Remove the SOCFPGA specific platform for dw_mmc
From: Dinh Nguyen <[email protected]>
It turns now that the only really platform specific code that is needed for SOCFPGA is using the SDMMC_CMD_USE_HOLD_REG in the prepare_command function. Since the Rockchip already has this functionality, re-use the code that is already in dw_mmc-pltfm.c.
---
v2: none
--- drivers/mmc/host/Kconfig | 8 --- drivers/mmc/host/Makefile | 1 - drivers/mmc/host/dw_mmc-socfpga.c | 138 ------------------------------------- 3 files changed, 147 deletions(-) delete mode 100644 drivers/mmc/host/dw_mmc-socfpga.c
drivers/mmc/host/Kconfig +0 -8
@@ -580,14 +580,6 @@ config MMC_DW_EXYNOS Synopsys DesignWare Memory Card Interface driver. Select this option for platforms based on Exynos4 and Exynos5 SoC's. -config MMC_DW_SOCFPGA - tristate "SOCFPGA specific extensions for Synopsys DW Memory Card Interface" - depends on MMC_DW && MFD_SYSCON - select MMC_DW_PLTFM - help - This selects support for Altera SoCFPGA specific extensions to the - Synopsys DesignWare Memory Card Interface driver. - config MMC_DW_K3 tristate "K3 specific extensions for Synopsys DW Memory Card Interface" depends on MMC_DW
drivers/mmc/host/Makefile +0 -1
@@ -43,7 +43,6 @@ obj-$(CONFIG_SDH_BFIN) += bfin_sdh.o obj-$(CONFIG_MMC_DW) += dw_mmc.o obj-$(CONFIG_MMC_DW_PLTFM) += dw_mmc-pltfm.o obj-$(CONFIG_MMC_DW_EXYNOS) += dw_mmc-exynos.o -obj-$(CONFIG_MMC_DW_SOCFPGA) += dw_mmc-socfpga.o obj-$(CONFIG_MMC_DW_K3) += dw_mmc-k3.o obj-$(CONFIG_MMC_DW_PCI) += dw_mmc-pci.o obj-$(CONFIG_MMC_SH_MMCIF) += sh_mmcif.o
drivers/mmc/host/dw_mmc-socfpga.c deleted +0 -138
138 lines not on this page · raw message
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1392666911-15985-1-git-send-email-dinguyen-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org
PATCH v2 2/3 mmc: dw_mmc: Add support for SOCFPGA's platform specific implementation
From: Dinh Nguyen <[email protected]>
Like the rockchip, Altera's SOCFPGA platform specific implementation of the dw_mmc driver requires using the HOLD register for SD commands.
---
v2: Use dw_mci_socfpga_prepare_command instead of
dw_mci_rockchip_prepare_command
--- drivers/mmc/host/dw_mmc-pltfm.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/mmc/host/dw_mmc-pltfm.c +11 -0
@@ -30,10 +30,19 @@ static void dw_mci_rockchip_prepare_command(struct dw_mci *host, u32 *cmdr) *cmdr |=SDMMC_CMD_USE_HOLD_REG ; } +static void dw_mci_socfpga_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, }; +static const struct dw_mci_drv_data socfpga_drv_data = { + .prepare_command = dw_mci_socfpga_prepare_command, +}; +int dw_mci_pltfm_register (struct platform_device *pdev,const struct dw_mci_drv_data *drv_data) {
@@ -92,6 +101,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);
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2 2/3] mmc: dw_mmc: Add support for SOCFPGA's platform specific implementation
Hi Dinh!
Quoted 33 lines · On Mon, Feb 17, 2014 at 01:55:10PM -0600, [email protected] wrote:
From: Dinh Nguyen <[email protected]>
Like the rockchip, Altera's SOCFPGA platform specific implementation of the
dw_mmcdriver requires using the HOLD register for SD commands.Signed-off-by Dinh Nguyen <[email protected]>Acked-by Steffen Trumtrar <[email protected]>Tested-by Steffen Trumtrar <[email protected]>Cc Rob Herring <[email protected]>Cc Pawel Moll <[email protected]>Cc Mark Rutland <[email protected]>Cc Ian Campbell <[email protected]>Cc Kumar Gala <[email protected]>Cc Seungwon Jeon <[email protected]>Cc Jaehoon Chung <[email protected]>Cc Chris Ball <[email protected]>---
v2: Usedw_mci_socfpga_prepare_commandinstead of
dw_mci_rockchip_prepare_command--- drivers/mmc/host/dw_mmc-pltfm.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/mmc/host/dw_mmc-pltfm.c +2
-0@@ -30,10 +30,19 @@ static void dw_mci_rockchip_prepare_command(struct dw_mci *host, u32 *cmdr) *cmdr |=SDMMC_CMD_USE_HOLD_REG ; } +static void dw_mci_socfpga_prepare_command (struct dw_mci *host,u32 *cmdr) +{
drivers/mmc/host/dw_mmc-pltfm.c static void dw_mci_rockchip_prepare_command(struct dw_mci *host, u32 *cmdr) · line 44
Quoted 10 lines
drivers/mmc/host/dw_mmc-pltfm.c +7
-0+ *cmdr |=SDMMC_CMD_USE_HOLD_REG ; +} +static const struct dw_mci_drv_data rockchip_drv_data = { .prepare_command = dw_mci_rockchip_prepare_command, }; +static const struct dw_mci_drv_data socfpga_drv_data = { + .prepare_command = dw_mci_socfpga_prepare_command, +}; +
Why didn't you just rename the rockchip function, instead of adding the same thing with a different name?
This seems rather "useless" or I'm missing something.
Regards,
Steffen
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH v2 3/3 dts: socfpga: Add support for SD/MMC on the SOCFPGA platform
In reply to a message not in the archiveFrom: Dinh Nguyen <[email protected]>
Introduce "altr,socfpga-dw-mshc" to enable Altera's SOCFPGA platform specific implementation of the dwc_mmc driver.
Also add the "syscon" binding to the "altr,sys-mgr" node. The clock driver can use the syscon driver to toggle the register for the SD/MMC clock phase shift settings.
Finally, fix an indentation error for the sysmgr node.
---
v2: Fix indentation for the sysmgr node
--- .../devicetree/bindings/mmc/socfpga-dw-mshc.txt | 23 ++++++++++++++++++++ arch/arm/boot/dts/socfpga.dtsi | 15 +++++++++++-- arch/arm/boot/dts/socfpga_arria5.dtsi | 11 ++++++++++ arch/arm/boot/dts/socfpga_cyclone5.dtsi | 11 ++++++++++ arch/arm/boot/dts/socfpga_vt.dts | 11 ++++++++++ 5 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/socfpga-dw-mshc.txt
Documentation/devicetree/bindings/mmc/socfpga-dw-mshc.txt new file +23 -0
@@ -0,0 +1,23 @@ +* Altera SOCFPGA specific extensions to the Synopsys Designware Mobile + Storage Host Controller + +The Synopsys designware mobile storage host controller is used to interface +a SoC with storage medium such as eMMC or SD/MMC cards. This file documents +differences between the core Synopsys dw mshc controller properties described +by synopsys-dw-mshc.txt and the properties used by the Altera SOCFPGA specific +extensions to the Synopsys Designware Mobile Storage Host Controller. + +Required Properties: + +* compatible: should be + - "altr,socfpga-dw-mshc": for Altera's SOCFPGA platform + +Example: + + mmc: dwmmc0@ff704000 { + compatible = "altr,socfpga-dw-mshc"; + reg = <0xff704000 0x1000>; + interrupts = <0 129 4>; + #address-cells = <1>; + #size-cells = <0>; + };
arch/arm/boot/dts/socfpga.dtsi +13 -2
@@ -474,6 +474,17 @@ arm,data-latency = <2 1 1>; }; + mmc: dwmmc0@ff704000 { + compatible = "altr,socfpga-dw-mshc"; + reg = <0xff704000 0x1000>; + interrupts = <0 139 4>; + fifo-depth = <0x400>; + #address-cells = <1>; + #size-cells = <0>; + clocks = <&l4_mp_clk>, <&sdmmc_clk>; + clock-names = "biu", "ciu"; + }; + /* Local timer */ timer@fffec600 { compatible = "arm,cortex-a9-twd-timer";
@@ -528,8 +539,8 @@ }; sysmgr@ffd08000 { - compatible = "altr,sys-mgr"; - reg = <0xffd08000 0x4000>; + compatible = "altr,sys-mgr", "syscon"; + reg = <0xffd08000 0x4000>; }; }; };
arch/arm/boot/dts/socfpga_arria5.dtsi +11 -0
@@ -27,6 +27,17 @@ }; }; + dwmmc0@ff704000 { + num-slots = <1>; + supports-highspeed; + broken-cd; + + slot@0 { + reg = <0>; + bus-width = <4>; + }; + }; + serial0@ffc02000 { clock-frequency = <100000000>; };
arch/arm/boot/dts/socfpga_cyclone5.dtsi +11 -0
@@ -28,6 +28,17 @@ }; }; + dwmmc0@ff704000 { + num-slots = <1>; + supports-highspeed; + broken-cd; + + slot@0 { + reg = <0>; + bus-width = <4>; + }; + }; + ethernet@ff702000 { phy-mode = "rgmii"; phy-addr = <0xffffffff>; /* probe for phy addr */
arch/arm/boot/dts/socfpga_vt.dts +11 -0
@@ -41,6 +41,17 @@ }; }; + dwmmc0@ff704000 { + num-slots = <1>; + supports-highspeed; + broken-cd; + + slot@0 { + reg = <0>; + bus-width = <4>; + }; + }; + ethernet@ff700000 { phy-mode = "gmii"; status = "okay";
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2 3/3] dts: socfpga: Add support for SD/MMC on the SOCFPGA platform
Hi!
Quoted 34 lines · On Mon, Feb 17, 2014 at 01:55:11PM -0600, [email protected] wrote:
From: Dinh Nguyen <[email protected]>
Introduce "altr,socfpga-dw-mshc" to enable Altera's SOCFPGA platform specific implementation of the
dwc_mmcdriver.Also add the "syscon" binding to the "altr,sys-mgr" node. The clock driver can use the syscon driver to toggle the register for the SD/MMC clock phase shift settings.
Finally, fix an indentation error for the sysmgr node.
Signed-off-by Dinh Nguyen <[email protected]>Acked-by Steffen Trumtrar <[email protected]>Tested-by Steffen Trumtrar <[email protected]>Cc Rob Herring <[email protected]>Cc Pawel Moll <[email protected]>Cc Mark Rutland <[email protected]>Cc Ian Campbell <[email protected]>Cc Kumar Gala <[email protected]>Cc Seungwon Jeon <[email protected]>Cc Jaehoon Chung <[email protected]>Cc Chris Ball <[email protected]>---
v2: Fix indentation for the sysmgr node--- .../devicetree/bindings/mmc/socfpga-dw-mshc.txt | 23 ++++++++++++++++++++ arch/arm/boot/dts/socfpga.dtsi | 15 +++++++++++-- arch/arm/boot/dts/socfpga_arria5.dtsi | 11 ++++++++++ arch/arm/boot/dts/socfpga_cyclone5.dtsi | 11 ++++++++++ arch/arm/boot/dts/socfpga_vt.dts | 11 ++++++++++ 5 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/mmc/socfpga-dw-mshc.txt
arch/arm/boot/dts/socfpga.dtsi line 546
Quoted 10 lines
arch/arm/boot/dts/socfpga.dtsi +2
-2@@ -528,8 +539,8 @@ }; sysmgr@ffd08000 { - compatible = "altr,sys-mgr"; - reg = <0xffd08000 0x4000>; + compatible = "altr,sys-mgr", "syscon"; + reg = <0xffd08000 0x4000>; }; }; };
Thanks for fixing this, but please don't forget the curly and the semicolon.
Regards,
Steffen
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |