X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fefm32.c;h=d2ac3a8fb1d5ac9c7ab65186e96a233c98c6dc52;hb=a7479fa89def9d8b1854d629dfdaa0ba17132617;hp=1d70bd501724ab624d45fc8fc1efcb175e433a13;hpb=7690a74b094347ec393c280414a182b7361d7b17;p=openocd.git diff --git a/src/flash/nor/efm32.c b/src/flash/nor/efm32.c index 1d70bd5017..d2ac3a8fb1 100644 --- a/src/flash/nor/efm32.c +++ b/src/flash/nor/efm32.c @@ -429,7 +429,7 @@ static int efm32x_erase_page(struct flash_bank *bank, uint32_t addr) */ int ret = 0; uint32_t status = 0; - + addr += bank->base; LOG_DEBUG("erasing flash page at 0x%08" PRIx32, addr); ret = efm32x_write_reg_u32(bank, EFM32_MSC_REG_ADDRB, addr); @@ -1120,7 +1120,7 @@ static const struct command_registration efm32x_command_handlers[] = { COMMAND_REGISTRATION_DONE }; -struct flash_driver efm32_flash = { +const struct flash_driver efm32_flash = { .name = "efm32", .commands = efm32x_command_handlers, .flash_bank_command = efm32x_flash_bank_command,