efm32: correct erase address if bank->base != 0
Prepare for additional flash banks not located at address 0 Change-Id: I60b78c917f94fa52bf24df9e3315536f776eec84 Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reviewed-on: http://openocd.zylin.com/4440 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
parent
5b350bf05c
commit
e406f2b0dc
|
@ -429,7 +429,7 @@ static int efm32x_erase_page(struct flash_bank *bank, uint32_t addr)
|
||||||
*/
|
*/
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
uint32_t status = 0;
|
uint32_t status = 0;
|
||||||
|
addr += bank->base;
|
||||||
LOG_DEBUG("erasing flash page at 0x%08" PRIx32, addr);
|
LOG_DEBUG("erasing flash page at 0x%08" PRIx32, addr);
|
||||||
|
|
||||||
ret = efm32x_write_reg_u32(bank, EFM32_MSC_REG_ADDRB, addr);
|
ret = efm32x_write_reg_u32(bank, EFM32_MSC_REG_ADDRB, addr);
|
||||||
|
|
Loading…
Reference in New Issue