mmc: support sdhci-pxav3.c
Subsystems (4)
PATCH v3 1/4 mmc: support sdhci-pxav3.c
Instead of sharing sdhci-pxa.c, use sdhci-pxav3.c for mmp2.
The original method is not easy to track, which is share sdhci-pxa.c among pxa serious, like pxa910, mmp2, etc, and put the platfrom difference under arch/arm.
Signed-off-by Zhangfei Gao <[email protected]>
Signed-off-by Philip Rakity <[email protected]>
--- arch/arm/plat-pxa/include/plat/sdhci.h | 37 ++++- drivers/mmc/host/Kconfig | 11 +- drivers/mmc/host/Makefile | 2 +- drivers/mmc/host/sdhci-pxa.c | 303 ------------------------------- drivers/mmc/host/sdhci-pxav3.c | 305 ++++++++++++++++++++++++++++++++ 5 files changed, 343 insertions(+), 315 deletions(-) delete mode 100644 drivers/mmc/host/sdhci-pxa.c create mode 100644 drivers/mmc/host/sdhci-pxav3.c
arch/arm/plat-pxa/include/plat/sdhci.h +32 -5
@@ -15,21 +15,48 @@/* pxa specific flag */ /* Require clock free running */ -#define PXA_FLAG_DISABLE_CLOCK_GATING (1<<0) - +#define PXA_FLAG_ENABLE_CLOCK_GATING (1<<0) +/* card alwayes wired to host, like on-chip emmc */ +#define PXA_FLAG_CARD_PERMANENT (1<<1)/* Board design supports 8-bit data on SD/SDIO BUS */ #define PXA_FLAG_SD_8_BIT_CAPABLE_SLOT (1<<2) +/* card not use wp, such as micro sd card */ +#define PXA_FLAG_CARD_NO_WP (1<<3)/* * struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI -* @max_speed: the maximum speed supported -* @quirks: quirks of specific device * @flags: flags for platform requirement +* @clk_delay_cycles: +* mmp2: each step is roughly 100ps, 5bits width +* pxa910: each step is 1ns, 4bits width +* @clk_delay_sel: select clk_delay, used on pxa910 +* 0: choose feedback clk +* 1: choose feedback clk + delay value +* 2: choose internal clk +* @clk_delay_enable: enable clk_delay or not, used on pxa910 +* @ext_cd_gpio: gpio pin used for external CD line +* @ext_cd_gpio_invert: invert values for external CD gpio line +* @max_speed: the maximum speed supported +* @host_caps: Standard MMC host capabilities bit field. +* @quirks: quirks of platfrom +* @pm_caps: pm_caps of platfrom */ struct sdhci_pxa_platdata { +unsigned int flags; +unsigned int clk_delay_cycles; +unsigned int clk_delay_sel; +bool clk_delay_enable; +unsigned int ext_cd_gpio; +bool ext_cd_gpio_invert;unsigned int max_speed; +unsigned int host_caps;unsigned int quirks; -unsigned int flags; +unsigned int pm_caps; +}; + +struct sdhci_pxa { +u8 clk_enable; +u8 power_mode; };#endif /* __PLAT_PXA_SDHCI_H */
drivers/mmc/host/Kconfig +5 -6
@@ -181,14 +181,13 @@ config MMC_SDHCI_S3C If unsure, say N. -config MMC_SDHCI_PXA - tristate "Marvell PXA168/PXA910/MMP2 SD Host Controller support" - depends on ARCH_PXA || ARCH_MMP +config MMC_SDHCI_PXAV3 + tristate "Marvell PXAV3 SD Host Controller support" select MMC_SDHCI - select MMC_SDHCI_IO_ACCESSORS + select MMC_SDHCI_PLTFM help - This selects the Marvell(R) PXA168/PXA910/MMP2 SD Host Controller. - If you have a PXA168/PXA910/MMP2 platform with SD Host Controller + This selects the Marvell(R) PXAV3 SD Host Controller. + If you have a PXAV3 platform (such as mmp2) with SD Host Controller and a card slot, say Y or M here. If unsure, say N.
drivers/mmc/host/Makefile +1 -1
@@ -9,7 +9,7 @@ obj-$(CONFIG_MMC_MXC) += mxcmmc.o obj-$(CONFIG_MMC_MXS) += mxs-mmc.o obj-$(CONFIG_MMC_SDHCI) += sdhci.o obj-$(CONFIG_MMC_SDHCI_PCI) += sdhci-pci.o -obj-$(CONFIG_MMC_SDHCI_PXA) += sdhci-pxa.o +obj-$(CONFIG_MMC_SDHCI_PXAV3) += sdhci-pxav3.o obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o obj-$(CONFIG_MMC_SDHCI_SPEAR) += sdhci-spear.o obj-$(CONFIG_MMC_WBSD) += wbsd.o
drivers/mmc/host/sdhci-pxa.c deleted +0 -303
303 lines not on this page · raw message
drivers/mmc/host/sdhci-pxav3.c new file +305 -0
305 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH v3 1/4 mmc: support sdhci-pxav3.c
Quoted 6 lines · Zhangfei Gao
Instead of sharing
sdhci-pxa.c, usesdhci-pxav3.cfor mmp2.
The original method is not easy to track, which is sharesdhci-pxa.camong pxa serious, like pxa910, mmp2, etc, and put the platfrom difference underarch/arm.Signed-off-by Zhangfei Gao <[email protected]>Signed-off-by Philip Rakity <[email protected]>
Looks very good now,
Reviewed-by Arnd Bergmann <[email protected]>