diff options
Diffstat (limited to 'drivers/nor/cfi_flash_amd.c')
-rw-r--r-- | drivers/nor/cfi_flash_amd.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/nor/cfi_flash_amd.c b/drivers/nor/cfi_flash_amd.c index b92836b059..4f0ab5722f 100644 --- a/drivers/nor/cfi_flash_amd.c +++ b/drivers/nor/cfi_flash_amd.c @@ -1,6 +1,6 @@ #include <common.h> #include <stdio.h> -#include <cfi_flash_new.h> +#include "cfi_flash.h" static void flash_unlock_seq (flash_info_t * info, flash_sect_t sect) { @@ -73,20 +73,13 @@ static int amd_flash_is_busy (flash_info_t * info, flash_sect_t sect) static int amd_flash_erase_one (flash_info_t * info, long sect) { - int rcode = 0; - flash_unlock_seq (info, sect); flash_write_cmd (info, sect, AMD_ADDR_ERASE_START, AMD_CMD_ERASE_START); flash_unlock_seq (info, sect); flash_write_cmd (info, sect, 0, AMD_CMD_ERASE_SECTOR); - if (flash_status_check - (info, sect, info->erase_blk_tout, "erase")) { - rcode = 1; - } else - putchar('.'); - return rcode; + return flash_status_check(info, sect, info->erase_blk_tout, "erase"); } static void amd_flash_prepare_write(flash_info_t * info) |