* [U-Boot] [PATCH] mmc: set correct block size value in bfin sdh driver
@ 2014-08-06 10:14 Sonic Zhang
2014-08-12 10:43 ` Sonic Zhang
2014-10-02 9:57 ` Pantelis Antoniou
0 siblings, 2 replies; 3+ messages in thread
From: Sonic Zhang @ 2014-08-06 10:14 UTC (permalink / raw)
To: u-boot
From: Sonic Zhang <sonic.zhang@analog.com>
Wait data transfer till the data end bit other than the data block end
bit is set.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
---
drivers/mmc/bfin_sdh.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/bfin_sdh.c b/drivers/mmc/bfin_sdh.c
index bcd6a3e..9bdfbbc 100644
--- a/drivers/mmc/bfin_sdh.c
+++ b/drivers/mmc/bfin_sdh.c
@@ -138,9 +138,9 @@ static int sdh_setup_data(struct mmc *mmc, struct mmc_data *data)
if (data->flags & MMC_DATA_WRITE)
return UNUSABLE_ERR;
#ifndef RSI_BLKSZ
- data_ctl |= ((ffs(data_size) - 1) << 4);
+ data_ctl |= ((ffs(data->blocksize) - 1) << 4);
#else
- bfin_write_SDH_BLK_SIZE(data_size);
+ bfin_write_SDH_BLK_SIZE(data->blocksize);
#endif
data_ctl |= DTX_DIR;
bfin_write_SDH_DATA_CTL(data_ctl);
@@ -189,7 +189,8 @@ static int bfin_sdh_request(struct mmc *mmc, struct mmc_cmd *cmd,
do {
udelay(1);
status = bfin_read_SDH_STATUS();
- } while (!(status & (DAT_BLK_END | DAT_END | DAT_TIME_OUT | DAT_CRC_FAIL | RX_OVERRUN)));
+ } while (!(status & (DAT_END | DAT_TIME_OUT | DAT_CRC_FAIL |
+ RX_OVERRUN)));
if (status & DAT_TIME_OUT) {
bfin_write_SDH_STATUS_CLR(DAT_TIMEOUT_STAT);
--
1.8.2.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] mmc: set correct block size value in bfin sdh driver
2014-08-06 10:14 [U-Boot] [PATCH] mmc: set correct block size value in bfin sdh driver Sonic Zhang
@ 2014-08-12 10:43 ` Sonic Zhang
2014-10-02 9:57 ` Pantelis Antoniou
1 sibling, 0 replies; 3+ messages in thread
From: Sonic Zhang @ 2014-08-12 10:43 UTC (permalink / raw)
To: u-boot
PING
On Wed, Aug 6, 2014 at 6:14 PM, Sonic Zhang <sonic.adi@gmail.com> wrote:
> From: Sonic Zhang <sonic.zhang@analog.com>
>
> Wait data transfer till the data end bit other than the data block end
> bit is set.
>
> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
> ---
>
> drivers/mmc/bfin_sdh.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/bfin_sdh.c b/drivers/mmc/bfin_sdh.c
> index bcd6a3e..9bdfbbc 100644
> --- a/drivers/mmc/bfin_sdh.c
> +++ b/drivers/mmc/bfin_sdh.c
> @@ -138,9 +138,9 @@ static int sdh_setup_data(struct mmc *mmc, struct mmc_data *data)
> if (data->flags & MMC_DATA_WRITE)
> return UNUSABLE_ERR;
> #ifndef RSI_BLKSZ
> - data_ctl |= ((ffs(data_size) - 1) << 4);
> + data_ctl |= ((ffs(data->blocksize) - 1) << 4);
> #else
> - bfin_write_SDH_BLK_SIZE(data_size);
> + bfin_write_SDH_BLK_SIZE(data->blocksize);
> #endif
> data_ctl |= DTX_DIR;
> bfin_write_SDH_DATA_CTL(data_ctl);
> @@ -189,7 +189,8 @@ static int bfin_sdh_request(struct mmc *mmc, struct mmc_cmd *cmd,
> do {
> udelay(1);
> status = bfin_read_SDH_STATUS();
> - } while (!(status & (DAT_BLK_END | DAT_END | DAT_TIME_OUT | DAT_CRC_FAIL | RX_OVERRUN)));
> + } while (!(status & (DAT_END | DAT_TIME_OUT | DAT_CRC_FAIL |
> + RX_OVERRUN)));
>
> if (status & DAT_TIME_OUT) {
> bfin_write_SDH_STATUS_CLR(DAT_TIMEOUT_STAT);
> --
> 1.8.2.3
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] mmc: set correct block size value in bfin sdh driver
2014-08-06 10:14 [U-Boot] [PATCH] mmc: set correct block size value in bfin sdh driver Sonic Zhang
2014-08-12 10:43 ` Sonic Zhang
@ 2014-10-02 9:57 ` Pantelis Antoniou
1 sibling, 0 replies; 3+ messages in thread
From: Pantelis Antoniou @ 2014-10-02 9:57 UTC (permalink / raw)
To: u-boot
Hi Sonic,
On Aug 6, 2014, at 1:14 PM, Sonic Zhang <sonic.adi@gmail.com> wrote:
> From: Sonic Zhang <sonic.zhang@analog.com>
>
> Wait data transfer till the data end bit other than the data block end
> bit is set.
>
> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
> ---
>
> drivers/mmc/bfin_sdh.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/bfin_sdh.c b/drivers/mmc/bfin_sdh.c
> index bcd6a3e..9bdfbbc 100644
> --- a/drivers/mmc/bfin_sdh.c
> +++ b/drivers/mmc/bfin_sdh.c
> @@ -138,9 +138,9 @@ static int sdh_setup_data(struct mmc *mmc, struct mmc_data *data)
> if (data->flags & MMC_DATA_WRITE)
> return UNUSABLE_ERR;
> #ifndef RSI_BLKSZ
> - data_ctl |= ((ffs(data_size) - 1) << 4);
> + data_ctl |= ((ffs(data->blocksize) - 1) << 4);
> #else
> - bfin_write_SDH_BLK_SIZE(data_size);
> + bfin_write_SDH_BLK_SIZE(data->blocksize);
> #endif
> data_ctl |= DTX_DIR;
> bfin_write_SDH_DATA_CTL(data_ctl);
> @@ -189,7 +189,8 @@ static int bfin_sdh_request(struct mmc *mmc, struct mmc_cmd *cmd,
> do {
> udelay(1);
> status = bfin_read_SDH_STATUS();
> - } while (!(status & (DAT_BLK_END | DAT_END | DAT_TIME_OUT | DAT_CRC_FAIL | RX_OVERRUN)));
> + } while (!(status & (DAT_END | DAT_TIME_OUT | DAT_CRC_FAIL |
> + RX_OVERRUN)));
>
> if (status & DAT_TIME_OUT) {
> bfin_write_SDH_STATUS_CLR(DAT_TIMEOUT_STAT);
> --
> 1.8.2.3
>
Applied, thanks.
? Pantelis
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-02 9:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-06 10:14 [U-Boot] [PATCH] mmc: set correct block size value in bfin sdh driver Sonic Zhang
2014-08-12 10:43 ` Sonic Zhang
2014-10-02 9:57 ` Pantelis Antoniou
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.