MMC: P2020 SDHC: Add support for 8-bit bus width and non-removable card
PATCH 1/2 MMC: P2020 SDHC: Add support for 8-bit bus width and non-removable card
This patch adds support of connecting an MMC media using an 8-bit bus width connection to Freescale's P2020 H/W SDHC controller. During the probe function, the generic function mmc_of_parse is called to detect whether the controller is configured with 8-bit bus width. Also, the generic function detecs if the non-removable property is set in the device tree. The function esdhc_pltfm_bus_width was added because the bus width configuration is platform specific.
Signed-off-by Oded Gabbay <[email protected]>
--- drivers/mmc/host/sdhci-esdhc.h | 7 +++++++ drivers/mmc/host/sdhci-of-esdhc.c | 44 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-)
drivers/mmc/host/sdhci-esdhc.h +7 -0
@@ -36,6 +36,13 @@/* pltfm-specific */ #define ESDHC_HOST_CONTROL_LE 0x20 +/* +* P2020 interpretation of the SDHCI_HOST_CONTROL register +*/ +#define ESDHC_CTRL_4BITBUS (0x1 << 1) +#define ESDHC_CTRL_8BITBUS (0x2 << 1) +#define ESDHC_CTRL_BUSWIDTH_MASK (0x3 << 1) +/* OF-specific */ #define ESDHC_DMA_SYSCTL 0x40c#define ESDHC_DMA_SNOOP 0x00000040
drivers/mmc/host/sdhci-of-esdhc.c +43 -1
68 lines not on this page · raw message
Signature · 1 line
1.8.3.1
drivers/mmc/host/sdhci-of-esdhc.c static const struct sdhci_pltfm_data sdhci_esdhc_pdata = { · line 292
Quoted 7 lines · Oded Gabbay
drivers/mmc/host/sdhci-of-esdhc.c +2
-1@@ -262,7 +288,23 @@ static const struct sdhci_pltfm_data sdhci_esdhc_pdata = {static int sdhci_esdhc_probe (struct platform_device *pdev) { -return sdhci_pltfm_register (pdev, &sdhci_esdhc_pdata); +struct sdhci_host *host; +int ret =0 ;
No need for the 0 initializer.
Otherwise it looks OK, thanks!
Reviewed-by Anton Vorontsov <[email protected]>