diff options
Diffstat (limited to 'src/jtag')
-rw-r--r-- | src/jtag/arm-jtag-ew.c | 4 | ||||
-rw-r--r-- | src/jtag/bitbang.c | 2 | ||||
-rw-r--r-- | src/jtag/dummy.c | 2 | ||||
-rw-r--r-- | src/jtag/ft2232.c | 4 | ||||
-rw-r--r-- | src/jtag/interface.c | 16 | ||||
-rw-r--r-- | src/jtag/usbprog.c | 6 | ||||
-rw-r--r-- | src/jtag/zy1000/jtag_minidriver.h | 14 | ||||
-rw-r--r-- | src/jtag/zy1000/zy1000.c | 8 |
8 files changed, 28 insertions, 28 deletions
diff --git a/src/jtag/arm-jtag-ew.c b/src/jtag/arm-jtag-ew.c index 0cc30654..7616fe70 100644 --- a/src/jtag/arm-jtag-ew.c +++ b/src/jtag/arm-jtag-ew.c @@ -413,8 +413,8 @@ static void armjtagew_scan(bool ir_scan, enum scan_type type, uint8_t *buffer, i static void armjtagew_reset(int trst, int srst) { - const uint8_t trst_mask = (1u<<5); - const uint8_t srst_mask = (1u<<6); + const uint8_t trst_mask = (1u << 5); + const uint8_t srst_mask = (1u << 6); uint8_t val = 0; uint8_t outp_en = 0; uint8_t change_mask = 0; diff --git a/src/jtag/bitbang.c b/src/jtag/bitbang.c index e3cd63be..dacd65ec 100644 --- a/src/jtag/bitbang.c +++ b/src/jtag/bitbang.c @@ -192,7 +192,7 @@ static void bitbang_scan(bool ir_scan, enum scan_type type, uint8_t *buffer, int int tms=(bit_cnt==scan_size-1) ? 1 : 0; int tdi; int bytec=bit_cnt/8; - int bcval=1<<(bit_cnt % 8); + int bcval=1 << (bit_cnt % 8); /* if we're just reading the scan, but don't care about the output * default to outputting 'low', this also makes valgrind traces more readable, diff --git a/src/jtag/dummy.c b/src/jtag/dummy.c index 6d738ee0..b4aa9415 100644 --- a/src/jtag/dummy.c +++ b/src/jtag/dummy.c @@ -77,7 +77,7 @@ static bitbang_interface_t dummy_bitbang = static int dummy_read(void) { int data = 1 & dummy_data; - dummy_data = (dummy_data >> 1) | (1<<31); + dummy_data = (dummy_data >> 1) | (1 << 31); return data; } diff --git a/src/jtag/ft2232.c b/src/jtag/ft2232.c index 14ee7d14..d4e0fbcb 100644 --- a/src/jtag/ft2232.c +++ b/src/jtag/ft2232.c @@ -264,7 +264,7 @@ static void clock_tms(uint8_t mpsse_cmd, int tms_bits, int tms_count, bool tdi_b bool bit = tms_bits & 1; if (bit) - tms_byte |= (1<<tms_ndx); + tms_byte |= (1 << tms_ndx); /* always do state transitions in public view */ tap_set_state(tap_state_transition(tap_get_state(), bit)); @@ -760,7 +760,7 @@ static void ft2232_add_pathmove(tap_state_t* path, int num_states) if (tap_state_transition(walker, false) == desired_next_state) ; /* bit within tms_bits at index state_ndx is already zero */ else if (tap_state_transition(walker, true) == desired_next_state) - tms_bits |= (1<<state_ndx); + tms_bits |= (1 << state_ndx); else { LOG_ERROR("BUG: %s -> %s isn't a valid TAP transition", diff --git a/src/jtag/interface.c b/src/jtag/interface.c index 6a45d593..e9998011 100644 --- a/src/jtag/interface.c +++ b/src/jtag/interface.c @@ -118,14 +118,14 @@ struct tms_sequences #define HEX__(n) 0x##n##LU #define B8__(x) \ - (((x) & 0x0000000FLU)?(1<<0):0) \ - +(((x) & 0x000000F0LU)?(1<<1):0) \ - +(((x) & 0x00000F00LU)?(1<<2):0) \ - +(((x) & 0x0000F000LU)?(1<<3):0) \ - +(((x) & 0x000F0000LU)?(1<<4):0) \ - +(((x) & 0x00F00000LU)?(1<<5):0) \ - +(((x) & 0x0F000000LU)?(1<<6):0) \ - +(((x) & 0xF0000000LU)?(1<<7):0) + (((x) & 0x0000000FLU)?(1 << 0):0) \ + +(((x) & 0x000000F0LU)?(1 << 1):0) \ + +(((x) & 0x00000F00LU)?(1 << 2):0) \ + +(((x) & 0x0000F000LU)?(1 << 3):0) \ + +(((x) & 0x000F0000LU)?(1 << 4):0) \ + +(((x) & 0x00F00000LU)?(1 << 5):0) \ + +(((x) & 0x0F000000LU)?(1 << 6):0) \ + +(((x) & 0xF0000000LU)?(1 << 7):0) #define B8(bits,count) { ((uint8_t)B8__(HEX__(bits))), (count) } diff --git a/src/jtag/usbprog.c b/src/jtag/usbprog.c index ed6472b2..c9ade3d6 100644 --- a/src/jtag/usbprog.c +++ b/src/jtag/usbprog.c @@ -373,11 +373,11 @@ static void usbprog_write(int tck, int tms, int tdi) unsigned char output_value=0x00; if (tms) - output_value |= (1<<TMS_BIT); + output_value |= (1 << TMS_BIT); if (tdi) - output_value |= (1<<TDI_BIT); + output_value |= (1 << TDI_BIT); if (tck) - output_value |= (1<<TCK_BIT); + output_value |= (1 << TCK_BIT); usbprog_jtag_write_slice(usbprog_jtag_handle,output_value); } diff --git a/src/jtag/zy1000/jtag_minidriver.h b/src/jtag/zy1000/jtag_minidriver.h index 0f3e217e..6b51844b 100644 --- a/src/jtag/zy1000/jtag_minidriver.h +++ b/src/jtag/zy1000/jtag_minidriver.h @@ -74,7 +74,7 @@ static void setCurrentState(enum tap_state state) } waitQueue(); sampleShiftRegister(); - ZY1000_POKE(ZY1000_JTAG_BASE+0x8, (repeat<<8)|(a<<4)|a); + ZY1000_POKE(ZY1000_JTAG_BASE+0x8, (repeat << 8)|(a << 4)|a); } @@ -106,7 +106,7 @@ static __inline__ void shiftValueInner(const enum tap_state state, const enum ta } /* shift out value */ waitIdle(); - ZY1000_POKE(ZY1000_JTAG_BASE+0x28, (((value >> i)&1)<<1)|tms); + ZY1000_POKE(ZY1000_JTAG_BASE+0x28, (((value >> i)&1) << 1)|tms); } waitIdle(); ZY1000_POKE(ZY1000_JTAG_BASE+0x28, 0); @@ -116,11 +116,11 @@ static __inline__ void shiftValueInner(const enum tap_state state, const enum ta setCurrentState(endState); } else { - ZY1000_POKE(ZY1000_JTAG_BASE+0x8, (repeat<<8)|(a<<4)|b); + ZY1000_POKE(ZY1000_JTAG_BASE+0x8, (repeat << 8)|(a << 4)|b); } #else /* fast version */ - ZY1000_POKE(ZY1000_JTAG_BASE+0x8, (repeat<<8)|(a<<4)|b); + ZY1000_POKE(ZY1000_JTAG_BASE+0x8, (repeat << 8)|(a << 4)|b); #endif #else /* maximum debug version */ @@ -132,15 +132,15 @@ static __inline__ void shiftValueInner(const enum tap_state state, const enum ta { sampleShiftRegister(); ZY1000_POKE(ZY1000_JTAG_BASE+0xc, value >> i); - ZY1000_POKE(ZY1000_JTAG_BASE+0x8, (1<<8)|(a<<4)|a); + ZY1000_POKE(ZY1000_JTAG_BASE+0x8, (1 << 8)|(a << 4)|a); } sampleShiftRegister(); ZY1000_POKE(ZY1000_JTAG_BASE+0xc, value >> (repeat-1)); - ZY1000_POKE(ZY1000_JTAG_BASE+0x8, (1<<8)|(a<<4)|b); + ZY1000_POKE(ZY1000_JTAG_BASE+0x8, (1 << 8)|(a << 4)|b); } else { sampleShiftRegister(); - ZY1000_POKE(ZY1000_JTAG_BASE+0x8, (repeat<<8)|(a<<4)|b); + ZY1000_POKE(ZY1000_JTAG_BASE+0x8, (repeat << 8)|(a << 4)|b); } sampleShiftRegister(); #endif diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index 4626b781..bc9e748a 100644 --- a/src/jtag/zy1000/zy1000.c +++ b/src/jtag/zy1000/zy1000.c @@ -405,7 +405,7 @@ static void shiftValueInnerFlip(const tap_state_t state, const tap_state_t endSt a=state; b=endState; ZY1000_POKE(ZY1000_JTAG_BASE+0xc, value); - ZY1000_POKE(ZY1000_JTAG_BASE+0x8, (1<<15)|(repeat<<8)|(a<<4)|b); + ZY1000_POKE(ZY1000_JTAG_BASE+0x8, (1 << 15)|(repeat << 8)|(a << 4)|b); VERBOSE(getShiftValueFlip()); } #endif @@ -461,7 +461,7 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_ } } /* mask away unused bits for easier debugging */ - value&=~(((uint32_t)0xffffffff)<<k); + value&=~(((uint32_t)0xffffffff) << k); shiftValueInner(shiftState, pause_state, k, value); @@ -741,7 +741,7 @@ void embeddedice_write_dcc(jtag_tap_t *tap, int reg_addr, uint8_t *buffer, int l for (i = 0; i < count; i++) { shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, 32, fast_target_buffer_get_u32(buffer, 1)); - shiftValueInner(TAP_DRSHIFT, end_state, 6, reg_addr|(1<<5)); + shiftValueInner(TAP_DRSHIFT, end_state, 6, reg_addr|(1 << 5)); buffer += 4; } } else @@ -750,7 +750,7 @@ void embeddedice_write_dcc(jtag_tap_t *tap, int reg_addr, uint8_t *buffer, int l for (i = 0; i < count; i++) { shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, 32, fast_target_buffer_get_u32(buffer, 0)); - shiftValueInner(TAP_DRSHIFT, end_state, 6, reg_addr|(1<<5)); + shiftValueInner(TAP_DRSHIFT, end_state, 6, reg_addr|(1 << 5)); buffer += 4; } } |