[U-Boot] [PATCH 1/3][v3] mmc: checking status after commands with R1b response

Hebbar, Gururaja gururaja.hebbar at ti.com
Fri Mar 11 09:57:14 CET 2011


Hi,

On Fri, Mar 11, 2011 at 14:08:14, Raffaele Recalcati wrote:
> From: Raffaele Recalcati <raffaele.recalcati at bticino.it>
> 
[...]
[...]
> @@ -48,6 +48,36 @@ int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
>  	return mmc->send_cmd(mmc, cmd, data);
>  }
>  
> +int mmc_send_status(struct mmc *mmc, int timeout)
> +{
> +	struct mmc_cmd cmd;

[...]
[...]

> +	do {
> +		err = mmc_send_cmd(mmc, &cmd, NULL);
> +			break;

Why this break


> +		if (err)
> +			return err;
> +		else if (cmd.response[0] & MMC_STATUS_RDY_FOR_DATA)
> +			break;

[...]
[...]

Regards, 
Gururaja


More information about the U-Boot mailing list