Don't gather "blocks" into flash pages. Instead, write each "block"
to flash on each flash_write_block() request.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Avoid read-modify-write operations on the FLASH->CR register. Write
out the desired valid explicitly.
Use writew() and writel() to write the flash bytes out to avoid gcc
reordering the memory write relative to the flash register writes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move application_check_valid() in bootentry.c to armcm_boot.c and make
the check specific to the ARM cortex-m. On these ARM machines it is
easier to validate the application stack address.
Also rename jump_to_application() to application_jump().
Also rename flash_read_block() to application_read_flash() and move to
armcm_boot.c .
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>