Skip to contentSkip to conversation

PXA: New MMC driver

PATCH New Marek Vasut 1 participant 1 message Aug 6, 2010 MMC, SD and SDIO

v2 of 3 New Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 PXA: New MMC driver

The new driver is a complete rewrite. It uses the MMC framework and should support both pxa2xx and pxa3xx.

Tested on:
- Palm Tungsten|C PXA255
- Aeronix ZipitZ2 PXA270
- Marvell Zylonite 300 PXA300

This driver needs testing though.

---
 drivers/mmc/Makefile      |    1 +
 drivers/mmc/pxa_mmc.h     |   21 +++
 drivers/mmc/pxa_mmc_gen.c |  335 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 357 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mmc/pxa_mmc_gen.c
drivers/mmc/Makefile +1 -0
index 6fa04b8..01338a4 100644
@@ -32,6 +32,7 @@ COBJS-$(CONFIG_OMAP3_MMC) += omap3_mmc.o
 COBJS-$(CONFIG_FSL_ESDHC) += fsl_esdhc.o
 COBJS-$(CONFIG_MXC_MMC) += mxcmmc.o
 COBJS-$(CONFIG_PXA_MMC) += pxa_mmc.o
+COBJS-$(CONFIG_PXA_MMC_GENERIC) += pxa_mmc_gen.o
 
 COBJS	:= $(COBJS-y)
 SRCS	:= $(COBJS:.o=.c)
drivers/mmc/pxa_mmc.h +21 -0
index 6fa4268..c993651 100644
@@ -135,4 +135,25 @@
 #define MMC_R1B_ADDR_ERR		0x2000
 #define MMC_R1B_PARAM_ERR		0x4000
 
+/* PXAMMC Generic default config for various CPUs */
+#if defined(CONFIG_PXA250)
+	#define	PXAMMC_FIFO_SIZE	1
+	#define	PXAMMC_MIN_SPEED	312500
+	#define	PXAMMC_MAX_SPEED	20000000
+	#define	PXAMMC_HOST_CAPS	(0)
+#elif defined(CONFIG_PXA27X)
+	#define	PXAMMC_CRC_SKIP
+	#define	PXAMMC_FIFO_SIZE	32
+	#define	PXAMMC_MIN_SPEED	304000
+	#define	PXAMMC_MAX_SPEED	19500000
+	#define	PXAMMC_HOST_CAPS	(MMC_MODE_4BIT)
+#elif defined(CONFIG_CPU_MONAHANS)
+	#define	PXAMMC_FIFO_SIZE	32
+	#define	PXAMMC_MIN_SPEED	304000
+	#define	PXAMMC_MAX_SPEED	26000000
+	#define	PXAMMC_HOST_CAPS	(MMC_MODE_4BIT | MMC_MODE_HS)
+#else
+#error	"Unknown CPU for PXAMMC"
+#endif
+
 #endif /* __MMC_PXA_P_H__ */
drivers/mmc/pxa_mmc_gen.c new file +335 -0

335 lines not on this page · raw message

Signature · 1 line
1.7.1