[U-Boot] [PATCH 12/13] i.MX28: Check if WP detection is implemented at all
Stefano Babic
sbabic at denx.de
Wed May 9 12:35:04 CEST 2012
On 01/05/2012 23:09, Marek Vasut wrote:
> If the WP function is NULL, simply assume the card is always RW.
>
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Stefano Babic <sbabic at denx.de>
> Cc: Wolfgang Denk <wd at denx.de>
> Cc: Detlev Zundel <dzu at denx.de>
> Cc: Fabio Estevam <fabio.estevam at freescale.com>
> ---
> drivers/mmc/mxsmmc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c
> index 35c6bda..c7200ee 100644
> --- a/drivers/mmc/mxsmmc.c
> +++ b/drivers/mmc/mxsmmc.c
> @@ -133,7 +133,8 @@ mxsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
> /* READ or WRITE */
> if (data->flags & MMC_DATA_READ) {
> ctrl0 |= SSP_CTRL0_READ;
> - } else if (priv->mmc_is_wp(mmc->block_dev.dev)) {
> + } else if (priv->mmc_is_wp &&
> + priv->mmc_is_wp(mmc->block_dev.dev)) {
> printf("MMC%d: Can not write a locked card!\n",
> mmc->block_dev.dev);
> return UNUSABLE_ERR;
This is clearly a bug fix, thanks.
Acked-by: Stefano Babic <sbabic at denx.de>
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list