diff options
author | wdenk <wdenk> | 2004-08-28 21:09:14 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2004-08-28 21:09:14 +0000 |
commit | 31a649234ee4051e96cf45285cdf2dbfa668d30c (patch) | |
tree | b5f30d8b26974d60fee1ab69f2edb9876d7a0622 /board | |
parent | 89394047ba438f70f40ebc89b812824b01fec663 (diff) | |
download | u-boot-imx-31a649234ee4051e96cf45285cdf2dbfa668d30c.zip u-boot-imx-31a649234ee4051e96cf45285cdf2dbfa668d30c.tar.gz u-boot-imx-31a649234ee4051e96cf45285cdf2dbfa668d30c.tar.bz2 |
* Add automatic update support for LWMON board
* Enable MSDOS/VFAT filesystem support for LWMON board
* Clear Block Lock-Bits when erasing flash on LWMON board.
* Fix return code of "fatload" command
* Disable debugging for TQM5200 board
Diffstat (limited to 'board')
-rw-r--r-- | board/lwmon/flash.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/board/lwmon/flash.c b/board/lwmon/flash.c index 4004865..b894887 100644 --- a/board/lwmon/flash.c +++ b/board/lwmon/flash.c @@ -403,6 +403,26 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) /* Disable interrupts which might cause a timeout here */ flag = disable_interrupts(); + *addr = 0x00600060; /* clear lock bit setup */ + *addr = 0x00D000D0; /* clear lock bit confirm */ + + udelay (1000); + /* This takes awfully long - up to 50 ms and more */ + while (((status = *addr) & 0x00800080) != 0x00800080) { + if ((now=get_timer(start)) > CFG_FLASH_ERASE_TOUT) { + printf ("Timeout\n"); + *addr = 0x00FF00FF; /* reset to read mode */ + return 1; + } + + /* show that we're waiting */ + if ((now - last) > 1000) { /* every second */ + putc ('.'); + last = now; + } + udelay (1000); /* to trigger the watchdog */ + } + *addr = 0x00500050; /* clear status register */ *addr = 0x00200020; /* erase setup */ *addr = 0x00D000D0; /* erase confirm */ @@ -427,6 +447,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) putc ('.'); last = now; } + udelay (1000); /* to trigger the watchdog */ } *addr = 0x00FF00FF; /* reset to read mode */ |