diff options
author | Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> | 2015-11-30 12:12:42 +0100 |
---|---|---|
committer | Freddie Chopin <freddie.chopin@gmail.com> | 2016-05-04 22:53:23 +0100 |
commit | a28b94e9ab00c63951f68ac44833e9d51200f7db (patch) | |
tree | 32c6e28542b28f38654ad9a54969316d41cd21ec /contrib | |
parent | 54908d9fb969c19e998f59b1c724287d0b3d8eb8 (diff) | |
download | riscv-openocd-a28b94e9ab00c63951f68ac44833e9d51200f7db.zip riscv-openocd-a28b94e9ab00c63951f68ac44833e9d51200f7db.tar.gz riscv-openocd-a28b94e9ab00c63951f68ac44833e9d51200f7db.tar.bz2 |
stm32l4x.c: Use explicit 64-bit flash access as reference manual implies.
Change-Id: I87b540c1ee7158a9d697e9fbc845a603c6bbe74d
Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Reviewed-on: http://openocd.zylin.com/3139
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Tested-by: jenkins
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/loaders/flash/stm32l4x.S | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/contrib/loaders/flash/stm32l4x.S b/contrib/loaders/flash/stm32l4x.S index 587cc33..045f9d0 100644 --- a/contrib/loaders/flash/stm32l4x.S +++ b/contrib/loaders/flash/stm32l4x.S @@ -51,9 +51,9 @@ * r4 = flash base * * Clobbered: - * r5 - rp - * r6 - temp - * r8 - wp, tmp + * r5 - rp + * r6/7 - temp (64-bit) + * r8 - wp, tmp */ #define STM32_FLASH_CR_OFFSET 0x14 /* offset of CR register in FLASH struct */ @@ -70,10 +70,8 @@ wait_fifo: ldr r6, STM32_PROG str r6, [r4, #STM32_FLASH_CR_OFFSET] - ldr r6, [r5], #0x04 /* read one word from src, increment ptr */ - str r6, [r2], #0x04 /* write one word to dst, increment ptr */ - ldr r6, [r5], #0x04 /* read one word from src, increment ptr */ - str r6, [r2], #0x04 /* write one word to dst, increment ptr */ + ldrd r6, [r5], #0x08 /* read one word from src, increment ptr */ + strd r6, [r2], #0x08 /* write one word to dst, increment ptr */ dsb busy: ldr r6, [r4, #STM32_FLASH_SR_OFFSET] |