diff options
author | Graeme Russ <graeme.russ@gmail.com> | 2009-08-23 12:59:56 +1000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-09-04 21:56:45 +0200 |
commit | ed7a1b681de1e31d18d5b92e2767ae8df3241687 (patch) | |
tree | 9ff41a5e184dd262ff56c52a5274f513a380e8e2 /board/sc520_cdp/flash.c | |
parent | 9b32f96b5b92ba13fdb4b5eb637734752235f260 (diff) | |
download | u-boot-imx-ed7a1b681de1e31d18d5b92e2767ae8df3241687.zip u-boot-imx-ed7a1b681de1e31d18d5b92e2767ae8df3241687.tar.gz u-boot-imx-ed7a1b681de1e31d18d5b92e2767ae8df3241687.tar.bz2 |
i386: Replace [read, write]_mmcr_[byte, word, long] with memory mapped structure
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'board/sc520_cdp/flash.c')
-rw-r--r-- | board/sc520_cdp/flash.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/board/sc520_cdp/flash.c b/board/sc520_cdp/flash.c index dcb8c57..64831b7 100644 --- a/board/sc520_cdp/flash.c +++ b/board/sc520_cdp/flash.c @@ -337,12 +337,12 @@ done: ; unsigned micro; \ unsigned milli=0; \ \ - micro = *(volatile u16*)(0xfffef000+SC520_SWTMRMILLI); \ + micro = sc520_mmcr->swtmrmilli; \ \ for (;;) { \ \ - milli += *(volatile u16*)(0xfffef000+SC520_SWTMRMILLI); \ - micro = *(volatile u16*)(0xfffef000+SC520_SWTMRMICRO); \ + milli += sc520_mmcr->swtmrmilli; \ + micro = sc520_mmcr->swtmrmicro; \ \ if ((delay) <= (micro + (milli * 1000))) { \ break; \ @@ -364,12 +364,12 @@ static u32 _amd_erase_flash(u32 addr, u32 sector) /* Sector erase command comes last */ *(volatile u32*)(addr + sector) = 0x30303030; - elapsed = *(volatile u16*)(0xfffef000+SC520_SWTMRMILLI); /* dummy read */ + elapsed = sc520_mmcr->swtmrmilli; /* dummy read */ elapsed = 0; __udelay(50); while (((*(volatile u32*)(addr + sector)) & 0x80808080) != 0x80808080) { - elapsed += *(volatile u16*)(0xfffef000+SC520_SWTMRMILLI); + elapsed += sc520_mmcr->swtmrmilli; if (elapsed > ((CONFIG_SYS_FLASH_ERASE_TOUT/CONFIG_SYS_HZ) * 1000)) { *(volatile u32*)(addr) = 0xf0f0f0f0; return 1; @@ -487,12 +487,12 @@ static int _amd_write_word(unsigned start, unsigned dest, unsigned data) dest2[0] = data; - elapsed = *(volatile u16*)(0xfffef000+SC520_SWTMRMILLI); /* dummy read */ + elapsed = sc520_mmcr->swtmrmilli; /* dummy read */ elapsed = 0; /* data polling for D7 */ while ((dest2[0] & 0x80808080) != (data2[0] & 0x80808080)) { - elapsed += *(volatile u16*)(0xfffef000+SC520_SWTMRMILLI); + elapsed += sc520_mmcr->swtmrmilli; if (elapsed > ((CONFIG_SYS_FLASH_WRITE_TOUT/CONFIG_SYS_HZ) * 1000)) { addr2[0] = 0xf0f0f0f0; return 1; |