[U-Boot] [PATCH v1 02/10] mmc: atmel: when sending a data command, use the provided block size

Jaehoon Chung
2017-12-26T10:14:39Z

On 12/21/2017 08:53 PM, Jean-Jacques Hiblot wrote:
> struct mmc_data contains the block size to use for the data transfer.
> Use this information instead of relying on read_bl_len and write_bl_len
> stored in the mmc structure.
>
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> ---
>
> drivers/mmc/gen_atmel_mci.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c
> index 22154d1..54646e4 100644
> --- a/drivers/mmc/gen_atmel_mci.c
> +++ b/drivers/mmc/gen_atmel_mci.c
> @@ -301,13 +301,12 @@ mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
>
> if (data->flags & MMC_DATA_READ) {
> mci_data_op = mci_data_read;
> - sys_blocksize = mmc->read_bl_len;
> ioptr = (u32*)data->dest;
> } else {
> mci_data_op = mci_data_write;
> - sys_blocksize = mmc->write_bl_len;
> ioptr = (u32*)data->src;
> }
> + sys_blocksize = data->blocksize;

Then can use data->blocksize instead of sys_blocksize.?

>
> status = 0;
> for (block_count = 0;
>