forked from auracaster/openocd
flash/nor/rp2040: allow flash size override from cfg
Do not enforce hard-wired size 32 MiB Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Change-Id: I54608f75cc13996fda38ebd5d330e3b1893c2fd9 Reviewed-on: https://review.openocd.org/c/openocd/+/8446 Tested-by: jenkins Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
@@ -887,7 +887,10 @@ static int rp2040_flash_probe(struct flash_bank *bank)
|
||||
bank->write_end_alignment = 256;
|
||||
|
||||
// Max size -- up to two devices (two chip selects) in adjacent 24-bit address windows
|
||||
bank->size = 32 * 1024 * 1024;
|
||||
if (bank->size == 0) {
|
||||
/* TODO: get real flash size */
|
||||
bank->size = 32 * 1024 * 1024;
|
||||
}
|
||||
|
||||
bank->num_sectors = bank->size / 4096;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user