From: OpenOCD-Gerrit <ope...@us...> - 2020-07-08 21:07:03
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 703a893f8ac61f8e4a19105fec8a00b9710a4e70 (commit) via 5ac425365a2b5d1c89f0dc3c5e4a69c483f15938 (commit) via e6e154e10302051c2170c6c4fc9cdffe1d118129 (commit) via 20196f86d40c5d51cef19b76212063c323a00eb3 (commit) via 02fac04b4dee2af77dafeb09df5bb0c70f6bc4a1 (commit) via 19e1a30991cc892b35c3b52e25eb24fd90c14b7a (commit) via f23525e5dd1ed1e0a63f2ecf57bf7927be1a9765 (commit) from 46238fabb9d5c9b81de1151312babedb88423fd9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 703a893f8ac61f8e4a19105fec8a00b9710a4e70 Author: Marc Schink <de...@za...> Date: Wed Jul 1 10:25:07 2020 +0200 flash/nor/max32xxx: Use 'bool' data type Change-Id: I828cdd6d97a59fd0692eb22ba8fc0a5759029432 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/5744 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/max32xxx.c b/src/flash/nor/max32xxx.c index 20ebbbf4f..65898cd64 100644 --- a/src/flash/nor/max32xxx.c +++ b/src/flash/nor/max32xxx.c @@ -70,7 +70,7 @@ static int max32xxx_mass_erase(struct flash_bank *bank); struct max32xxx_flash_bank { - int probed; + bool probed; int max326xx; unsigned int flash_size; unsigned int flc_base; @@ -118,7 +118,7 @@ static int get_info(struct flash_bank *bank, char *buf, int buf_size) int printed; struct max32xxx_flash_bank *info = bank->driver_priv; - if (info->probed == 0) + if (!info->probed) return ERROR_FLASH_BANK_NOT_PROBED; printed = snprintf(buf, buf_size, "\nMaxim Integrated max32xxx flash driver\n"); @@ -211,7 +211,7 @@ static int max32xxx_protect_check(struct flash_bank *bank) struct target *target = bank->target; uint32_t temp_reg; - if (info->probed == 0) + if (!info->probed) return ERROR_FLASH_BANK_NOT_PROBED; if (!info->max326xx) { @@ -248,7 +248,7 @@ static int max32xxx_erase(struct flash_bank *bank, unsigned int first, return ERROR_TARGET_NOT_HALTED; } - if (info->probed == 0) + if (!info->probed) return ERROR_FLASH_BANK_NOT_PROBED; if ((last < first) || (last >= bank->num_sectors)) @@ -333,7 +333,7 @@ static int max32xxx_protect(struct flash_bank *bank, int set, return ERROR_TARGET_NOT_HALTED; } - if (info->probed == 0) + if (!info->probed) return ERROR_FLASH_BANK_NOT_PROBED; if (!info->max326xx) @@ -459,7 +459,7 @@ static int max32xxx_write(struct flash_bank *bank, const uint8_t *buffer, LOG_DEBUG("bank=%p buffer=%p offset=%08" PRIx32 " count=%08" PRIx32 "", bank, buffer, offset, count); - if (info->probed == 0) + if (!info->probed) return ERROR_FLASH_BANK_NOT_PROBED; if (offset & 0x3) { @@ -689,7 +689,7 @@ static int max32xxx_probe(struct flash_bank *bank) if (max32xxx_protect_check(bank) == ERROR_FLASH_OPER_UNSUPPORTED) LOG_WARNING("Flash protection not supported on this device"); - info->probed = 1; + info->probed = true; return ERROR_OK; } @@ -708,7 +708,7 @@ static int max32xxx_mass_erase(struct flash_bank *bank) return ERROR_TARGET_NOT_HALTED; } - if (info->probed == 0) + if (!info->probed) return ERROR_FLASH_BANK_NOT_PROBED; int not_protected = 0; commit 5ac425365a2b5d1c89f0dc3c5e4a69c483f15938 Author: Marc Schink <de...@za...> Date: Wed Jul 1 10:24:53 2020 +0200 flash/nor/lpcspifi: Use 'bool' data type Change-Id: I0485a7885fe154f983c7a7ce84cbedb0ba32ca31 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/5743 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/lpcspifi.c b/src/flash/nor/lpcspifi.c index 8616c04d0..13bb1f0a1 100644 --- a/src/flash/nor/lpcspifi.c +++ b/src/flash/nor/lpcspifi.c @@ -47,7 +47,7 @@ #define SPIFI_INIT_STACK_SIZE 512 struct lpcspifi_flash_bank { - int probed; + bool probed; uint32_t ssp_base; uint32_t io_base; uint32_t ioconfig_base; @@ -72,7 +72,7 @@ FLASH_BANK_COMMAND_HANDLER(lpcspifi_flash_bank_command) } bank->driver_priv = lpcspifi_info; - lpcspifi_info->probed = 0; + lpcspifi_info->probed = false; return ERROR_OK; } @@ -849,7 +849,7 @@ static int lpcspifi_probe(struct flash_bank *bank) /* If we've already probed, we should be fine to skip this time. */ if (lpcspifi_info->probed) return ERROR_OK; - lpcspifi_info->probed = 0; + lpcspifi_info->probed = false; lpcspifi_info->ssp_base = 0x40083000; lpcspifi_info->io_base = 0x400F4000; @@ -908,7 +908,7 @@ static int lpcspifi_probe(struct flash_bank *bank) bank->sectors = sectors; - lpcspifi_info->probed = 1; + lpcspifi_info->probed = true; return ERROR_OK; } commit e6e154e10302051c2170c6c4fc9cdffe1d118129 Author: Marc Schink <de...@za...> Date: Wed Jul 1 10:24:35 2020 +0200 flash/nor/jtagspi: Use 'bool' data type Change-Id: I0e81dd476c6b3ec7fee6c84ab1bfcf9bca90c532 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/5742 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/jtagspi.c b/src/flash/nor/jtagspi.c index ce3f9ca24..20362f384 100644 --- a/src/flash/nor/jtagspi.c +++ b/src/flash/nor/jtagspi.c @@ -30,7 +30,7 @@ struct jtagspi_flash_bank { struct jtag_tap *tap; const struct flash_device *dev; - int probed; + bool probed; uint32_t ir; }; @@ -49,7 +49,7 @@ FLASH_BANK_COMMAND_HANDLER(jtagspi_flash_bank_command) bank->driver_priv = info; info->tap = NULL; - info->probed = 0; + info->probed = false; COMMAND_PARSE_NUMBER(u32, CMD_ARGV[6], info->ir); return ERROR_OK; @@ -170,7 +170,7 @@ static int jtagspi_probe(struct flash_bank *bank) if (info->probed) free(bank->sectors); - info->probed = 0; + info->probed = false; if (bank->target->tap == NULL) { LOG_ERROR("Target has no JTAG tap"); @@ -224,7 +224,7 @@ static int jtagspi_probe(struct flash_bank *bank) } bank->sectors = sectors; - info->probed = 1; + info->probed = true; return ERROR_OK; } commit 20196f86d40c5d51cef19b76212063c323a00eb3 Author: Marc Schink <de...@za...> Date: Wed Jul 1 10:24:19 2020 +0200 flash/nor/fm3: Use 'bool' data type Change-Id: Ic90ab762488063f6958f5e775c1b2fe5f3f1718f Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/5741 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/fm3.c b/src/flash/nor/fm3.c index 1dd9ae546..afeba8e0b 100644 --- a/src/flash/nor/fm3.c +++ b/src/flash/nor/fm3.c @@ -61,7 +61,7 @@ enum fm3_flash_type { struct fm3_flash_bank { enum fm3_variant variant; enum fm3_flash_type flashtype; - int probed; + bool probed; }; FLASH_BANK_COMMAND_HANDLER(fm3_flash_bank_command) @@ -132,7 +132,7 @@ FLASH_BANK_COMMAND_HANDLER(fm3_flash_bank_command) return ERROR_FLASH_BANK_INVALID; } - fm3_info->probed = 0; + fm3_info->probed = false; return ERROR_OK; } @@ -657,7 +657,7 @@ static int fm3_probe(struct flash_bank *bank) */ num_pages = 10; /* max number of Flash pages for malloc */ - fm3_info->probed = 0; + fm3_info->probed = false; bank->sectors = malloc(sizeof(struct flash_sector) * num_pages); bank->base = 0x00000000; @@ -797,7 +797,7 @@ static int fm3_probe(struct flash_bank *bank) bank->sectors[9].is_protected = -1; } - fm3_info->probed = 1; + fm3_info->probed = true; return ERROR_OK; } commit 02fac04b4dee2af77dafeb09df5bb0c70f6bc4a1 Author: Marc Schink <de...@za...> Date: Wed Jul 1 10:24:11 2020 +0200 flash/nor/fespi: Use 'bool' data type Change-Id: I4583b4475b2fa2733db0861bfe8f52f0a514c472 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/5740 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/fespi.c b/src/flash/nor/fespi.c index 134fba6e3..4afa1b8fb 100644 --- a/src/flash/nor/fespi.c +++ b/src/flash/nor/fespi.c @@ -122,7 +122,7 @@ struct fespi_flash_bank { - int probed; + bool probed; target_addr_t ctrl_base; const struct flash_device *dev; }; @@ -157,7 +157,7 @@ FLASH_BANK_COMMAND_HANDLER(fespi_flash_bank_command) } bank->driver_priv = fespi_info; - fespi_info->probed = 0; + fespi_info->probed = false; fespi_info->ctrl_base = 0; if (CMD_ARGC >= 7) { COMMAND_PARSE_ADDRESS(CMD_ARGV[6], fespi_info->ctrl_base); @@ -916,7 +916,7 @@ static int fespi_probe(struct flash_bank *bank) if (fespi_info->probed) free(bank->sectors); - fespi_info->probed = 0; + fespi_info->probed = false; if (fespi_info->ctrl_base == 0) { for (target_device = target_devices ; target_device->name ; ++target_device) @@ -999,7 +999,7 @@ static int fespi_probe(struct flash_bank *bank) } bank->sectors = sectors; - fespi_info->probed = 1; + fespi_info->probed = true; return ERROR_OK; } commit 19e1a30991cc892b35c3b52e25eb24fd90c14b7a Author: Marc Schink <de...@za...> Date: Wed Jul 1 10:23:59 2020 +0200 flash/nor/em357: Use 'bool' data type Change-Id: I251b62275d204fdc315cd167685799c15d4e7cf4 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/5739 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/em357.c b/src/flash/nor/em357.c index a93c81e29..4e40e6b6b 100644 --- a/src/flash/nor/em357.c +++ b/src/flash/nor/em357.c @@ -87,7 +87,7 @@ struct em357_options { struct em357_flash_bank { struct em357_options option_bytes; int ppage_size; - int probed; + bool probed; }; static int em357_mass_erase(struct flash_bank *bank); @@ -104,7 +104,7 @@ FLASH_BANK_COMMAND_HANDLER(em357_flash_bank_command) em357_info = malloc(sizeof(struct em357_flash_bank)); bank->driver_priv = em357_info; - em357_info->probed = 0; + em357_info->probed = false; return ERROR_OK; } @@ -680,7 +680,7 @@ static int em357_probe(struct flash_bank *bank) int page_size; uint32_t base_address = 0x08000000; - em357_info->probed = 0; + em357_info->probed = false; switch (bank->size) { case 0x10000: @@ -741,7 +741,7 @@ static int em357_probe(struct flash_bank *bank) bank->sectors[i].is_protected = 1; } - em357_info->probed = 1; + em357_info->probed = true; return ERROR_OK; } commit f23525e5dd1ed1e0a63f2ecf57bf7927be1a9765 Author: Marc Schink <de...@za...> Date: Wed Jul 1 10:23:44 2020 +0200 flash/nor/cfi: Use 'bool' data type Change-Id: I25198223175c26aded9ad667b802da09883e94ee Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/5738 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c index 19fb6b2c2..9d2a53a6b 100644 --- a/src/flash/nor/cfi.c +++ b/src/flash/nor/cfi.c @@ -814,7 +814,7 @@ static int cfi_intel_info(struct flash_bank *bank, char *buf, int buf_size) int cfi_flash_bank_cmd(struct flash_bank *bank, unsigned int argc, const char **argv) { struct cfi_flash_bank *cfi_info; - int bus_swap = 0; + bool bus_swap = false; if (argc < 6) return ERROR_COMMAND_SYNTAX_ERROR; @@ -841,20 +841,20 @@ int cfi_flash_bank_cmd(struct flash_bank *bank, unsigned int argc, const char ** cfi_info->pri_ext = NULL; bank->driver_priv = cfi_info; - cfi_info->x16_as_x8 = 0; - cfi_info->jedec_probe = 0; - cfi_info->not_cfi = 0; - cfi_info->data_swap = 0; + cfi_info->x16_as_x8 = false; + cfi_info->jedec_probe = false; + cfi_info->not_cfi = false; + cfi_info->data_swap = false; for (unsigned i = 6; i < argc; i++) { if (strcmp(argv[i], "x16_as_x8") == 0) - cfi_info->x16_as_x8 = 1; + cfi_info->x16_as_x8 = true; else if (strcmp(argv[i], "data_swap") == 0) - cfi_info->data_swap = 1; + cfi_info->data_swap = true; else if (strcmp(argv[i], "bus_swap") == 0) - bus_swap = 1; + bus_swap = true; else if (strcmp(argv[i], "jedec_probe") == 0) - cfi_info->jedec_probe = 1; + cfi_info->jedec_probe = true; } if (bus_swap) @@ -2661,7 +2661,7 @@ int cfi_probe(struct flash_bank *bank) /* query only if this is a CFI compatible flash, * otherwise the relevant info has already been filled in */ - if (cfi_info->not_cfi == 0) { + if (!cfi_info->not_cfi) { /* enter CFI query mode * according to JEDEC Standard No. 68.01, * a single bus sequence with address = 0x55, data = 0x98 should put @@ -3011,7 +3011,7 @@ int cfi_get_info(struct flash_bank *bank, char *buf, int buf_size) return ERROR_OK; } - if (cfi_info->not_cfi == 0) + if (!cfi_info->not_cfi) printed = snprintf(buf, buf_size, "\nCFI flash: "); else printed = snprintf(buf, buf_size, "\nnon-CFI flash: "); diff --git a/src/flash/nor/cfi.h b/src/flash/nor/cfi.h index effa1d5c0..eceb9a4b3 100644 --- a/src/flash/nor/cfi.h +++ b/src/flash/nor/cfi.h @@ -23,13 +23,13 @@ #define CFI_STATUS_POLL_MASK_DQ6_DQ7 0xC0 /* DQ6..DQ7 */ struct cfi_flash_bank { - int x16_as_x8; - int jedec_probe; - int not_cfi; - int probed; + bool x16_as_x8; + bool jedec_probe; + bool not_cfi; + bool probed; enum target_endianness endianness; - int data_swap; + bool data_swap; uint16_t manufacturer; uint16_t device_id; diff --git a/src/flash/nor/non_cfi.c b/src/flash/nor/non_cfi.c index 851c0ae81..f44adba13 100644 --- a/src/flash/nor/non_cfi.c +++ b/src/flash/nor/non_cfi.c @@ -487,7 +487,7 @@ void cfi_fixup_non_cfi(struct flash_bank *bank) if (!non_cfi->mfr) return; - cfi_info->not_cfi = 1; + cfi_info->not_cfi = true; /* fill in defaults for non-critical data */ cfi_info->vcc_min = 0x0; ----------------------------------------------------------------------- Summary of changes: src/flash/nor/cfi.c | 22 +++++++++++----------- src/flash/nor/cfi.h | 10 +++++----- src/flash/nor/em357.c | 8 ++++---- src/flash/nor/fespi.c | 8 ++++---- src/flash/nor/fm3.c | 8 ++++---- src/flash/nor/jtagspi.c | 8 ++++---- src/flash/nor/lpcspifi.c | 8 ++++---- src/flash/nor/max32xxx.c | 16 ++++++++-------- src/flash/nor/non_cfi.c | 2 +- 9 files changed, 45 insertions(+), 45 deletions(-) hooks/post-receive -- Main OpenOCD repository |