From bbb96acc15c4ff518d62ecb1caa11de6cc6e6c83 Mon Sep 17 00:00:00 2001 From: Troy Kisky <troy.kisky@boundarydevices.com> Date: Fri, 28 Aug 2015 10:26:33 -0700 Subject: [PATCH] fsl_esdhc: skip write protect check if register bit is not valid --- drivers/mmc/fsl_esdhc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index f722919fee0..c065a289a28 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -290,6 +290,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, #endif if (wml_value > WML_WR_WML_MAX) wml_value = WML_WR_WML_MAX_VAL; +#ifndef CONFIG_SYS_FSL_ESDH_GPIO_WP if (priv->wp_enable) { if ((esdhc_read32(®s->prsstat) & PRSSTAT_WPSPL) == 0) { @@ -297,7 +298,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, return -ETIMEDOUT; } } - +#endif esdhc_clrsetbits32(®s->wml, WML_WR_WML_MASK, wml_value << 16); #ifndef CONFIG_SYS_FSL_ESDHC_USE_PIO -- GitLab