diff mbox series

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

Message ID 1513857247-15821-3-git-send-email-jjhiblot@ti.com
State Superseded
Delegated to: Jaehoon Chung
Headers show
Series reduce the size of the mmc core | expand

Commit Message

Jean-Jacques Hiblot Dec. 21, 2017, 11:53 a.m. UTC
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(-)

Comments

Jaehoon Chung Dec. 26, 2017, 10:14 a.m. UTC | #1
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;
>
diff mbox series

Patch

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;
 
 		status = 0;
 		for (block_count = 0;