diff options
author | kc8apf <kc8apf@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-22 17:47:07 +0000 |
---|---|---|
committer | kc8apf <kc8apf@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-22 17:47:07 +0000 |
commit | da5c37517ac2e2cfd67fcd9beefad5a97d15697c (patch) | |
tree | 952ccd6ea575ce43e1787839ee421fdba8f0ef59 | |
parent | c78ad57bb7b1db835a7c398dfa37c42244349211 (diff) | |
download | openocd+libswd-da5c37517ac2e2cfd67fcd9beefad5a97d15697c.tar.gz openocd+libswd-da5c37517ac2e2cfd67fcd9beefad5a97d15697c.tar.bz2 openocd+libswd-da5c37517ac2e2cfd67fcd9beefad5a97d15697c.tar.xz openocd+libswd-da5c37517ac2e2cfd67fcd9beefad5a97d15697c.zip |
Author: Raúl Sánchez Siles <rsanchezs@infoglobal.es>
- Consistently use flash_address
git-svn-id: svn://svn.berlios.de/openocd/trunk@1884 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r-- | src/flash/cfi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/flash/cfi.c b/src/flash/cfi.c index 0eb44d6b..c51539fe 100644 --- a/src/flash/cfi.c +++ b/src/flash/cfi.c @@ -2129,11 +2129,11 @@ static int cfi_probe(struct flash_bank_s *bank) if (bank->chip_width == 1) { u8 manufacturer, device_id; - if((retval = target_read_u8(target, bank->base + 0x0, &manufacturer)) != ERROR_OK) + if((retval = target_read_u8(target, flash_address(bank, 0, 0x00), &manufacturer)) != ERROR_OK) { return retval; } - if((retval = target_read_u8(target, bank->base + 0x1, &device_id)) != ERROR_OK) + if((retval = target_read_u8(target, flash_address(bank, 0, 0x01), &device_id)) != ERROR_OK) { return retval; } @@ -2142,11 +2142,11 @@ static int cfi_probe(struct flash_bank_s *bank) } else if (bank->chip_width == 2) { - if((retval = target_read_u16(target, bank->base + 0x0, &cfi_info->manufacturer)) != ERROR_OK) + if((retval = target_read_u16(target, flash_address(bank, 0, 0x00), &cfi_info->manufacturer)) != ERROR_OK) { return retval; } - if((retval = target_read_u16(target, bank->base + 0x2, &cfi_info->device_id)) != ERROR_OK) + if((retval = target_read_u16(target, flash_address(bank, 0, 0x02), &cfi_info->device_id)) != ERROR_OK) { return retval; } |