i.MX28: Check if WP detection is implemented at all
If the WP function is NULL, simply assume the card is always RW. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
This commit is contained in:
parent
7dec1bd11f
commit
c7527b70f9
@ -133,7 +133,8 @@ mxsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
|
|||||||
/* READ or WRITE */
|
/* READ or WRITE */
|
||||||
if (data->flags & MMC_DATA_READ) {
|
if (data->flags & MMC_DATA_READ) {
|
||||||
ctrl0 |= SSP_CTRL0_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",
|
printf("MMC%d: Can not write a locked card!\n",
|
||||||
mmc->block_dev.dev);
|
mmc->block_dev.dev);
|
||||||
return UNUSABLE_ERR;
|
return UNUSABLE_ERR;
|
||||||
|
Loading…
Reference in New Issue
Block a user