avrf.c: Use extended addressing for flash > 0x20000
authorLars Poeschel <poeschell+openocd@mailbox.org>
Tue, 5 Nov 2019 15:37:43 +0000 (16:37 +0100)
committerTomas Vanek <vanekt@fbl.cz>
Tue, 24 Mar 2020 21:34:18 +0000 (21:34 +0000)
commita708b6d25ec72c6de57ff42bdc6c0b4d52a69388
treeba365d2f389d45a64652a5f71b0891dd0f55f426
parent85dc63011378c0a8112f99e3a02fa971f96bbc05
avrf.c: Use extended addressing for flash > 0x20000

The current method used for flash addressing uses 16 bit. Every access
to flash is 16 bit wide. With 16 address bits one can address 0x10000
unique locations á 16 bits thats 0x20000 bytes.
For flashes bigger than that avrs have an extended addressing with more
than 16 address bits. This is now implemented and used for flashs larger
than 0x20000 bytes.

Change-Id: Id8b6337dde3830fb3c56b9042872e040bb67c12d
Signed-off-by: Lars Pöschel <poeschell+openocd@mailbox.org>
Reviewed-on: http://openocd.zylin.com/5502
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/flash/nor/avrf.c