X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Flpd7a40x%2Fflash.c;h=d18720e5b20d2a6c6b81f57b54cbee41e2dd4dd4;hb=d52fb7e3d135704334bd6f97f3444e824665b76f;hp=26a9ce45702251d19d954b2fca7d63eaa95a2ffb;hpb=f39748ae8edb03017647b0d731cdd06e7bdcde13;p=u-boot diff --git a/board/lpd7a40x/flash.c b/board/lpd7a40x/flash.c index 26a9ce4570..d18720e5b2 100644 --- a/board/lpd7a40x/flash.c +++ b/board/lpd7a40x/flash.c @@ -284,25 +284,20 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) sect, info->start[sect]); /* arm simple, non interrupt dependent timer */ - reset_timer(); + reset_timer_masked(); if (info->protect[sect] == 0) { /* not protected */ vu_long *addr = (vu_long *) (info->start[sect]); ulong bsR7, bsR7_2, bsR5, bsR5_2; - ulong tstart; /* *addr = CMD_STATUS_RESET; */ *addr = CMD_ERASE_SETUP; *addr = CMD_ERASE_CONFIRM; /* wait until flash is ready */ - tstart = get_timer(0); do { - ulong now; /* check timeout */ - //if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) { - if ((now = get_timer(tstart)) > CFG_FLASH_ERASE_TOUT) { - printf("tstart = 0x%08lx, now = 0x%08lx\n", tstart, now); + if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) { *addr = CMD_STATUS_RESET; result = BIT_TIMEOUT; break; @@ -356,8 +351,7 @@ outahere: * Copy memory to flash */ -volatile static int write_word (flash_info_t * info, ulong dest, - ulong data) +static int write_word (flash_info_t * info, ulong dest, ulong data) { vu_long *addr = (vu_long *) dest; ulong result;