summaryrefslogtreecommitdiff
path: root/board/freescale/m5253demo/flash.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-08-04 16:53:39 -0400
committerTom Rini <trini@konsulko.com>2022-08-04 16:54:01 -0400
commitb8e09898919e23c5d7f1934be7bf9a3a6f0deb0e (patch)
treeba1c168b729947aec2a487791e5a26ce72da4282 /board/freescale/m5253demo/flash.c
parent62e6418031bed3671e57e63d49273e2739a82589 (diff)
parent78475d2572615471d3c047e61481a68859d0dd7f (diff)
Merge branch '2022-08-04-Kconfig-migrations'
- Further migrations to Kconfig and associated dead code removal.
Diffstat (limited to 'board/freescale/m5253demo/flash.c')
-rw-r--r--board/freescale/m5253demo/flash.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c
index 31974217816..bff1ac5fb11 100644
--- a/board/freescale/m5253demo/flash.c
+++ b/board/freescale/m5253demo/flash.c
@@ -242,7 +242,8 @@ int flash_erase(flash_info_t * info, int s_first, int s_last)
count = 0;
}
- if (get_timer(start) > CONFIG_SYS_FLASH_ERASE_TOUT) {
+ /* check timeout, 1000ms */
+ if (get_timer(start) > 1000) {
printf("Timeout\n");
*addr = 0x00F0; /* reset to read mode */
@@ -294,8 +295,8 @@ int flash_erase(flash_info_t * info, int s_first, int s_last)
enable_interrupts();
while ((*addr & 0x0080) != 0x0080) {
- if (get_timer(start) >
- CONFIG_SYS_FLASH_ERASE_TOUT) {
+ /* check timeout, 1000ms */
+ if (get_timer(start) > 1000) {
printf("Timeout\n");
*addr = 0x00F0; /* reset to read mode */
@@ -430,7 +431,8 @@ int write_word(flash_info_t * info, FPWV * dest, u16 data)
/* data polling for D7 */
while (res == 0
&& (*dest & (u8) 0x00800080) != (data & (u8) 0x00800080)) {
- if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
+ /* check timeout, 500ms */
+ if (get_timer(start) > 500) {
*dest = (u8) 0x00F000F0; /* reset bank */
res = 1;
}