diff options
author | Tomas Vanek <vanekt@fbl.cz> | 2024-01-21 18:00:06 +0100 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2024-03-09 11:01:04 +0000 |
commit | 85bc3289699a23dfb66bd10927aa1a6330e3668c (patch) | |
tree | cdf7f66bf59332d69d4801e42950d25ebaa5f7f2 | |
parent | 19ef6634f021f545c2154cdd6d011608f1249308 (diff) | |
download | riscv-openocd-85bc3289699a23dfb66bd10927aa1a6330e3668c.zip riscv-openocd-85bc3289699a23dfb66bd10927aa1a6330e3668c.tar.gz riscv-openocd-85bc3289699a23dfb66bd10927aa1a6330e3668c.tar.bz2 |
flash/nor/nrf5: add missing package codes
from Product Specification of nRF52805, 810, 811
820, 833 and 840.
While on it, rename the table to make sure the codes
are valid for nRF52 series only.
Change-Id: Id8f78fd214c5d345d1769378ae546a6be5a183ba
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8105
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
-rw-r--r-- | src/flash/nor/nrf5.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/flash/nor/nrf5.c b/src/flash/nor/nrf5.c index 18efae5..b6d712d 100644 --- a/src/flash/nor/nrf5.c +++ b/src/flash/nor/nrf5.c @@ -254,11 +254,16 @@ struct nrf5_device_package { /* Newer devices have FICR INFO.PACKAGE. * This table converts its value to two character code */ -static const struct nrf5_device_package nrf5_packages_table[] = { +static const struct nrf5_device_package nrf52_packages_table[] = { { 0x2000, "QF" }, { 0x2001, "CH" }, { 0x2002, "CI" }, + { 0x2003, "QC" }, + { 0x2004, "QI/CA" }, /* differs nRF52805, 810, 811: CA, nRF52833, 840: QI */ { 0x2005, "CK" }, + { 0x2007, "QD" }, + { 0x2008, "CJ" }, + { 0x2009, "CF" }, }; const struct flash_driver nrf5_flash, nrf51_flash; @@ -591,9 +596,9 @@ static bool nrf5_info_variant_to_str(uint32_t variant, char *bf) static const char *nrf5_decode_info_package(uint32_t package) { - for (size_t i = 0; i < ARRAY_SIZE(nrf5_packages_table); i++) { - if (nrf5_packages_table[i].package == package) - return nrf5_packages_table[i].code; + for (size_t i = 0; i < ARRAY_SIZE(nrf52_packages_table); i++) { + if (nrf52_packages_table[i].package == package) + return nrf52_packages_table[i].code; } return "xx"; } |