diff options
author | Oleksij Rempel <linux@rempel-privat.de> | 2018-12-26 12:47:11 +0100 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2019-01-02 21:53:41 +0000 |
commit | 8f777bc1a66b5f604fde8bbdbe64206413c8aa1c (patch) | |
tree | 968c75c1e586b5c7a7d841e7033b31d250e52876 /src/flash/nor | |
parent | 08e64a828c10d5583162aa59266eef9507520401 (diff) |
flash: nor: ath79: remove base calculation
Currently it is impossible to flash ELF with correct offsets. The reason
is a bogus offset calculation extracted from base.
Since any other spi drivers do not care about base, do the same for
ath79 as well.
Change-Id: I9e46e01c9e7a709c2d07da9203c634f302603afd
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Reviewed-on: http://openocd.zylin.com/4821
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src/flash/nor')
-rw-r--r-- | src/flash/nor/ath79.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/flash/nor/ath79.c b/src/flash/nor/ath79.c index d73a4916..520f6c5b 100644 --- a/src/flash/nor/ath79.c +++ b/src/flash/nor/ath79.c @@ -653,13 +653,6 @@ static int ath79_write(struct flash_bank *bank, const uint8_t *buffer, LOG_DEBUG("%s: offset=0x%08" PRIx32 " count=0x%08" PRIx32, __func__, offset, count); - if (offset < bank->base || offset >= bank->base + bank->size) { - LOG_ERROR("Start address out of range"); - return ERROR_FAIL; - } - - offset -= bank->base; - if (target->state != TARGET_HALTED) { LOG_ERROR("Target not halted"); return ERROR_TARGET_NOT_HALTED; @@ -729,13 +722,6 @@ static int ath79_read(struct flash_bank *bank, uint8_t *buffer, LOG_DEBUG("%s: offset=0x%08" PRIx32 " count=0x%08" PRIx32, __func__, offset, count); - if (offset < bank->base || offset >= bank->base + bank->size) { - LOG_ERROR("Start address out of range"); - return ERROR_FAIL; - } - - offset -= bank->base; - if (target->state != TARGET_HALTED) { LOG_ERROR("Target not halted"); return ERROR_TARGET_NOT_HALTED; |