Skip to contentSkip to conversation

mmc: sdhci-of-esdhc: support both BE and LE host controller

PATCH Applied Yangbo Lu 1 participant 1 message Oct 8, 2015

Subsystems (2)
lore
Share & tools
lore

Yangbo Lu

author
#0 lore raw

PATCH v6 2/4 mmc: sdhci-of-esdhc: support both BE and LE host controller

To support little endian eSDHC controller, we redefine both BE and LE IO accessors. In the new accessors, use ioread*/iowrite* instead of in_be32/out_be32 and will select accessors according to endian mode in probe function.

---
Changes for v2:
- Split v1 patches into a few pieces
Changes for v3:
- Checked endian mode in mmc generic code
- Used 'little-endian' as default endian mode
Changes for v4:
- Checked endian mode in sdhci-pltfm driver
Changes for v5:
- Redefined io accessors for eSDHC
- Checked endian mode in eSDHC drvier
- Used 'big-endian' as default endian mode
Changes for v6:
- Used devm_kzalloc() instead of kmalloc()
- Removed global variable 'static struct esdhc_host *esdhc'
- Used two instances of sdhci_pltfm_data(one is for big-endian and the other one is for little-endian) instead of changing the members individually

---
 drivers/mmc/host/sdhci-esdhc.h    |   2 +
 drivers/mmc/host/sdhci-of-esdhc.c | 451 ++++++++++++++++++++++++++++----------
 2 files changed, 341 insertions(+), 112 deletions(-)
drivers/mmc/host/sdhci-esdhc.h +2 -0
index 163ac99..de132e2 100644
@@ -24,6 +24,8 @@
 				SDHCI_QUIRK_PIO_NEEDS_DELAY | \
 				SDHCI_QUIRK_NO_HISPD_BIT)
 
+#define ESDHC_PROCTL		0x28
+
 #define ESDHC_SYSTEM_CONTROL	0x2c
 #define ESDHC_CLOCK_MASK	0x0000fff0
 #define ESDHC_PREDIV_SHIFT	8
drivers/mmc/host/sdhci-of-esdhc.c +339 -112

612 lines not on this page · raw message

Signature · 1 line
2.1.0.27.g96db324