Skip to contentSkip to conversation

omap mmc: implement card detect and write protection

PATCH New Nikita Kiryanov 3 participants 20 messages Dec 3, 2012 – Mar 9, 2013

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover omap mmc: implement card detect and write protection

This patchset implements card detection and write protection check for omap mmc. The write protect implementation also adds generic code that is usable by other mmc drivers.

The first 3 patches are preparation patches that contain general maintenance for omap mmc driver.

This patchset depends on http://patchwork.ozlabs.org/patch/202384/

Nikita Kiryanov (7):
omap: consolidate common mmc definitions
omap_hsmmc: fix out of bounds array access
omap_hsmmc: introduce omap_hsmmc_data struct
omap_hsmmc: implement driver check for card detection
cm-t35: implement board specific card detect check
mmc: add support for write protection
omap_hsmmc: add driver check for write protection

 arch/arm/cpu/armv7/am33xx/board.c               |    4 +-
 arch/arm/cpu/armv7/omap-common/boot-common.c    |    4 +-
 arch/arm/cpu/armv7/omap3/board.c                |    4 +-
 arch/arm/include/asm/arch-am33xx/mmc_host_def.h |  140 +------------------
 arch/arm/include/asm/arch-omap3/mmc_host_def.h  |  139 +------------------
 arch/arm/include/asm/arch-omap4/mmc_host_def.h  |  140 +------------------
 arch/arm/include/asm/arch-omap5/mmc_host_def.h  |  140 +------------------
 arch/arm/include/asm/omap_mmc.h                 |  168 +++++++++++++++++++++++
 board/cm_t35/cm_t35.c                           |   13 +-
 board/comelit/dig297/dig297.c                   |    3 +-
 board/corscience/tricorder/tricorder.c          |    2 +-
 board/htkw/mcx/mcx.c                            |    2 +-
 board/isee/igep0020/igep0020.c                  |    3 +-
 board/isee/igep0030/igep0030.c                  |    3 +-
 board/logicpd/am3517evm/am3517evm.c             |    3 +-
 board/logicpd/omap3som/omap3logic.c             |    2 +-
 board/logicpd/zoom1/zoom1.c                     |    3 +-
 board/logicpd/zoom2/zoom2.c                     |    3 +-
 board/matrix_vision/mvblx/mvblx.c               |    4 +-
 board/nokia/rx51/rx51.c                         |    4 +-
 board/overo/overo.c                             |    3 +-
 board/pandora/pandora.c                         |    3 +-
 board/technexion/twister/twister.c              |    2 +-
 board/teejet/mt_ventoux/mt_ventoux.c            |    2 +-
 board/ti/am3517crane/am3517crane.c              |    3 +-
 board/ti/beagle/beagle.c                        |    3 +-
 board/ti/evm/evm.c                              |    3 +-
 board/ti/omap5_evm/evm.c                        |    4 +-
 board/ti/panda/panda.c                          |    3 +-
 board/ti/sdp3430/sdp.c                          |    3 +-
 board/ti/sdp4430/sdp.c                          |    4 +-
 board/timll/devkit8000/devkit8000.c             |    3 +-
 common/cmd_mmc.c                                |    7 +
 drivers/mmc/arm_pl180_mmci.c                    |    1 +
 drivers/mmc/bfin_sdh.c                          |    1 +
 drivers/mmc/davinci_mmc.c                       |    1 +
 drivers/mmc/fsl_esdhc.c                         |    1 +
 drivers/mmc/ftsdc010_esdhc.c                    |    1 +
 drivers/mmc/gen_atmel_mci.c                     |    1 +
 drivers/mmc/mmc.c                               |   17 +++
 drivers/mmc/mmc_spi.c                           |    1 +
 drivers/mmc/mxcmmc.c                            |    1 +
 drivers/mmc/mxsmmc.c                            |    1 +
 drivers/mmc/omap_hsmmc.c                        |   78 +++++++++--
 drivers/mmc/sdhci.c                             |    1 +
 drivers/mmc/sh_mmcif.c                          |    1 +
 drivers/mmc/tegra_mmc.c                         |    1 +
 include/mmc.h                                   |    2 +
 48 files changed, 324 insertions(+), 612 deletions(-)
 create mode 100644 arch/arm/include/asm/omap_mmc.h
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/7 omap: consolidate common mmc definitions

The various mmc_host_def.h files are almost identical. Reduce code duplication by moving the similar definitions to a common header file.

---
 arch/arm/include/asm/arch-am33xx/mmc_host_def.h |  140 +------------------
 arch/arm/include/asm/arch-omap3/mmc_host_def.h  |  139 +------------------
 arch/arm/include/asm/arch-omap4/mmc_host_def.h  |  140 +------------------
 arch/arm/include/asm/arch-omap5/mmc_host_def.h  |  140 +------------------
 arch/arm/include/asm/omap_mmc.h                 |  167 +++++++++++++++++++++++
 5 files changed, 175 insertions(+), 551 deletions(-)
 create mode 100644 arch/arm/include/asm/omap_mmc.h
arch/arm/include/asm/arch-am33xx/mmc_host_def.h +2 -138
index 1f597c0..33c9c83 100644
@@ -16,148 +16,12 @@
 #ifndef MMC_HOST_DEF_H
 #define MMC_HOST_DEF_H
 
+#include <asm/omap_mmc.h>
+
 /*
  * OMAP HSMMC register definitions
  */
 #define OMAP_HSMMC1_BASE		0x48060100
 #define OMAP_HSMMC2_BASE		0x481D8100
 
-typedef struct hsmmc {
-	unsigned char res1[0x10];
-	unsigned int sysconfig;		/* 0x10 */
-	unsigned int sysstatus;		/* 0x14 */
-	unsigned char res2[0x14];
-	unsigned int con;		/* 0x2C */
-	unsigned char res3[0xD4];
-	unsigned int blk;		/* 0x104 */
-	unsigned int arg;		/* 0x108 */
-	unsigned int cmd;		/* 0x10C */
-	unsigned int rsp10;		/* 0x110 */
-	unsigned int rsp32;		/* 0x114 */
-	unsigned int rsp54;		/* 0x118 */
-	unsigned int rsp76;		/* 0x11C */
-	unsigned int data;		/* 0x120 */
-	unsigned int pstate;		/* 0x124 */
-	unsigned int hctl;		/* 0x128 */
-	unsigned int sysctl;		/* 0x12C */
-	unsigned int stat;		/* 0x130 */
-	unsigned int ie;		/* 0x134 */
-	unsigned char res4[0x8];
-	unsigned int capa;		/* 0x140 */
-} hsmmc_t;
-
-/*
- * OMAP HS MMC Bit definitions
- */
-#define MMC_SOFTRESET			(0x1 << 1)
-#define RESETDONE			(0x1 << 0)
-#define NOOPENDRAIN			(0x0 << 0)
-#define OPENDRAIN			(0x1 << 0)
-#define OD				(0x1 << 0)
-#define INIT_NOINIT			(0x0 << 1)
-#define INIT_INITSTREAM			(0x1 << 1)
-#define HR_NOHOSTRESP			(0x0 << 2)
-#define STR_BLOCK			(0x0 << 3)
-#define MODE_FUNC			(0x0 << 4)
-#define DW8_1_4BITMODE			(0x0 << 5)
-#define MIT_CTO				(0x0 << 6)
-#define CDP_ACTIVEHIGH			(0x0 << 7)
-#define WPP_ACTIVEHIGH			(0x0 << 8)
-#define RESERVED_MASK			(0x3 << 9)
-#define CTPL_MMC_SD			(0x0 << 11)
-#define BLEN_512BYTESLEN		(0x200 << 0)
-#define NBLK_STPCNT			(0x0 << 16)
-#define DE_DISABLE			(0x0 << 0)
-#define BCE_DISABLE			(0x0 << 1)
-#define BCE_ENABLE			(0x1 << 1)
-#define ACEN_DISABLE			(0x0 << 2)
-#define DDIR_OFFSET			(4)
-#define DDIR_MASK			(0x1 << 4)
-#define DDIR_WRITE			(0x0 << 4)
-#define DDIR_READ			(0x1 << 4)
-#define MSBS_SGLEBLK			(0x0 << 5)
-#define MSBS_MULTIBLK			(0x1 << 5)
-#define RSP_TYPE_OFFSET			(16)
-#define RSP_TYPE_MASK			(0x3 << 16)
-#define RSP_TYPE_NORSP			(0x0 << 16)
-#define RSP_TYPE_LGHT136		(0x1 << 16)
-#define RSP_TYPE_LGHT48			(0x2 << 16)
-#define RSP_TYPE_LGHT48B		(0x3 << 16)
-#define CCCE_NOCHECK			(0x0 << 19)
-#define CCCE_CHECK			(0x1 << 19)
-#define CICE_NOCHECK			(0x0 << 20)
-#define CICE_CHECK			(0x1 << 20)
-#define DP_OFFSET			(21)
-#define DP_MASK				(0x1 << 21)
-#define DP_NO_DATA			(0x0 << 21)
-#define DP_DATA				(0x1 << 21)
-#define CMD_TYPE_NORMAL			(0x0 << 22)
-#define INDEX_OFFSET			(24)
-#define INDEX_MASK			(0x3f << 24)
-#define INDEX(i)			(i << 24)
-#define DATI_MASK			(0x1 << 1)
-#define CMDI_MASK			(0x1 << 0)
-#define DTW_1_BITMODE			(0x0 << 1)
-#define DTW_4_BITMODE			(0x1 << 1)
-#define DTW_8_BITMODE                   (0x1 << 5) /* CON[DW8]*/
-#define SDBP_PWROFF			(0x0 << 8)
-#define SDBP_PWRON			(0x1 << 8)
-#define SDVS_1V8			(0x5 << 9)
-#define SDVS_3V0			(0x6 << 9)
-#define ICE_MASK			(0x1 << 0)
-#define ICE_STOP			(0x0 << 0)
-#define ICS_MASK			(0x1 << 1)
-#define ICS_NOTREADY			(0x0 << 1)
-#define ICE_OSCILLATE			(0x1 << 0)
-#define CEN_MASK			(0x1 << 2)
-#define CEN_DISABLE			(0x0 << 2)
-#define CEN_ENABLE			(0x1 << 2)
-#define CLKD_OFFSET			(6)
-#define CLKD_MASK			(0x3FF << 6)
-#define DTO_MASK			(0xF << 16)
-#define DTO_15THDTO			(0xE << 16)
-#define SOFTRESETALL			(0x1 << 24)
-#define CC_MASK				(0x1 << 0)
-#define TC_MASK				(0x1 << 1)
-#define BWR_MASK			(0x1 << 4)
-#define BRR_MASK			(0x1 << 5)
-#define ERRI_MASK			(0x1 << 15)
-#define IE_CC				(0x01 << 0)
-#define IE_TC				(0x01 << 1)
-#define IE_BWR				(0x01 << 4)
-#define IE_BRR				(0x01 << 5)
-#define IE_CTO				(0x01 << 16)
-#define IE_CCRC				(0x01 << 17)
-#define IE_CEB				(0x01 << 18)
-#define IE_CIE				(0x01 << 19)
-#define IE_DTO				(0x01 << 20)
-#define IE_DCRC				(0x01 << 21)
-#define IE_DEB				(0x01 << 22)
-#define IE_CERR				(0x01 << 28)
-#define IE_BADA				(0x01 << 29)
-
-#define VS30_3V0SUP			(1 << 25)
-#define VS18_1V8SUP			(1 << 26)
-
-/* Driver definitions */
-#define MMCSD_SECTOR_SIZE		512
-#define MMC_CARD			0
-#define SD_CARD				1
-#define BYTE_MODE			0
-#define SECTOR_MODE			1
-#define CLK_INITSEQ			0
-#define CLK_400KHZ			1
-#define CLK_MISC			2
-
-#define RSP_TYPE_NONE	(RSP_TYPE_NORSP | CCCE_NOCHECK | CICE_NOCHECK)
-#define MMC_CMD0	(INDEX(0) | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE)
-
-/* Clock Configurations and Macros */
-#define MMC_CLOCK_REFERENCE	96 /* MHz */
-
-#define mmc_reg_out(addr, mask, val)\
-	writel((readl(addr) & (~(mask))) | ((val) & (mask)), (addr))
-
-int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max);
-
 #endif /* MMC_HOST_DEF_H */
arch/arm/include/asm/arch-omap3/mmc_host_def.h +2 -137

150 lines not on this page · raw message

arch/arm/include/asm/arch-omap4/mmc_host_def.h +2 -138

150 lines not on this page · raw message

arch/arm/include/asm/arch-omap5/mmc_host_def.h +2 -138

150 lines not on this page · raw message

arch/arm/include/asm/omap_mmc.h new file +167 -0

167 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/7 omap_hsmmc: fix out of bounds array access

In reply to Nikita Kiryanov

There are 3 MMC/SD/SDIO controllers in OMAP SoCs, but only 2 structs are defined for devices. This leads to data being written outside of array bounds on systems that use all 3 controllers.

Update hsmmc_dev array to the correct size.

---
 drivers/mmc/omap_hsmmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/omap_hsmmc.c +1 -1
index afd9b30..23dcebd 100644
@@ -44,7 +44,7 @@
 static int mmc_read_data(struct hsmmc *mmc_base, char *buf, unsigned int size);
 static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,
 			unsigned int siz);
-static struct mmc hsmmc_dev[2];
+static struct mmc hsmmc_dev[3];
 
 #if defined(CONFIG_OMAP44XX) && defined(CONFIG_TWL6030_POWER)
 static void omap4_vmmc_pbias_config(struct mmc *mmc)
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH 3/7 omap_hsmmc: introduce omap_hsmmc_data struct

In reply to Nikita Kiryanov

Currently there's no appropriate place to store driver specific data because the pointer that is meant for that (priv) is being used to store the base address of mmc registers.

Introduce a new struct for storing driver specific data.

---
 drivers/mmc/omap_hsmmc.c |   28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)
drivers/mmc/omap_hsmmc.c +18 -10
index 23dcebd..0fdbac3 100644
@@ -38,6 +38,10 @@
 #define SYSCTL_SRC	(1 << 25)
 #define SYSCTL_SRD	(1 << 26)
 
+struct omap_hsmmc_data {
+	struct hsmmc *base_addr;
+};
+
 /* If we fail after 1 second wait, something is really bad */
 #define MAX_RETRY_MS	1000
 
@@ -45,6 +49,7 @@ static int mmc_read_data(struct hsmmc *mmc_base, char *buf, unsigned int size);
 static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,
 			unsigned int siz);
 static struct mmc hsmmc_dev[3];
+static struct omap_hsmmc_data hsmmc_dev_data[3];
 
 #if defined(CONFIG_OMAP44XX) && defined(CONFIG_TWL6030_POWER)
 static void omap4_vmmc_pbias_config(struct mmc *mmc)
@@ -177,11 +182,12 @@ void mmc_init_stream(struct hsmmc *mmc_base)
 
 static int mmc_init_setup(struct mmc *mmc)
 {
-	struct hsmmc *mmc_base = (struct hsmmc *)mmc->priv;
+	struct hsmmc *mmc_base;
 	unsigned int reg_val;
 	unsigned int dsor;
 	ulong start;
 
+	mmc_base = ((struct omap_hsmmc_data *)mmc->priv)->base_addr;
 	mmc_board_init(mmc);
 
 	writel(readl(&mmc_base->sysconfig) | MMC_SOFTRESET,
@@ -262,10 +268,11 @@ static void mmc_reset_controller_fsm(struct hsmmc *mmc_base, u32 bit)
 static int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
 			struct mmc_data *data)
 {
-	struct hsmmc *mmc_base = (struct hsmmc *)mmc->priv;
+	struct hsmmc *mmc_base;
 	unsigned int flags, mmc_stat;
 	ulong start;
 
+	mmc_base = ((struct omap_hsmmc_data *)mmc->priv)->base_addr;
 	start = get_timer(0);
 	while ((readl(&mmc_base->pstate) & (DATI_MASK | CMDI_MASK)) != 0) {
 		if (get_timer(0) - start > MAX_RETRY_MS) {
@@ -489,10 +496,11 @@ static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,
 
 static void mmc_set_ios(struct mmc *mmc)
 {
-	struct hsmmc *mmc_base = (struct hsmmc *)mmc->priv;
+	struct hsmmc *mmc_base;
 	unsigned int dsor = 0;
 	ulong start;
 
+	mmc_base = ((struct omap_hsmmc_data *)mmc->priv)->base_addr;
 	/* configue bus width */
 	switch (mmc->bus_width) {
 	case 8:
@@ -542,32 +550,32 @@ static void mmc_set_ios(struct mmc *mmc)
 
 int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max)
 {
-	struct mmc *mmc;
-
-	mmc = &hsmmc_dev[dev_index];
+	struct mmc *mmc = &hsmmc_dev[dev_index];
+	struct omap_hsmmc_data *priv_data = &hsmmc_dev_data[dev_index];
 
 	sprintf(mmc->name, "OMAP SD/MMC");
 	mmc->send_cmd = mmc_send_cmd;
 	mmc->set_ios = mmc_set_ios;
 	mmc->init = mmc_init_setup;
 	mmc->getcd = NULL;
+	mmc->priv = priv_data;
 
 	switch (dev_index) {
 	case 0:
-		mmc->priv = (struct hsmmc *)OMAP_HSMMC1_BASE;
+		priv_data->base_addr = (struct hsmmc *)OMAP_HSMMC1_BASE;
 		break;
 #ifdef OMAP_HSMMC2_BASE
 	case 1:
-		mmc->priv = (struct hsmmc *)OMAP_HSMMC2_BASE;
+		priv_data->base_addr = (struct hsmmc *)OMAP_HSMMC2_BASE;
 		break;
 #endif
 #ifdef OMAP_HSMMC3_BASE
 	case 2:
-		mmc->priv = (struct hsmmc *)OMAP_HSMMC3_BASE;
+		priv_data->base_addr = (struct hsmmc *)OMAP_HSMMC3_BASE;
 		break;
 #endif
 	default:
-		mmc->priv = (struct hsmmc *)OMAP_HSMMC1_BASE;
+		priv_data->base_addr = (struct hsmmc *)OMAP_HSMMC1_BASE;
 		return 1;
 	}
 	mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
Signature · 1 line
1.7.10.4
#4 lore raw

PATCH 4/7 omap_hsmmc: implement driver check for card detection

In reply to Nikita Kiryanov

Implement driver check for card detection.

---
 arch/arm/cpu/armv7/am33xx/board.c            |    4 +--
 arch/arm/cpu/armv7/omap-common/boot-common.c |    4 +--
 arch/arm/cpu/armv7/omap3/board.c             |    4 +--
 arch/arm/include/asm/omap_mmc.h              |    2 +-
 board/cm_t35/cm_t35.c                        |    2 +-
 board/comelit/dig297/dig297.c                |    3 +--
 board/corscience/tricorder/tricorder.c       |    2 +-
 board/htkw/mcx/mcx.c                         |    2 +-
 board/isee/igep0020/igep0020.c               |    3 +--
 board/isee/igep0030/igep0030.c               |    3 +--
 board/logicpd/am3517evm/am3517evm.c          |    3 +--
 board/logicpd/omap3som/omap3logic.c          |    2 +-
 board/logicpd/zoom1/zoom1.c                  |    3 +--
 board/logicpd/zoom2/zoom2.c                  |    3 +--
 board/matrix_vision/mvblx/mvblx.c            |    4 +--
 board/nokia/rx51/rx51.c                      |    4 +--
 board/overo/overo.c                          |    3 +--
 board/pandora/pandora.c                      |    3 +--
 board/technexion/twister/twister.c           |    2 +-
 board/teejet/mt_ventoux/mt_ventoux.c         |    2 +-
 board/ti/am3517crane/am3517crane.c           |    3 +--
 board/ti/beagle/beagle.c                     |    3 +--
 board/ti/evm/evm.c                           |    3 +--
 board/ti/omap5_evm/evm.c                     |    4 +--
 board/ti/panda/panda.c                       |    3 +--
 board/ti/sdp3430/sdp.c                       |    3 +--
 board/ti/sdp4430/sdp.c                       |    4 +--
 board/timll/devkit8000/devkit8000.c          |    3 +--
 drivers/mmc/omap_hsmmc.c                     |   37 ++++++++++++++++++++++++--
 29 files changed, 70 insertions(+), 51 deletions(-)
arch/arm/cpu/armv7/am33xx/board.c +2 -2
index e4c123c..928ff9f 100644
@@ -50,11 +50,11 @@ int cpu_mmc_init(bd_t *bis)
 {
 	int ret;
 
-	ret = omap_mmc_init(0, 0, 0);
+	ret = omap_mmc_init(0, 0, 0, -1);
 	if (ret)
 		return ret;
 
-	return omap_mmc_init(1, 0, 0);
+	return omap_mmc_init(1, 0, 0, -1);
 }
 #endif
 
arch/arm/cpu/armv7/omap-common/boot-common.c +2 -2
index 0f19141..dc2ee0d 100644
@@ -60,11 +60,11 @@ int board_mmc_init(bd_t *bis)
 {
 	switch (spl_boot_device()) {
 	case BOOT_DEVICE_MMC1:
-		omap_mmc_init(0, 0, 0);
+		omap_mmc_init(0, 0, 0, -1);
 		break;
 	case BOOT_DEVICE_MMC2:
 	case BOOT_DEVICE_MMC2_2:
-		omap_mmc_init(1, 0, 0);
+		omap_mmc_init(1, 0, 0, -1);
 		break;
 	}
 	return 0;
arch/arm/cpu/armv7/omap3/board.c +2 -2
index f3cd81a..e95cc50 100644
@@ -98,11 +98,11 @@ int board_mmc_init(bd_t *bis)
 {
 	switch (spl_boot_device()) {
 	case BOOT_DEVICE_MMC1:
-		omap_mmc_init(0, 0, 0);
+		omap_mmc_init(0, 0, 0, -1);
 		break;
 	case BOOT_DEVICE_MMC2:
 	case BOOT_DEVICE_MMC2_2:
-		omap_mmc_init(1, 0, 0);
+		omap_mmc_init(1, 0, 0, -1);
 		break;
 	}
 	return 0;
arch/arm/include/asm/omap_mmc.h +1 -1
index 83726ee..8d86de1 100644
@@ -161,7 +161,7 @@ struct hsmmc {
 #define mmc_reg_out(addr, mask, val)\
 	writel((readl(addr) & (~(mask))) | ((val) & (mask)), (addr))
 
-int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max);
+int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio);
 
 
 #endif /* OMAP_MMC_H_ */
board/cm_t35/cm_t35.c +1 -1
index 6c2e95b..87a18c0 100644
@@ -346,7 +346,7 @@ void set_muxconf_regs(void)
 #ifdef CONFIG_GENERIC_MMC
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0);
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
 
board/comelit/dig297/dig297.c +1 -2
index c6c1071..2a55cb8 100644
@@ -147,8 +147,7 @@ void set_muxconf_regs(void)
 #ifdef CONFIG_GENERIC_MMC
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	return 0;
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
 
board/corscience/tricorder/tricorder.c +1 -1
index aaff2e8..7a79139 100644
@@ -80,7 +80,7 @@ void set_muxconf_regs(void)
 #if defined(CONFIG_GENERIC_MMC) && !(defined(CONFIG_SPL_BUILD))
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0);
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
 
board/htkw/mcx/mcx.c +1 -1
index 9fe6408..5cf5bb6 100644
@@ -114,7 +114,7 @@ void set_muxconf_regs(void)
 #if defined(CONFIG_OMAP_HSMMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0);
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
 
board/isee/igep0020/igep0020.c +1 -2
index a8257a3..54e2daf 100644
@@ -134,8 +134,7 @@ static void setup_net_chip(void)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	return 0;
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
 
board/isee/igep0030/igep0030.c +1 -2
index 107cb7f..670e0dd 100644
@@ -88,8 +88,7 @@ void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 *ctrlb, u32 *rfr_ctrl,
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	return 0;
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
 
board/logicpd/am3517evm/am3517evm.c +1 -2
index d316f33..837fe21 100644
@@ -79,7 +79,6 @@ void set_muxconf_regs(void)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-       omap_mmc_init(0, 0, 0);
-       return 0;
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
board/logicpd/omap3som/omap3logic.c +1 -1
index 12bcfcb..fc11812 100644
@@ -140,7 +140,7 @@ int board_init(void)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0);
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
 
board/logicpd/zoom1/zoom1.c +1 -2
index 90b6b0f..e02dc34 100644
@@ -92,8 +92,7 @@ void set_muxconf_regs(void)
 #ifdef CONFIG_GENERIC_MMC
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	return 0;
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
 
board/logicpd/zoom2/zoom2.c +1 -2
index 8e18019..a622b9a 100644
@@ -183,8 +183,7 @@ void set_muxconf_regs (void)
 #ifdef CONFIG_GENERIC_MMC
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	return 0;
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
 
board/matrix_vision/mvblx/mvblx.c +2 -2
index f68f312..cb1e0c8 100644
@@ -106,8 +106,8 @@ void set_muxconf_regs(void)
 #ifdef CONFIG_GENERIC_MMC
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	omap_mmc_init(1, 0, 0);
+	omap_mmc_init(0, 0, 0, -1);
+	omap_mmc_init(1, 0, 0, -1);
 	return 0;
 }
 #endif
board/nokia/rx51/rx51.c +2 -2
index b2fe1c5..f303e1e 100644
@@ -671,7 +671,7 @@ int rx51_kp_getc(void)
  */
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	omap_mmc_init(1, 0, 0);
+	omap_mmc_init(0, 0, 0, -1);
+	omap_mmc_init(1, 0, 0, -1);
 	return 0;
 }
board/overo/overo.c +1 -2
index c6d50a0..ef6f77c 100644
@@ -393,7 +393,6 @@ int board_eth_init(bd_t *bis)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	return 0;
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
board/pandora/pandora.c +1 -2
index 3a62e9d..e2feff8 100644
@@ -139,7 +139,6 @@ void set_muxconf_regs(void)
 #ifdef CONFIG_GENERIC_MMC
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	return 0;
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
board/technexion/twister/twister.c +1 -1
index 1471559..b9c543d 100644
@@ -143,7 +143,7 @@ int board_eth_init(bd_t *bis)
 	!defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0);
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
 
board/teejet/mt_ventoux/mt_ventoux.c +1 -1
index 9622a81..0a03c89 100644
@@ -299,7 +299,7 @@ int board_eth_init(bd_t *bis)
 	!defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0);
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
 
board/ti/am3517crane/am3517crane.c +1 -2
index 888398d..91b6822 100644
@@ -78,7 +78,6 @@ void set_muxconf_regs(void)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	return 0;
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
board/ti/beagle/beagle.c +1 -2
index 6175e1d..639c127 100644
@@ -483,8 +483,7 @@ void set_muxconf_regs(void)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	return 0;
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
 
board/ti/evm/evm.c +1 -2
index 61fc7b5..12a433f 100644
@@ -278,7 +278,6 @@ int board_eth_init(bd_t *bis)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	return 0;
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
board/ti/omap5_evm/evm.c +2 -2
index c8dfdf8..45d4704 100644
@@ -94,8 +94,8 @@ void set_muxconf_regs_non_essential(void)
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	omap_mmc_init(1, 0, 0);
+	omap_mmc_init(0, 0, 0, -1);
+	omap_mmc_init(1, 0, 0, -1);
 	return 0;
 }
 #endif
board/ti/panda/panda.c +1 -2
index 4feef78..ebbb8b1 100644
@@ -179,8 +179,7 @@ void set_muxconf_regs_non_essential(void)
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	return 0;
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
 
board/ti/sdp3430/sdp.c +1 -2
index 9a1c012..e256815 100644
@@ -209,7 +209,6 @@ void set_muxconf_regs(void)
 #ifdef CONFIG_GENERIC_MMC
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	return 0;
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
board/ti/sdp4430/sdp.c +2 -2
index 982c771..167f3cb 100644
@@ -108,8 +108,8 @@ void set_muxconf_regs_non_essential(void)
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	omap_mmc_init(1, 0, 0);
+	omap_mmc_init(0, 0, 0, -1);
+	omap_mmc_init(1, 0, 0, -1);
 	return 0;
 }
 #endif
board/timll/devkit8000/devkit8000.c +1 -2
index 35f5e15..c6f7158 100644
@@ -136,8 +136,7 @@ void set_muxconf_regs(void)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0);
-	return 0;
+	return omap_mmc_init(0, 0, 0, -1);
 }
 #endif
 
drivers/mmc/omap_hsmmc.c +35 -2
index 0fdbac3..cb1a7bd 100644
@@ -30,6 +30,7 @@
 #include <twl4030.h>
 #include <twl6030.h>
 #include <twl6035.h>
+#include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/sys_proto.h>
@@ -40,6 +41,7 @@
 
 struct omap_hsmmc_data {
 	struct hsmmc *base_addr;
+	int cd_gpio;
 };
 
 /* If we fail after 1 second wait, something is really bad */
@@ -51,6 +53,36 @@ static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,
 static struct mmc hsmmc_dev[3];
 static struct omap_hsmmc_data hsmmc_dev_data[3];
 
+#if (defined(CONFIG_OMAP_GPIO) && !defined(CONFIG_SPL_BUILD)) || \
+	(defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_GPIO_SUPPORT))
+static int omap_mmc_setup_gpio_in(int gpio, const char *label)
+{
+	if (!gpio_is_valid(gpio))
+		return -1;
+
+	if (gpio_request(gpio, label) < 0)
+		return -1;
+
+	if (gpio_direction_input(gpio) < 0)
+		return -1;
+
+	return gpio;
+}
+
+static int omap_mmc_getcd(struct mmc *mmc)
+{
+	int cd_gpio = ((struct omap_hsmmc_data *)mmc->priv)->cd_gpio;
+	return gpio_get_value(cd_gpio);
+}
+#else
+static inline int omap_mmc_setup_gpio_in(int gpio, const char *label)
+{
+	return -1;
+}
+
+#define omap_mmc_getcd NULL
+#endif
+
 #if defined(CONFIG_OMAP44XX) && defined(CONFIG_TWL6030_POWER)
 static void omap4_vmmc_pbias_config(struct mmc *mmc)
 {
@@ -548,7 +580,7 @@ static void mmc_set_ios(struct mmc *mmc)
 	writel(readl(&mmc_base->sysctl) | CEN_ENABLE, &mmc_base->sysctl);
 }
 
-int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max)
+int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio)
 {
 	struct mmc *mmc = &hsmmc_dev[dev_index];
 	struct omap_hsmmc_data *priv_data = &hsmmc_dev_data[dev_index];
@@ -557,7 +589,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max)
 	mmc->send_cmd = mmc_send_cmd;
 	mmc->set_ios = mmc_set_ios;
 	mmc->init = mmc_init_setup;
-	mmc->getcd = NULL;
+	mmc->getcd = omap_mmc_getcd;
 	mmc->priv = priv_data;
 
 	switch (dev_index) {
@@ -578,6 +610,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max)
 		priv_data->base_addr = (struct hsmmc *)OMAP_HSMMC1_BASE;
 		return 1;
 	}
+	priv_data->cd_gpio = omap_mmc_setup_gpio_in(cd_gpio, "mmc_cd");
 	mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
 	mmc->host_caps = (MMC_MODE_4BIT | MMC_MODE_HS_52MHz | MMC_MODE_HS |
 				MMC_MODE_HC) & ~host_caps_mask;
Signature · 1 line
1.7.10.4
#5 lore raw

PATCH 4/7 omap_hsmmc: implement driver check for card detection

arch/arm/cpu/armv7/am33xx/board.c int cpu_mmc_init(bd_t *bis) · line 53

Quoted 7 lines · Nikita Kiryanov

Implement driver check for card detection.

arch/arm/cpu/armv7/am33xx/board.c +1 -1
-	ret = omap_mmc_init(0, 0, 0);
+	ret = omap_mmc_init(0, 0, 0, -1);

Everyone passes -1 here, including the follow-up patch for cm_t35. Why do we need the change?

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121218/e25e1b96/attachment.pgp>
#6 lore raw

PATCH 4/7 omap_hsmmc: implement driver check for card detection

Quoted 4 lines · Tom Rini
Quoted 2 lines · Nikita Kiryanov

Implement driver check for card detection.

Quoted 9 lines

arch/arm/cpu/armv7/am33xx/board.c int cpu_mmc_init(bd_t *bis) · line 53

Quoted 5 lines
arch/arm/cpu/armv7/am33xx/board.c +1 -1
-	ret = omap_mmc_init(0, 0, 0);
+	ret = omap_mmc_init(0, 0, 0, -1);

Everyone passes -1 here, including the follow-up patch for cm_t35. Why do we need the change?

This change is useful because on OMAP it's a fair assumption that card detect (and write protect) signal will be ascertained via a GPIO, though it is not a certainty.

Everybody who is not cm_t35 get a -1 because I did not try to figure out if they really do use GPIOs for card detect. cm_t35 gets a -1 because it does not use OMAP GPIOs for card detect, but relies on those of the PMIC instead.

Signature · 2 lines
Regards,
Nikita.
#7 lore raw

PATCH 5/7 cm-t35: implement board specific card detect check

In reply to Nikita Kiryanov

Implement a card detection check for cm-t35.

---
 board/cm_t35/cm_t35.c |   11 +++++++++++
 1 file changed, 11 insertions(+)
board/cm_t35/cm_t35.c +11 -0
index 87a18c0..50c0990 100644
@@ -32,6 +32,7 @@
 #include <netdev.h>
 #include <net.h>
 #include <i2c.h>
+#include <mmc.h>
 #include <twl4030.h>
 #include <linux/compiler.h>
 
@@ -344,6 +345,16 @@ void set_muxconf_regs(void)
 }
 
 #ifdef CONFIG_GENERIC_MMC
+int board_mmc_getcd(struct mmc *mmc)
+{
+	u8 val;
+
+	if (twl4030_i2c_read_u8(TWL4030_CHIP_GPIO, &val, TWL4030_BASEADD_GPIO))
+		return -1;
+
+	return !(val & 1);
+}
+
 int board_mmc_init(bd_t *bis)
 {
 	return omap_mmc_init(0, 0, 0, -1);
Signature · 1 line
1.7.10.4
#8 lore raw

PATCH 6/7 mmc: add support for write protection

In reply to Nikita Kiryanov

Add generic mmc write protection functionality.

---
 common/cmd_mmc.c             |    7 +++++++
 drivers/mmc/arm_pl180_mmci.c |    1 +
 drivers/mmc/bfin_sdh.c       |    1 +
 drivers/mmc/davinci_mmc.c    |    1 +
 drivers/mmc/fsl_esdhc.c      |    1 +
 drivers/mmc/ftsdc010_esdhc.c |    1 +
 drivers/mmc/gen_atmel_mci.c  |    1 +
 drivers/mmc/mmc.c            |   17 +++++++++++++++++
 drivers/mmc/mmc_spi.c        |    1 +
 drivers/mmc/mxcmmc.c         |    1 +
 drivers/mmc/mxsmmc.c         |    1 +
 drivers/mmc/omap_hsmmc.c     |    1 +
 drivers/mmc/sdhci.c          |    1 +
 drivers/mmc/sh_mmcif.c       |    1 +
 drivers/mmc/tegra_mmc.c      |    1 +
 include/mmc.h                |    2 ++
 16 files changed, 39 insertions(+)
common/cmd_mmc.c +7 -0
index 4c19df7..337bf2b 100644
@@ -283,6 +283,13 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 		mmc_init(mmc);
 
+		if ((state == MMC_WRITE || state == MMC_ERASE)) {
+			if (mmc_getwp(mmc) == 1) {
+				printf("Error: card is write protected!\n");
+				return 1;
+			}
+		}
+
 		switch (state) {
 		case MMC_READ:
 			n = mmc->block_dev.block_read(curr_device, blk,
drivers/mmc/arm_pl180_mmci.c +1 -0
index af1380a..ab2e81e 100644
@@ -377,6 +377,7 @@ int arm_pl180_mmci_init(struct pl180_mmc_host *host)
 	dev->set_ios = host_set_ios;
 	dev->init = mmc_host_reset;
 	dev->getcd = NULL;
+	dev->getwp = NULL;
 	dev->host_caps = host->caps;
 	dev->voltages = host->voltages;
 	dev->f_min = host->clock_min;
drivers/mmc/bfin_sdh.c +1 -0
index 8d59d46..81d8e54 100644
@@ -251,6 +251,7 @@ int bfin_mmc_init(bd_t *bis)
 	mmc->set_ios = bfin_sdh_set_ios;
 	mmc->init = bfin_sdh_init;
 	mmc->getcd = NULL;
+	mmc->getwp = NULL;
 	mmc->host_caps = MMC_MODE_4BIT;
 
 	mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
drivers/mmc/davinci_mmc.c +1 -0
index ee8f261..e2379e3 100644
@@ -388,6 +388,7 @@ int davinci_mmc_init(bd_t *bis, struct davinci_mmc *host)
 	mmc->set_ios = dmmc_set_ios;
 	mmc->init = dmmc_init;
 	mmc->getcd = NULL;
+	mmc->getwp = NULL;
 
 	mmc->f_min = 200000;
 	mmc->f_max = 25000000;
drivers/mmc/fsl_esdhc.c +1 -0
index e93e38a..9aef2c7 100644
@@ -552,6 +552,7 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg)
 	mmc->set_ios = esdhc_set_ios;
 	mmc->init = esdhc_init;
 	mmc->getcd = esdhc_getcd;
+	mmc->getwp = NULL;
 
 	voltage_caps = 0;
 	caps = regs->hostcapblt;
drivers/mmc/ftsdc010_esdhc.c +1 -0
index f1702fe..42f0e0c 100644
@@ -666,6 +666,7 @@ int ftsdc010_mmc_init(int dev_index)
 	mmc->set_ios = ftsdc010_set_ios;
 	mmc->init = ftsdc010_core_init;
 	mmc->getcd = NULL;
+	mmc->getwp = NULL;
 
 	mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
 
drivers/mmc/gen_atmel_mci.c +1 -0
index 67b2dbe..70a9f91 100644
@@ -349,6 +349,7 @@ int atmel_mci_init(void *regs)
 	mmc->set_ios = mci_set_ios;
 	mmc->init = mci_init;
 	mmc->getcd = NULL;
+	mmc->getwp = NULL;
 
 	/* need to be able to pass these in on a board by board basis */
 	mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
drivers/mmc/mmc.c +17 -0
index 5ffd8c5..619200b 100644
@@ -40,6 +40,23 @@
 static struct list_head mmc_devices;
 static int cur_dev_num = -1;
 
+int __weak board_mmc_getwp(struct mmc *mmc)
+{
+	return -1;
+}
+
+int mmc_getwp(struct mmc *mmc)
+{
+	int wp;
+
+	wp = board_mmc_getwp(mmc);
+
+	if ((wp < 0) && mmc->getwp)
+		wp = mmc->getwp(mmc);
+
+	return wp;
+}
+
 int __board_mmc_getcd(struct mmc *mmc) {
 	return -1;
 }
drivers/mmc/mmc_spi.c +1 -0
index 11ba532..fe6a5a1 100644
@@ -273,6 +273,7 @@ struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode)
 	mmc->set_ios = mmc_spi_set_ios;
 	mmc->init = mmc_spi_init_p;
 	mmc->getcd = NULL;
+	mmc->getwp = NULL;
 	mmc->host_caps = MMC_MODE_SPI;
 
 	mmc->voltages = MMC_SPI_VOLTAGE;
drivers/mmc/mxcmmc.c +1 -0
index d58c18b..4f99617 100644
@@ -499,6 +499,7 @@ static int mxcmci_initialize(bd_t *bis)
 	mmc->set_ios = mxcmci_set_ios;
 	mmc->init = mxcmci_init;
 	mmc->getcd = NULL;
+	mmc->getwp = NULL;
 	mmc->host_caps = MMC_MODE_4BIT;
 
 	host->base = (struct mxcmci_regs *)CONFIG_MXC_MCI_REGS_BASE;
drivers/mmc/mxsmmc.c +1 -0
index 109acbf..59d0fce 100644
@@ -428,6 +428,7 @@ int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int))
 	mmc->set_ios = mxsmmc_set_ios;
 	mmc->init = mxsmmc_init;
 	mmc->getcd = NULL;
+	mmc->getwp = NULL;
 	mmc->priv = priv;
 
 	mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
drivers/mmc/omap_hsmmc.c +1 -0
index cb1a7bd..fcbd133 100644
@@ -590,6 +590,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio)
 	mmc->set_ios = mmc_set_ios;
 	mmc->init = mmc_init_setup;
 	mmc->getcd = omap_mmc_getcd;
+	mmc->getwp = NULL;
 	mmc->priv = priv_data;
 
 	switch (dev_index) {
drivers/mmc/sdhci.c +1 -0
index 7845f87..1c0be72 100644
@@ -435,6 +435,7 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk)
 	mmc->set_ios = sdhci_set_ios;
 	mmc->init = sdhci_init;
 	mmc->getcd = NULL;
+	mmc->getwp = NULL;
 
 	caps = sdhci_readl(host, SDHCI_CAPABILITIES);
 #ifdef CONFIG_MMC_SDMA
drivers/mmc/sh_mmcif.c +1 -0
index 4588568..011d4f3 100644
@@ -599,6 +599,7 @@ int mmcif_mmc_init(void)
 	mmc->set_ios = sh_mmcif_set_ios;
 	mmc->init = sh_mmcif_init;
 	mmc->getcd = NULL;
+	mmc->getwp = NULL;
 	host->regs = (struct sh_mmcif_regs *)CONFIG_SH_MMCIF_ADDR;
 	host->clk = CONFIG_SH_MMCIF_CLK;
 	mmc->priv = host;
drivers/mmc/tegra_mmc.c +1 -0
index 8fea6a6..633173f 100644
@@ -545,6 +545,7 @@ int tegra_mmc_init(int dev_index, int bus_width, int pwr_gpio, int cd_gpio)
 	mmc->set_ios = mmc_set_ios;
 	mmc->init = mmc_core_init;
 	mmc->getcd = tegra_mmc_getcd;
+	mmc->getwp = NULL;
 
 	mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
 	if (bus_width == 8)
include/mmc.h +2 -0
index a13e2bd..de6d497 100644
@@ -259,6 +259,7 @@ struct mmc {
 	void (*set_ios)(struct mmc *mmc);
 	int (*init)(struct mmc *mmc);
 	int (*getcd)(struct mmc *mmc);
+	int (*getwp)(struct mmc *mmc);
 	uint b_max;
 };
 
@@ -274,6 +275,7 @@ int get_mmc_num(void);
 int board_mmc_getcd(struct mmc *mmc);
 int mmc_switch_part(int dev_num, unsigned int part_num);
 int mmc_getcd(struct mmc *mmc);
+int mmc_getwp(struct mmc *mmc);
 void spl_mmc_load(void) __noreturn;
 
 #ifdef CONFIG_GENERIC_MMC
Signature · 1 line
1.7.10.4
#9 lore raw

PATCH 7/7 omap_hsmmc: add driver check for write protection

In reply to Nikita Kiryanov

Add check for write protection in omap mmc driver.

---
 arch/arm/cpu/armv7/am33xx/board.c            |    4 ++--
 arch/arm/cpu/armv7/omap-common/boot-common.c |    4 ++--
 arch/arm/cpu/armv7/omap3/board.c             |    4 ++--
 arch/arm/include/asm/omap_mmc.h              |    3 ++-
 board/cm_t35/cm_t35.c                        |    2 +-
 board/comelit/dig297/dig297.c                |    2 +-
 board/corscience/tricorder/tricorder.c       |    2 +-
 board/htkw/mcx/mcx.c                         |    2 +-
 board/isee/igep0020/igep0020.c               |    2 +-
 board/isee/igep0030/igep0030.c               |    2 +-
 board/logicpd/am3517evm/am3517evm.c          |    2 +-
 board/logicpd/omap3som/omap3logic.c          |    2 +-
 board/logicpd/zoom1/zoom1.c                  |    2 +-
 board/logicpd/zoom2/zoom2.c                  |    2 +-
 board/matrix_vision/mvblx/mvblx.c            |    4 ++--
 board/nokia/rx51/rx51.c                      |    4 ++--
 board/overo/overo.c                          |    2 +-
 board/pandora/pandora.c                      |    2 +-
 board/technexion/twister/twister.c           |    2 +-
 board/teejet/mt_ventoux/mt_ventoux.c         |    2 +-
 board/ti/am3517crane/am3517crane.c           |    2 +-
 board/ti/beagle/beagle.c                     |    2 +-
 board/ti/evm/evm.c                           |    2 +-
 board/ti/omap5_evm/evm.c                     |    4 ++--
 board/ti/panda/panda.c                       |    2 +-
 board/ti/sdp3430/sdp.c                       |    2 +-
 board/ti/sdp4430/sdp.c                       |    4 ++--
 board/timll/devkit8000/devkit8000.c          |    2 +-
 drivers/mmc/omap_hsmmc.c                     |   14 ++++++++++++--
 29 files changed, 48 insertions(+), 37 deletions(-)
arch/arm/cpu/armv7/am33xx/board.c +2 -2
index 928ff9f..99325c4 100644
@@ -50,11 +50,11 @@ int cpu_mmc_init(bd_t *bis)
 {
 	int ret;
 
-	ret = omap_mmc_init(0, 0, 0, -1);
+	ret = omap_mmc_init(0, 0, 0, -1, -1);
 	if (ret)
 		return ret;
 
-	return omap_mmc_init(1, 0, 0, -1);
+	return omap_mmc_init(1, 0, 0, -1, -1);
 }
 #endif
 
arch/arm/cpu/armv7/omap-common/boot-common.c +2 -2
index dc2ee0d..25253b6 100644
@@ -60,11 +60,11 @@ int board_mmc_init(bd_t *bis)
 {
 	switch (spl_boot_device()) {
 	case BOOT_DEVICE_MMC1:
-		omap_mmc_init(0, 0, 0, -1);
+		omap_mmc_init(0, 0, 0, -1, -1);
 		break;
 	case BOOT_DEVICE_MMC2:
 	case BOOT_DEVICE_MMC2_2:
-		omap_mmc_init(1, 0, 0, -1);
+		omap_mmc_init(1, 0, 0, -1, -1);
 		break;
 	}
 	return 0;
arch/arm/cpu/armv7/omap3/board.c +2 -2
index e95cc50..84e3bcb 100644
@@ -98,11 +98,11 @@ int board_mmc_init(bd_t *bis)
 {
 	switch (spl_boot_device()) {
 	case BOOT_DEVICE_MMC1:
-		omap_mmc_init(0, 0, 0, -1);
+		omap_mmc_init(0, 0, 0, -1, -1);
 		break;
 	case BOOT_DEVICE_MMC2:
 	case BOOT_DEVICE_MMC2_2:
-		omap_mmc_init(1, 0, 0, -1);
+		omap_mmc_init(1, 0, 0, -1, -1);
 		break;
 	}
 	return 0;
arch/arm/include/asm/omap_mmc.h +2 -1
index 8d86de1..617e22f 100644
@@ -161,7 +161,8 @@ struct hsmmc {
 #define mmc_reg_out(addr, mask, val)\
 	writel((readl(addr) & (~(mask))) | ((val) & (mask)), (addr))
 
-int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio);
+int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
+		int wp_gpio);
 
 
 #endif /* OMAP_MMC_H_ */
board/cm_t35/cm_t35.c +1 -1
index 50c0990..6b3617c 100644
@@ -357,7 +357,7 @@ int board_mmc_getcd(struct mmc *mmc)
 
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, 59);
 }
 #endif
 
board/comelit/dig297/dig297.c +1 -1
index 2a55cb8..2dca275 100644
@@ -147,7 +147,7 @@ void set_muxconf_regs(void)
 #ifdef CONFIG_GENERIC_MMC
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
board/corscience/tricorder/tricorder.c +1 -1
index 7a79139..092f82e 100644
@@ -80,7 +80,7 @@ void set_muxconf_regs(void)
 #if defined(CONFIG_GENERIC_MMC) && !(defined(CONFIG_SPL_BUILD))
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
board/htkw/mcx/mcx.c +1 -1
index 5cf5bb6..46fa7e4 100644
@@ -114,7 +114,7 @@ void set_muxconf_regs(void)
 #if defined(CONFIG_OMAP_HSMMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
board/isee/igep0020/igep0020.c +1 -1
index 54e2daf..a025c24 100644
@@ -134,7 +134,7 @@ static void setup_net_chip(void)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
board/isee/igep0030/igep0030.c +1 -1
index 670e0dd..87f6774 100644
@@ -88,7 +88,7 @@ void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 *ctrlb, u32 *rfr_ctrl,
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
board/logicpd/am3517evm/am3517evm.c +1 -1
index 837fe21..c9858cc 100644
@@ -79,6 +79,6 @@ void set_muxconf_regs(void)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
board/logicpd/omap3som/omap3logic.c +1 -1
index fc11812..6e83aa2 100644
@@ -140,7 +140,7 @@ int board_init(void)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
board/logicpd/zoom1/zoom1.c +1 -1
index e02dc34..c79a261 100644
@@ -92,7 +92,7 @@ void set_muxconf_regs(void)
 #ifdef CONFIG_GENERIC_MMC
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
board/logicpd/zoom2/zoom2.c +1 -1
index a622b9a..ad6ae36 100644
@@ -183,7 +183,7 @@ void set_muxconf_regs (void)
 #ifdef CONFIG_GENERIC_MMC
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
board/matrix_vision/mvblx/mvblx.c +2 -2
index cb1e0c8..49af384 100644
@@ -106,8 +106,8 @@ void set_muxconf_regs(void)
 #ifdef CONFIG_GENERIC_MMC
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0, -1);
-	omap_mmc_init(1, 0, 0, -1);
+	omap_mmc_init(0, 0, 0, -1, -1);
+	omap_mmc_init(1, 0, 0, -1, -1);
 	return 0;
 }
 #endif
board/nokia/rx51/rx51.c +2 -2
index f303e1e..48eb65f 100644
@@ -671,7 +671,7 @@ int rx51_kp_getc(void)
  */
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0, -1);
-	omap_mmc_init(1, 0, 0, -1);
+	omap_mmc_init(0, 0, 0, -1, -1);
+	omap_mmc_init(1, 0, 0, -1, -1);
 	return 0;
 }
board/overo/overo.c +1 -1
index ef6f77c..c6a4e3a 100644
@@ -393,6 +393,6 @@ int board_eth_init(bd_t *bis)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
board/pandora/pandora.c +1 -1
index e2feff8..9ff5dd7 100644
@@ -139,6 +139,6 @@ void set_muxconf_regs(void)
 #ifdef CONFIG_GENERIC_MMC
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
board/technexion/twister/twister.c +1 -1
index b9c543d..242c04e 100644
@@ -143,7 +143,7 @@ int board_eth_init(bd_t *bis)
 	!defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
board/teejet/mt_ventoux/mt_ventoux.c +1 -1
index 0a03c89..5c5383a 100644
@@ -299,7 +299,7 @@ int board_eth_init(bd_t *bis)
 	!defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
board/ti/am3517crane/am3517crane.c +1 -1
index 91b6822..0b94245 100644
@@ -78,6 +78,6 @@ void set_muxconf_regs(void)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
board/ti/beagle/beagle.c +1 -1
index 639c127..7829261 100644
@@ -483,7 +483,7 @@ void set_muxconf_regs(void)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
board/ti/evm/evm.c +1 -1
index 12a433f..d2959ba 100644
@@ -278,6 +278,6 @@ int board_eth_init(bd_t *bis)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
board/ti/omap5_evm/evm.c +2 -2
index 45d4704..55337c0 100644
@@ -94,8 +94,8 @@ void set_muxconf_regs_non_essential(void)
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0, -1);
-	omap_mmc_init(1, 0, 0, -1);
+	omap_mmc_init(0, 0, 0, -1, -1);
+	omap_mmc_init(1, 0, 0, -1, -1);
 	return 0;
 }
 #endif
board/ti/panda/panda.c +1 -1
index ebbb8b1..cab0598 100644
@@ -179,7 +179,7 @@ void set_muxconf_regs_non_essential(void)
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
board/ti/sdp3430/sdp.c +1 -1
index e256815..052efc5 100644
@@ -209,6 +209,6 @@ void set_muxconf_regs(void)
 #ifdef CONFIG_GENERIC_MMC
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
board/ti/sdp4430/sdp.c +2 -2
index 167f3cb..4c1a4f7 100644
@@ -108,8 +108,8 @@ void set_muxconf_regs_non_essential(void)
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
 int board_mmc_init(bd_t *bis)
 {
-	omap_mmc_init(0, 0, 0, -1);
-	omap_mmc_init(1, 0, 0, -1);
+	omap_mmc_init(0, 0, 0, -1, -1);
+	omap_mmc_init(1, 0, 0, -1, -1);
 	return 0;
 }
 #endif
board/timll/devkit8000/devkit8000.c +1 -1
index c6f7158..0b81e56 100644
@@ -136,7 +136,7 @@ void set_muxconf_regs(void)
 #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(0, 0, 0, -1);
+	return omap_mmc_init(0, 0, 0, -1, -1);
 }
 #endif
 
drivers/mmc/omap_hsmmc.c +12 -2
index fcbd133..d0b2820 100644
@@ -42,6 +42,7 @@
 struct omap_hsmmc_data {
 	struct hsmmc *base_addr;
 	int cd_gpio;
+	int wp_gpio;
 };
 
 /* If we fail after 1 second wait, something is really bad */
@@ -74,6 +75,12 @@ static int omap_mmc_getcd(struct mmc *mmc)
 	int cd_gpio = ((struct omap_hsmmc_data *)mmc->priv)->cd_gpio;
 	return gpio_get_value(cd_gpio);
 }
+
+static int omap_mmc_getwp(struct mmc *mmc)
+{
+	int wp_gpio = ((struct omap_hsmmc_data *)mmc->priv)->wp_gpio;
+	return gpio_get_value(wp_gpio);
+}
 #else
 static inline int omap_mmc_setup_gpio_in(int gpio, const char *label)
 {
@@ -81,6 +88,7 @@ static inline int omap_mmc_setup_gpio_in(int gpio, const char *label)
 }
 
 #define omap_mmc_getcd NULL
+#define omap_mmc_getwp NULL
 #endif
 
 #if defined(CONFIG_OMAP44XX) && defined(CONFIG_TWL6030_POWER)
@@ -580,7 +588,8 @@ static void mmc_set_ios(struct mmc *mmc)
 	writel(readl(&mmc_base->sysctl) | CEN_ENABLE, &mmc_base->sysctl);
 }
 
-int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio)
+int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
+		int wp_gpio)
 {
 	struct mmc *mmc = &hsmmc_dev[dev_index];
 	struct omap_hsmmc_data *priv_data = &hsmmc_dev_data[dev_index];
@@ -590,7 +599,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio)
 	mmc->set_ios = mmc_set_ios;
 	mmc->init = mmc_init_setup;
 	mmc->getcd = omap_mmc_getcd;
-	mmc->getwp = NULL;
+	mmc->getwp = omap_mmc_getwp;
 	mmc->priv = priv_data;
 
 	switch (dev_index) {
@@ -612,6 +621,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio)
 		return 1;
 	}
 	priv_data->cd_gpio = omap_mmc_setup_gpio_in(cd_gpio, "mmc_cd");
+	priv_data->wp_gpio = omap_mmc_setup_gpio_in(wp_gpio, "mmc_wp");
 	mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
 	mmc->host_caps = (MMC_MODE_4BIT | MMC_MODE_HS_52MHz | MMC_MODE_HS |
 				MMC_MODE_HC) & ~host_caps_mask;
Signature · 1 line
1.7.10.4
#10 lore raw

PATCH 7/7 omap_hsmmc: add driver check for write protection

Quoted 4 lines · Nikita Kiryanov

Add check for write protection in omap mmc driver.

[snip]

drivers/mmc/omap_hsmmc.c static void mmc_set_ios(struct mmc *mmc) · line 592

Quoted 3 lines
drivers/mmc/omap_hsmmc.c +2 -1
-int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio)
+int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
+		int wp_gpio)

OK, next person to modify this function has to make it take a struct params instead. Or if you're up for it, a follow-up patch.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130215/386f62ed/attachment.pgp>
#11 lore raw

cover omap mmc: implement card detect and write protection

In reply to Nikita Kiryanov

Gentle ping.

Quoted 69 lines · Nikita Kiryanov

This patchset implements card detection and write protection check for omap mmc. The write protect implementation also adds generic code that is usable by other mmc drivers.

The first 3 patches are preparation patches that contain general maintenance for omap mmc driver.

This patchset depends on http://patchwork.ozlabs.org/patch/202384/

Nikita Kiryanov (7):
omap: consolidate common mmc definitions
omap_hsmmc: fix out of bounds array access
omap_hsmmc: introduce omap_hsmmc_data struct
omap_hsmmc: implement driver check for card detection
cm-t35: implement board specific card detect check
mmc: add support for write protection
omap_hsmmc: add driver check for write protection

  arch/arm/cpu/armv7/am33xx/board.c               |    4 +-
  arch/arm/cpu/armv7/omap-common/boot-common.c    |    4 +-
  arch/arm/cpu/armv7/omap3/board.c                |    4 +-
  arch/arm/include/asm/arch-am33xx/mmc_host_def.h |  140 +------------------
  arch/arm/include/asm/arch-omap3/mmc_host_def.h  |  139 +------------------
  arch/arm/include/asm/arch-omap4/mmc_host_def.h  |  140 +------------------
  arch/arm/include/asm/arch-omap5/mmc_host_def.h  |  140 +------------------
  arch/arm/include/asm/omap_mmc.h                 |  168 +++++++++++++++++++++++
  board/cm_t35/cm_t35.c                           |   13 +-
  board/comelit/dig297/dig297.c                   |    3 +-
  board/corscience/tricorder/tricorder.c          |    2 +-
  board/htkw/mcx/mcx.c                            |    2 +-
  board/isee/igep0020/igep0020.c                  |    3 +-
  board/isee/igep0030/igep0030.c                  |    3 +-
  board/logicpd/am3517evm/am3517evm.c             |    3 +-
  board/logicpd/omap3som/omap3logic.c             |    2 +-
  board/logicpd/zoom1/zoom1.c                     |    3 +-
  board/logicpd/zoom2/zoom2.c                     |    3 +-
  board/matrix_vision/mvblx/mvblx.c               |    4 +-
  board/nokia/rx51/rx51.c                         |    4 +-
  board/overo/overo.c                             |    3 +-
  board/pandora/pandora.c                         |    3 +-
  board/technexion/twister/twister.c              |    2 +-
  board/teejet/mt_ventoux/mt_ventoux.c            |    2 +-
  board/ti/am3517crane/am3517crane.c              |    3 +-
  board/ti/beagle/beagle.c                        |    3 +-
  board/ti/evm/evm.c                              |    3 +-
  board/ti/omap5_evm/evm.c                        |    4 +-
  board/ti/panda/panda.c                          |    3 +-
  board/ti/sdp3430/sdp.c                          |    3 +-
  board/ti/sdp4430/sdp.c                          |    4 +-
  board/timll/devkit8000/devkit8000.c             |    3 +-
  common/cmd_mmc.c                                |    7 +
  drivers/mmc/arm_pl180_mmci.c                    |    1 +
  drivers/mmc/bfin_sdh.c                          |    1 +
  drivers/mmc/davinci_mmc.c                       |    1 +
  drivers/mmc/fsl_esdhc.c                         |    1 +
  drivers/mmc/ftsdc010_esdhc.c                    |    1 +
  drivers/mmc/gen_atmel_mci.c                     |    1 +
  drivers/mmc/mmc.c                               |   17 +++
  drivers/mmc/mmc_spi.c                           |    1 +
  drivers/mmc/mxcmmc.c                            |    1 +
  drivers/mmc/mxsmmc.c                            |    1 +
  drivers/mmc/omap_hsmmc.c                        |   78 +++++++++--
  drivers/mmc/sdhci.c                             |    1 +
  drivers/mmc/sh_mmcif.c                          |    1 +
  drivers/mmc/tegra_mmc.c                         |    1 +
  include/mmc.h                                   |    2 +
  48 files changed, 324 insertions(+), 612 deletions(-)

create mode 100644 arch/arm/include/asm/omap_mmc.h

Signature · 2 lines
Regards,
Nikita.
#12 lore raw

cover omap mmc: implement card detect and write protection

In reply to Nikita Kiryanov

Gentle ping.

Quoted 69 lines · Nikita Kiryanov

This patchset implements card detection and write protection check for omap mmc. The write protect implementation also adds generic code that is usable by other mmc drivers.

The first 3 patches are preparation patches that contain general maintenance for omap mmc driver.

This patchset depends on http://patchwork.ozlabs.org/patch/202384/

Nikita Kiryanov (7):
omap: consolidate common mmc definitions
omap_hsmmc: fix out of bounds array access
omap_hsmmc: introduce omap_hsmmc_data struct
omap_hsmmc: implement driver check for card detection
cm-t35: implement board specific card detect check
mmc: add support for write protection
omap_hsmmc: add driver check for write protection

  arch/arm/cpu/armv7/am33xx/board.c               |    4 +-
  arch/arm/cpu/armv7/omap-common/boot-common.c    |    4 +-
  arch/arm/cpu/armv7/omap3/board.c                |    4 +-
  arch/arm/include/asm/arch-am33xx/mmc_host_def.h |  140 +------------------
  arch/arm/include/asm/arch-omap3/mmc_host_def.h  |  139 +------------------
  arch/arm/include/asm/arch-omap4/mmc_host_def.h  |  140 +------------------
  arch/arm/include/asm/arch-omap5/mmc_host_def.h  |  140 +------------------
  arch/arm/include/asm/omap_mmc.h                 |  168 +++++++++++++++++++++++
  board/cm_t35/cm_t35.c                           |   13 +-
  board/comelit/dig297/dig297.c                   |    3 +-
  board/corscience/tricorder/tricorder.c          |    2 +-
  board/htkw/mcx/mcx.c                            |    2 +-
  board/isee/igep0020/igep0020.c                  |    3 +-
  board/isee/igep0030/igep0030.c                  |    3 +-
  board/logicpd/am3517evm/am3517evm.c             |    3 +-
  board/logicpd/omap3som/omap3logic.c             |    2 +-
  board/logicpd/zoom1/zoom1.c                     |    3 +-
  board/logicpd/zoom2/zoom2.c                     |    3 +-
  board/matrix_vision/mvblx/mvblx.c               |    4 +-
  board/nokia/rx51/rx51.c                         |    4 +-
  board/overo/overo.c                             |    3 +-
  board/pandora/pandora.c                         |    3 +-
  board/technexion/twister/twister.c              |    2 +-
  board/teejet/mt_ventoux/mt_ventoux.c            |    2 +-
  board/ti/am3517crane/am3517crane.c              |    3 +-
  board/ti/beagle/beagle.c                        |    3 +-
  board/ti/evm/evm.c                              |    3 +-
  board/ti/omap5_evm/evm.c                        |    4 +-
  board/ti/panda/panda.c                          |    3 +-
  board/ti/sdp3430/sdp.c                          |    3 +-
  board/ti/sdp4430/sdp.c                          |    4 +-
  board/timll/devkit8000/devkit8000.c             |    3 +-
  common/cmd_mmc.c                                |    7 +
  drivers/mmc/arm_pl180_mmci.c                    |    1 +
  drivers/mmc/bfin_sdh.c                          |    1 +
  drivers/mmc/davinci_mmc.c                       |    1 +
  drivers/mmc/fsl_esdhc.c                         |    1 +
  drivers/mmc/ftsdc010_esdhc.c                    |    1 +
  drivers/mmc/gen_atmel_mci.c                     |    1 +
  drivers/mmc/mmc.c                               |   17 +++
  drivers/mmc/mmc_spi.c                           |    1 +
  drivers/mmc/mxcmmc.c                            |    1 +
  drivers/mmc/mxsmmc.c                            |    1 +
  drivers/mmc/omap_hsmmc.c                        |   78 +++++++++--
  drivers/mmc/sdhci.c                             |    1 +
  drivers/mmc/sh_mmcif.c                          |    1 +
  drivers/mmc/tegra_mmc.c                         |    1 +
  include/mmc.h                                   |    2 +
  48 files changed, 324 insertions(+), 612 deletions(-)

create mode 100644 arch/arm/include/asm/omap_mmc.h

Signature · 2 lines
Regards,
Nikita.
#13 lore raw

cover omap mmc: implement card detect and write protection

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 71 lines · Nikita Kiryanov

Gentle ping.

Quoted 68 lines · Nikita Kiryanov

This patchset implements card detection and write protection check for omap mmc. The write protect implementation also adds generic code that is usable by other mmc drivers.

The first 3 patches are preparation patches that contain general maintenance for omap mmc driver.

This patchset depends on
http://patchwork.ozlabs.org/patch/202384/

Nikita Kiryanov (7): omap: consolidate common mmc definitions
omap_hsmmc: fix out of bounds array access omap_hsmmc: introduce
omap_hsmmc_data struct omap_hsmmc: implement driver check for
card detection cm-t35: implement board specific card detect check mmc: add support for write protection omap_hsmmc: add driver check for write protection

arch/arm/cpu/armv7/am33xx/board.c               |    4 +- 
arch/arm/cpu/armv7/omap-common/boot-common.c    |    4 +- 
arch/arm/cpu/armv7/omap3/board.c                |    4 +- 
arch/arm/include/asm/arch-am33xx/mmc_host_def.h |  140 
+------------------ 
arch/arm/include/asm/arch-omap3/mmc_host_def.h  |  139 
+------------------ 
arch/arm/include/asm/arch-omap4/mmc_host_def.h  |  140 
+------------------ 
arch/arm/include/asm/arch-omap5/mmc_host_def.h  |  140 
+------------------ arch/arm/include/asm/omap_mmc.h |  168 
+++++++++++++++++++++++ board/cm_t35/cm_t35.c |   13 +- 
board/comelit/dig297/dig297.c                   |    3 +- 
board/corscience/tricorder/tricorder.c          |    2 +- 
board/htkw/mcx/mcx.c                            |    2 +- 
board/isee/igep0020/igep0020.c                  |    3 +- 
board/isee/igep0030/igep0030.c                  |    3 +- 
board/logicpd/am3517evm/am3517evm.c             |    3 +- 
board/logicpd/omap3som/omap3logic.c             |    2 +- 
board/logicpd/zoom1/zoom1.c                     |    3 +- 
board/logicpd/zoom2/zoom2.c                     |    3 +- 
board/matrix_vision/mvblx/mvblx.c               |    4 +- 
board/nokia/rx51/rx51.c                         |    4 +- 
board/overo/overo.c                             |    3 +- 
board/pandora/pandora.c                         |    3 +- 
board/technexion/twister/twister.c              |    2 +- 
board/teejet/mt_ventoux/mt_ventoux.c            |    2 +- 
board/ti/am3517crane/am3517crane.c              |    3 +- 
board/ti/beagle/beagle.c                        |    3 +- 
board/ti/evm/evm.c                              |    3 +- 
board/ti/omap5_evm/evm.c                        |    4 +- 
board/ti/panda/panda.c                          |    3 +- 
board/ti/sdp3430/sdp.c                          |    3 +- 
board/ti/sdp4430/sdp.c                          |    4 +- 
board/timll/devkit8000/devkit8000.c             |    3 +- 
common/cmd_mmc.c                                |    7 + 
drivers/mmc/arm_pl180_mmci.c                    |    1 + 
drivers/mmc/bfin_sdh.c                          |    1 + 
drivers/mmc/davinci_mmc.c                       |    1 + 
drivers/mmc/fsl_esdhc.c                         |    1 + 
drivers/mmc/ftsdc010_esdhc.c                    |    1 + 
drivers/mmc/gen_atmel_mci.c                     |    1 + 
drivers/mmc/mmc.c                               |   17 +++ 
drivers/mmc/mmc_spi.c                           |    1 + 
drivers/mmc/mxcmmc.c                            |    1 + 
drivers/mmc/mxsmmc.c                            |    1 + 
drivers/mmc/omap_hsmmc.c                        |   78 
+++++++++-- drivers/mmc/sdhci.c                             | 1
+ drivers/mmc/sh_mmcif.c                          |    1 + 
drivers/mmc/tegra_mmc.c                         |    1 + 
include/mmc.h                                   |    2 +

Andy, do you want this in your tree or should I put it in u-boot-ti/next? Thanks!

- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQIcBAEBAgAGBQJQ6t8DAAoJENk4IS6UOR1WhdoQAIsFVmLLchgmxJcTkyRT3yTR V6ZLczn/60dYBi9jOTw8kbq1wXyCDay08ZyRHKW6ZbDuKvoSwGPTQD/eN0bsL7lr Q3/xHSHjei9giMSNu68BDmTcaNg34iti8VBJRjmQ+fe6AVw06ighzdZfbNrhCfM7 8QRQgojq03Hdp1evB+Jn6greG7sVKcOeFb9ambRdj1cBfWI+4FEprfJjZHixzXrt 706mqz+S6ePLogLeU3xdBuQmhCB2T40lCfztL00xuy9l5KCaVyMGjc5cGhF8DYYQ K54pOjJQZdI//auyPmY6v353WvAQBzVY1x/tgN2Oq86pMimgH2nVHhIoa04H8e1F 9vd9sKFTxDOn0E073YWeMRSzlpBJ7VYWAK5eN9NcjQd5Gyn3SIf5ZteopQyIEkFc 30uuFeCUFwRsoDBEwG/Hz0VSDbIFiAlVyP6bGqzHOTwUG4B6+dJ2Lg/USL+BQCyp F3y0TGvvBtPXsh8wJ4IwlH7DPISlodn6SWVrnJ1CMbFkHdT74tb0ngLFIW6XFgSX I5fJOgigrQIsyTnBbH78R8vd1MwtEX+/IDHhxSMoFaJXoqvtlRz8uDy6Jz1JEqt3 O7wBDaxM84LGdq8u8Ck5TN4pCl/jAA9eOtbSxZkV0inEHp4fs3Hqy7eQ/O/rWZgf m16uMVVWxsGjCZEJk5Iz
=CDRf
-----END PGP SIGNATURE-----

#14 lore raw

cover omap mmc: implement card detect and write protection

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 13 lines · Tom Rini
Quoted 12 lines · Nikita Kiryanov

Gentle ping.

Quoted 9 lines · Nikita Kiryanov

This patchset implements card detection and write protection check for omap mmc. The write protect implementation also adds generic code that is usable by other mmc drivers.

The first 3 patches are preparation patches that contain general maintenance for omap mmc driver.

This patchset depends on
http://patchwork.ozlabs.org/patch/202384/

[...]

Quoted 3 lines

Andy, do you want this in your tree or should I put it in u-boot-ti/next? Thanks!

Andy, Tom?

- --
Regards,
Igor.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRCiDeAAoJEBDE8YO64EfagmMP/ApwvIUgrbNuHFoZVV1wnD8l 7Vl7ORaqN7Ep9gB8feN43GQ2xMhEFAByFJ0pb1jUXUbAoqkTy7i61XBAAqIMpmgY kPHWKOcArKc7tsbggOgOGKsKMd3T5KgE9+noRujmAFraiVvhmSQAH5Lm8nI9sGId eXv7krIgmDuf/p+S568O1RPKVD/6YItH7RYuniArUplm2v6opjDkc/ZbQM8FSowR OiD5Y5BAMhX8mD30LhUHqJZXcsy3rpZGi6xu3ZrUmllWziTNs/NmCel2Jz7Rw5XM ZG3+xafov4Y/YLwoxz5thgkDsC/3rX0NHkx2wfXiTmR40VXafSX0t03qrN6Zf08u kCL3lWiwuRBsC/92JWKOHvi7U1Qos+t9hwhCdJJ1xeNWiZscWbvg1qNdv1vrrHK/ HQJJBkU40lOI0pg/JBBo70Xwp8TUIJLGf0Y1X71QulN74S+TuINQ6jSncPYTJIsC 7O5kZ6l6jst48KgCm9OH0BYcThexANOBe1x++AbDJjxRHxeLdLujDhz1e+qd+NyV ussFLEMR4Xl+xoH8fcX7+kD9+eCDt0MlEKGJFMtw2LnK0jJtQvT9W6ltXPeD7QMK Fc7EkNrtBzu9lt1dqFBn5yOtt5KcBw8pN4VjnqsGHUkyxOXEiY5BOcJS01ynpOXw kBJAH0MVJVSsFQa8Y5cB
=ABJ2
-----END PGP SIGNATURE-----

#15 lore raw

cover omap mmc: implement card detect and write protection

In reply to Nikita Kiryanov

Hi Andy, Tom,

this patchset is 2 months old.
Can you please address it?

Quoted 69 lines · Nikita Kiryanov

This patchset implements card detection and write protection check for omap mmc. The write protect implementation also adds generic code that is usable by other mmc drivers.

The first 3 patches are preparation patches that contain general maintenance for omap mmc driver.

This patchset depends on http://patchwork.ozlabs.org/patch/202384/

Nikita Kiryanov (7):
omap: consolidate common mmc definitions
omap_hsmmc: fix out of bounds array access
omap_hsmmc: introduce omap_hsmmc_data struct
omap_hsmmc: implement driver check for card detection
cm-t35: implement board specific card detect check
mmc: add support for write protection
omap_hsmmc: add driver check for write protection

  arch/arm/cpu/armv7/am33xx/board.c               |    4 +-
  arch/arm/cpu/armv7/omap-common/boot-common.c    |    4 +-
  arch/arm/cpu/armv7/omap3/board.c                |    4 +-
  arch/arm/include/asm/arch-am33xx/mmc_host_def.h |  140 +------------------
  arch/arm/include/asm/arch-omap3/mmc_host_def.h  |  139 +------------------
  arch/arm/include/asm/arch-omap4/mmc_host_def.h  |  140 +------------------
  arch/arm/include/asm/arch-omap5/mmc_host_def.h  |  140 +------------------
  arch/arm/include/asm/omap_mmc.h                 |  168 +++++++++++++++++++++++
  board/cm_t35/cm_t35.c                           |   13 +-
  board/comelit/dig297/dig297.c                   |    3 +-
  board/corscience/tricorder/tricorder.c          |    2 +-
  board/htkw/mcx/mcx.c                            |    2 +-
  board/isee/igep0020/igep0020.c                  |    3 +-
  board/isee/igep0030/igep0030.c                  |    3 +-
  board/logicpd/am3517evm/am3517evm.c             |    3 +-
  board/logicpd/omap3som/omap3logic.c             |    2 +-
  board/logicpd/zoom1/zoom1.c                     |    3 +-
  board/logicpd/zoom2/zoom2.c                     |    3 +-
  board/matrix_vision/mvblx/mvblx.c               |    4 +-
  board/nokia/rx51/rx51.c                         |    4 +-
  board/overo/overo.c                             |    3 +-
  board/pandora/pandora.c                         |    3 +-
  board/technexion/twister/twister.c              |    2 +-
  board/teejet/mt_ventoux/mt_ventoux.c            |    2 +-
  board/ti/am3517crane/am3517crane.c              |    3 +-
  board/ti/beagle/beagle.c                        |    3 +-
  board/ti/evm/evm.c                              |    3 +-
  board/ti/omap5_evm/evm.c                        |    4 +-
  board/ti/panda/panda.c                          |    3 +-
  board/ti/sdp3430/sdp.c                          |    3 +-
  board/ti/sdp4430/sdp.c                          |    4 +-
  board/timll/devkit8000/devkit8000.c             |    3 +-
  common/cmd_mmc.c                                |    7 +
  drivers/mmc/arm_pl180_mmci.c                    |    1 +
  drivers/mmc/bfin_sdh.c                          |    1 +
  drivers/mmc/davinci_mmc.c                       |    1 +
  drivers/mmc/fsl_esdhc.c                         |    1 +
  drivers/mmc/ftsdc010_esdhc.c                    |    1 +
  drivers/mmc/gen_atmel_mci.c                     |    1 +
  drivers/mmc/mmc.c                               |   17 +++
  drivers/mmc/mmc_spi.c                           |    1 +
  drivers/mmc/mxcmmc.c                            |    1 +
  drivers/mmc/mxsmmc.c                            |    1 +
  drivers/mmc/omap_hsmmc.c                        |   78 +++++++++--
  drivers/mmc/sdhci.c                             |    1 +
  drivers/mmc/sh_mmcif.c                          |    1 +
  drivers/mmc/tegra_mmc.c                         |    1 +
  include/mmc.h                                   |    2 +
  48 files changed, 324 insertions(+), 612 deletions(-)

create mode 100644 arch/arm/include/asm/omap_mmc.h

Signature · 2 lines
Regards,
Nikita.
#16 lore raw

cover omap mmc: implement card detect and write protection

In reply to Nikita Kiryanov
Quoted 60 lines · Nikita Kiryanov

This patchset implements card detection and write protection check for omap mmc. The write protect implementation also adds generic code that is usable by other mmc drivers.

The first 3 patches are preparation patches that contain general maintenance for omap mmc driver.

This patchset depends on http://patchwork.ozlabs.org/patch/202384/

Nikita Kiryanov (7):
omap: consolidate common mmc definitions
omap_hsmmc: fix out of bounds array access
omap_hsmmc: introduce omap_hsmmc_data struct
omap_hsmmc: implement driver check for card detection
cm-t35: implement board specific card detect check
mmc: add support for write protection
omap_hsmmc: add driver check for write protection

 arch/arm/cpu/armv7/am33xx/board.c               |    4 +-
 arch/arm/cpu/armv7/omap-common/boot-common.c    |    4 +-
 arch/arm/cpu/armv7/omap3/board.c                |    4 +-
 arch/arm/include/asm/arch-am33xx/mmc_host_def.h |  140 +------------------
 arch/arm/include/asm/arch-omap3/mmc_host_def.h  |  139 +------------------
 arch/arm/include/asm/arch-omap4/mmc_host_def.h  |  140 +------------------
 arch/arm/include/asm/arch-omap5/mmc_host_def.h  |  140 +------------------
 arch/arm/include/asm/omap_mmc.h                 |  168 +++++++++++++++++++++++
 board/cm_t35/cm_t35.c                           |   13 +-
 board/comelit/dig297/dig297.c                   |    3 +-
 board/corscience/tricorder/tricorder.c          |    2 +-
 board/htkw/mcx/mcx.c                            |    2 +-
 board/isee/igep0020/igep0020.c                  |    3 +-
 board/isee/igep0030/igep0030.c                  |    3 +-
 board/logicpd/am3517evm/am3517evm.c             |    3 +-
 board/logicpd/omap3som/omap3logic.c             |    2 +-
 board/logicpd/zoom1/zoom1.c                     |    3 +-
 board/logicpd/zoom2/zoom2.c                     |    3 +-
 board/matrix_vision/mvblx/mvblx.c               |    4 +-
 board/nokia/rx51/rx51.c                         |    4 +-
 board/overo/overo.c                             |    3 +-
 board/pandora/pandora.c                         |    3 +-
 board/technexion/twister/twister.c              |    2 +-
 board/teejet/mt_ventoux/mt_ventoux.c            |    2 +-
 board/ti/am3517crane/am3517crane.c              |    3 +-
 board/ti/beagle/beagle.c                        |    3 +-
 board/ti/evm/evm.c                              |    3 +-
 board/ti/omap5_evm/evm.c                        |    4 +-
 board/ti/panda/panda.c                          |    3 +-
 board/ti/sdp3430/sdp.c                          |    3 +-
 board/ti/sdp4430/sdp.c                          |    4 +-
 board/timll/devkit8000/devkit8000.c             |    3 +-
 common/cmd_mmc.c                                |    7 +
 drivers/mmc/arm_pl180_mmci.c                    |    1 +
 drivers/mmc/bfin_sdh.c                          |    1 +
 drivers/mmc/davinci_mmc.c                       |    1 +
 drivers/mmc/fsl_esdhc.c                         |    1 +
 drivers/mmc/ftsdc010_esdhc.c                    |    1 +
 drivers/mmc/gen_atmel_mci.c                     |    1 +
 drivers/mmc/mmc.c                               |   17 +++
 drivers/mmc/mmc_spi.c                           |    1 +
 drivers/mmc/mxcmmc.c                            |    1 +
Quoted 8 lines
 drivers/mmc/mxsmmc.c                            |    1 +
 drivers/mmc/omap_hsmmc.c                        |   78 +++++++++--
 drivers/mmc/sdhci.c                             |    1 +
 drivers/mmc/sh_mmcif.c                          |    1 +
 drivers/mmc/tegra_mmc.c                         |    1 +
 include/mmc.h                                   |    2 +
 48 files changed, 324 insertions(+), 612 deletions(-)
 create mode 100644 arch/arm/include/asm/omap_mmc.h

For the series:

Andy, since this touches generic code to add the write-protect stuff, which looks fine to me, I'd really like a chime-in before I take this to u-boot-ti, or you pick it all up for u-boot-mmc. Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130215/e1513657/attachment.pgp>
#17 lore raw

cover omap mmc: implement card detect and write protection

Hi Tom,

Quoted 19 lines · Tom Rini
Quoted 17 lines · Nikita Kiryanov

This patchset implements card detection and write protection check for omap mmc. The write protect implementation also adds generic code that is usable by other mmc drivers.

The first 3 patches are preparation patches that contain general maintenance for omap mmc driver.

This patchset depends on http://patchwork.ozlabs.org/patch/202384/

Nikita Kiryanov (7):
omap: consolidate common mmc definitions
omap_hsmmc: fix out of bounds array access
omap_hsmmc: introduce omap_hsmmc_data struct
omap_hsmmc: implement driver check for card detection
cm-t35: implement board specific card detect check
mmc: add support for write protection
omap_hsmmc: add driver check for write protection

[...]

Quoted 9 lines

For the series:

Andy, since this touches generic code to add the write-protect stuff, which looks fine to me, I'd really like a chime-in before I take this to u-boot-ti, or you pick it all up for u-boot-mmc. Thanks!

Now that rc1 is out, perhaps it is time to finally apply this series? Andy doesn't seem to be involved much in U-Boot these days, I don't think we should wait for him anymore.

Signature · 2 lines
Regards,
Nikita.
#18 lore raw

cover omap mmc: implement card detect and write protection

In reply to Nikita Kiryanov

Hi guys,

This patch set is "floating" already for _three_ months. All comments were addressed, it introduces negative diff stat, and provides two useful features (also for production automation).

Andy hasn't been responding for quite a while. I think this patch set is good enough for merging. There is no reason for it to float any longer.

Please, merge it either via Tom's tree or anyone else's staging.

Thanks!

Quoted 69 lines · Nikita Kiryanov

This patchset implements card detection and write protection check for omap mmc. The write protect implementation also adds generic code that is usable by other mmc drivers.

The first 3 patches are preparation patches that contain general maintenance for omap mmc driver.

This patchset depends on http://patchwork.ozlabs.org/patch/202384/

Nikita Kiryanov (7):
omap: consolidate common mmc definitions
omap_hsmmc: fix out of bounds array access
omap_hsmmc: introduce omap_hsmmc_data struct
omap_hsmmc: implement driver check for card detection
cm-t35: implement board specific card detect check
mmc: add support for write protection
omap_hsmmc: add driver check for write protection

 arch/arm/cpu/armv7/am33xx/board.c               |    4 +-
 arch/arm/cpu/armv7/omap-common/boot-common.c    |    4 +-
 arch/arm/cpu/armv7/omap3/board.c                |    4 +-
 arch/arm/include/asm/arch-am33xx/mmc_host_def.h |  140 +------------------
 arch/arm/include/asm/arch-omap3/mmc_host_def.h  |  139 +------------------
 arch/arm/include/asm/arch-omap4/mmc_host_def.h  |  140 +------------------
 arch/arm/include/asm/arch-omap5/mmc_host_def.h  |  140 +------------------
 arch/arm/include/asm/omap_mmc.h                 |  168 +++++++++++++++++++++++
 board/cm_t35/cm_t35.c                           |   13 +-
 board/comelit/dig297/dig297.c                   |    3 +-
 board/corscience/tricorder/tricorder.c          |    2 +-
 board/htkw/mcx/mcx.c                            |    2 +-
 board/isee/igep0020/igep0020.c                  |    3 +-
 board/isee/igep0030/igep0030.c                  |    3 +-
 board/logicpd/am3517evm/am3517evm.c             |    3 +-
 board/logicpd/omap3som/omap3logic.c             |    2 +-
 board/logicpd/zoom1/zoom1.c                     |    3 +-
 board/logicpd/zoom2/zoom2.c                     |    3 +-
 board/matrix_vision/mvblx/mvblx.c               |    4 +-
 board/nokia/rx51/rx51.c                         |    4 +-
 board/overo/overo.c                             |    3 +-
 board/pandora/pandora.c                         |    3 +-
 board/technexion/twister/twister.c              |    2 +-
 board/teejet/mt_ventoux/mt_ventoux.c            |    2 +-
 board/ti/am3517crane/am3517crane.c              |    3 +-
 board/ti/beagle/beagle.c                        |    3 +-
 board/ti/evm/evm.c                              |    3 +-
 board/ti/omap5_evm/evm.c                        |    4 +-
 board/ti/panda/panda.c                          |    3 +-
 board/ti/sdp3430/sdp.c                          |    3 +-
 board/ti/sdp4430/sdp.c                          |    4 +-
 board/timll/devkit8000/devkit8000.c             |    3 +-
 common/cmd_mmc.c                                |    7 +
 drivers/mmc/arm_pl180_mmci.c                    |    1 +
 drivers/mmc/bfin_sdh.c                          |    1 +
 drivers/mmc/davinci_mmc.c                       |    1 +
 drivers/mmc/fsl_esdhc.c                         |    1 +
 drivers/mmc/ftsdc010_esdhc.c                    |    1 +
 drivers/mmc/gen_atmel_mci.c                     |    1 +
 drivers/mmc/mmc.c                               |   17 +++
 drivers/mmc/mmc_spi.c                           |    1 +
 drivers/mmc/mxcmmc.c                            |    1 +
 drivers/mmc/mxsmmc.c                            |    1 +
 drivers/mmc/omap_hsmmc.c                        |   78 +++++++++--
 drivers/mmc/sdhci.c                             |    1 +
 drivers/mmc/sh_mmcif.c                          |    1 +
 drivers/mmc/tegra_mmc.c                         |    1 +
 include/mmc.h                                   |    2 +
 48 files changed, 324 insertions(+), 612 deletions(-)
 create mode 100644 arch/arm/include/asm/omap_mmc.h
Signature · 2 lines
Regards,
Igor.
#19 lore raw

cover omap mmc: implement card detect and write protection

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 11 lines · Igor Grinberg

Hi guys,

This patch set is "floating" already for _three_ months. All comments were addressed, it introduces negative diff stat, and provides two useful features (also for production automation).

Andy hasn't been responding for quite a while. I think this patch set is good enough for merging. There is no reason for it to float any longer.

Please, merge it either via Tom's tree or anyone else's staging.

I grabbed this locally yesterday and the only issue is that there's new boards that need their mmc calls updated. I should have this merged soon.

- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJROyikAAoJENk4IS6UOR1WSC8P/2SNB6v96Cmbw+hwpNl3iJSa stk2r7pxOUBvMJR7ZMzjVz53DUn8OvKbc+0eaPR12VwHGY/i9GuOqHfcu31dx1q5 Hq4W5J+MS97czVK/6S5FcbDLFr8araBHM8AZwQNz1DqQVoswLA6bHKepNdzXzp+q X04K0dNP4TbikazytLiStLiGcS58VORVKIrT7coWjapIOO9+bcKhCq4XgsuGOluy YGIbn0s3kewoDxCbdpDQIu5QBpbNv13wTYWqRFVlaf5x+sBvUxtSTPPHNjl8I6c8 O3acMI+5AGpsNyQrRqRCbpZ3ce9NZw2/7ORS0GOLyWF/TAH0qv7+W8OuK8L+YtHm 8ivqSypSA33A0dneC0U3wu72lkBRWmA8tXjWifyNh0bKfL+5eKo37ZT3RL2sCmsl n8aNXIwnMHEOXt+g9afU4g0EgD4EfJY3CF0sJcB8VuxDttkFYs/nVIwNRdg0Ivq3 xHEdPrgbBZsBbpbpjaxX6gatz8zdBl77ky4roCc9OQ5xJpQmO7lab5wAJK8Un5vl ywGZa5akE7IHTrgpOlDKANe8PUsfSR8YnRkzov2rUuoXnxiT/avtWQuQXch2nmbR Als1LbNapRwevslrGFUpcbQwOefXOIlaX+ise6Jelky44/udoxCPFxkPPjXgqSRU Kw9IGLWgup5EylWGHitM
=JIxn
-----END PGP SIGNATURE-----