diff options
author | Roy Zang <tie-fei.zang@freescale.com> | 2010-02-09 18:23:33 +0800 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2010-04-07 00:01:11 -0500 |
commit | ab467c512e79dbd14f02352655f054a4304c457e (patch) | |
tree | ee85e5d76d5884ff6c8c2d816c706c787c86c119 /drivers/mmc/fsl_esdhc.c | |
parent | 48bb3bb5ac4dd21e931ae157caad6449bcb2d0d4 (diff) | |
download | u-boot-imx-ab467c512e79dbd14f02352655f054a4304c457e.zip u-boot-imx-ab467c512e79dbd14f02352655f054a4304c457e.tar.gz u-boot-imx-ab467c512e79dbd14f02352655f054a4304c457e.tar.bz2 |
fsl_esdhc: Only modify the field we are changing in WML
When we set the read or write watermark in WML we should maintain the
rest of the register as is, rather than using some hard coded value.
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'drivers/mmc/fsl_esdhc.c')
-rw-r--r-- | drivers/mmc/fsl_esdhc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 999b581..0f6f8b1 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -110,8 +110,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data) if (wml_value > 0x10) wml_value = 0x10; - wml_value = 0x100000 | wml_value; - + esdhc_clrsetbits32(®s->wml, WML_RD_WML_MASK, wml_value); esdhc_write32(®s->dsaddr, (u32)data->dest); } else { if (wml_value > 0x80) @@ -120,12 +119,12 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data) printf("\nThe SD card is locked. Can not write to a locked card.\n\n"); return TIMEOUT; } - wml_value = wml_value << 16 | 0x10; + + esdhc_clrsetbits32(®s->wml, WML_WR_WML_MASK, + wml_value << 16); esdhc_write32(®s->dsaddr, (u32)data->src); } - esdhc_write32(®s->wml, wml_value); - esdhc_write32(®s->blkattr, data->blocks << 16 | data->blocksize); /* Calculate the timeout period for data transactions */ |