aboutsummaryrefslogtreecommitdiff
path: root/src/flash
diff options
context:
space:
mode:
authorEvgeniy Naydanov <evgeniy.naydanov@syntacore.com>2024-03-07 12:38:57 +0300
committerEvgeniy Naydanov <evgeniy.naydanov@syntacore.com>2024-03-07 12:38:57 +0300
commit19acf51c396cc311c12fc096296f218497b0bfb8 (patch)
tree56f0e20979d17c90464473527077549f796a542b /src/flash
parentca7d88252633a5d452ee92e6f8f3eb20cadfb633 (diff)
parent07141132a7d787005c0829618a60b4a842be7847 (diff)
downloadriscv-openocd-19acf51c396cc311c12fc096296f218497b0bfb8.zip
riscv-openocd-19acf51c396cc311c12fc096296f218497b0bfb8.tar.gz
riscv-openocd-19acf51c396cc311c12fc096296f218497b0bfb8.tar.bz2
Merge up to 07141132a7d787005c0829618a60b4a842be7847 from upstream
Change-Id: Ibca0c8093e2983e1ee199f79ed777f5136794195
Diffstat (limited to 'src/flash')
-rw-r--r--src/flash/nor/xcf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/flash/nor/xcf.c b/src/flash/nor/xcf.c
index c253b22..1d67b09 100644
--- a/src/flash/nor/xcf.c
+++ b/src/flash/nor/xcf.c
@@ -130,8 +130,8 @@ static struct xcf_status read_status(struct flash_bank *bank)
jtag_add_ir_scan(bank->target->tap, &scan, TAP_IDLE);
jtag_execute_queue();
- ret.isc_error = ((irdata[0] >> 7) & 3) == 0b01;
- ret.prog_error = ((irdata[0] >> 5) & 3) == 0b01;
+ ret.isc_error = ((irdata[0] >> 7) & 3) == 1;
+ ret.prog_error = ((irdata[0] >> 5) & 3) == 1;
ret.prog_busy = ((irdata[0] >> 4) & 1) == 0;
ret.isc_mode = ((irdata[0] >> 3) & 1) == 1;
@@ -528,7 +528,7 @@ static int isc_program_single_revision_btc(struct flash_bank *bank)
{
uint8_t buf[4];
uint32_t btc = 0xFFFFFFFF;
- btc &= ~0b1111;
+ btc &= ~0xF;
btc |= ((bank->num_sectors - 1) << 2);
btc &= ~(1 << 4);
h_u32_to_le(buf, btc);