summaryrefslogtreecommitdiff
path: root/src/jtag/zy1000
diff options
context:
space:
mode:
Diffstat (limited to 'src/jtag/zy1000')
-rw-r--r--src/jtag/zy1000/jtag_minidriver.h18
-rw-r--r--src/jtag/zy1000/zy1000.c14
2 files changed, 16 insertions, 16 deletions
diff --git a/src/jtag/zy1000/jtag_minidriver.h b/src/jtag/zy1000/jtag_minidriver.h
index 6b51844b..9f24dd66 100644
--- a/src/jtag/zy1000/jtag_minidriver.h
+++ b/src/jtag/zy1000/jtag_minidriver.h
@@ -41,7 +41,7 @@ static __inline__ void waitIdle(void)
do
{
ZY1000_PEEK(ZY1000_JTAG_BASE+0x10, empty);
- } while ((empty & 0x100)==0);
+ } while ((empty & 0x100) == 0);
}
static __inline__ void waitQueue(void)
@@ -64,7 +64,7 @@ static void setCurrentState(enum tap_state state)
cyg_uint32 a;
a=state;
int repeat=0;
- if (state==TAP_RESET)
+ if (state == TAP_RESET)
{
// The FPGA nor we know the current state of the CPU TAP
// controller. This will move it to TAP for sure.
@@ -92,7 +92,7 @@ static __inline__ void shiftValueInner(const enum tap_state state, const enum ta
ZY1000_POKE(ZY1000_JTAG_BASE+0xc, value);
#if 1
#if TEST_MANUAL()
- if ((state==TAP_DRSHIFT) && (endState != TAP_DRSHIFT))
+ if ((state == TAP_DRSHIFT) && (endState != TAP_DRSHIFT))
{
int i;
setCurrentState(state);
@@ -100,7 +100,7 @@ static __inline__ void shiftValueInner(const enum tap_state state, const enum ta
{
int tms;
tms=0;
- if ((i==repeat-1) && (state != endState))
+ if ((i == repeat-1) && (state != endState))
{
tms=1;
}
@@ -124,7 +124,7 @@ static __inline__ void shiftValueInner(const enum tap_state state, const enum ta
#endif
#else
/* maximum debug version */
- if ((repeat>0) && ((state==TAP_DRSHIFT)||(state==TAP_SI)))
+ if ((repeat>0) && ((state == TAP_DRSHIFT)||(state == TAP_SI)))
{
int i;
/* sample shift register for every bit. */
@@ -160,7 +160,7 @@ static __inline__ void interface_jtag_add_dr_out_core(jtag_tap_t *target_tap,
for (tap = jtag_tap_next_enabled(NULL); tap!= NULL; tap=nextTap)
{
nextTap=jtag_tap_next_enabled(tap);
- if (nextTap==NULL)
+ if (nextTap == NULL)
{
pause_state = end_state;
}
@@ -187,14 +187,14 @@ static __inline__ void interface_jtag_add_dr_out(jtag_tap_t *target_tap,
enum tap_state end_state)
{
- int singletap=(jtag_tap_next_enabled(jtag_tap_next_enabled(NULL))==NULL);
- if ((singletap) && (num_fields==3))
+ int singletap=(jtag_tap_next_enabled(jtag_tap_next_enabled(NULL)) == NULL);
+ if ((singletap) && (num_fields == 3))
{
/* used by embeddedice_write_reg_inner() */
shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, num_bits[0], value[0]);
shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, num_bits[1], value[1]);
shiftValueInner(TAP_DRSHIFT, end_state, num_bits[2], value[2]);
- } else if ((singletap) && (num_fields==2))
+ } else if ((singletap) && (num_fields == 2))
{
/* used by arm7 code */
shiftValueInner(TAP_DRSHIFT, TAP_DRSHIFT, num_bits[0], value[0]);
diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c
index bc9e748a..079e1b99 100644
--- a/src/jtag/zy1000/zy1000.c
+++ b/src/jtag/zy1000/zy1000.c
@@ -49,7 +49,7 @@ int zy1000_handle_zy1000_port_command(struct command_context_s *cmd_ctx, char *c
static int zy1000_khz(int khz, int *jtag_speed)
{
- if (khz==0)
+ if (khz == 0)
{
*jtag_speed=0;
}
@@ -62,7 +62,7 @@ static int zy1000_khz(int khz, int *jtag_speed)
static int zy1000_speed_div(int speed, int *khz)
{
- if (speed==0)
+ if (speed == 0)
{
*khz = 0;
}
@@ -176,7 +176,7 @@ void zy1000_reset(int trst, int srst)
alive_sleep(1);
}
- if (i==1000)
+ if (i == 1000)
{
LOG_USER("SRST didn't deassert after %dms", i);
} else if (i>1)
@@ -439,7 +439,7 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_
tap_state_t pause_state;
int l;
k=num_bits-j;
- pause_state=(shiftState==TAP_DRSHIFT)?TAP_DRSHIFT:TAP_IRSHIFT;
+ pause_state=(shiftState == TAP_DRSHIFT)?TAP_DRSHIFT:TAP_IRSHIFT;
if (k>32)
{
k=32;
@@ -498,7 +498,7 @@ int interface_jtag_add_ir_scan(int num_fields, const scan_field_t *fields, tap_s
{
nextTap=jtag_tap_next_enabled(tap);
tap_state_t end_state;
- if (nextTap==NULL)
+ if (nextTap == NULL)
{
end_state = state;
} else
@@ -568,7 +568,7 @@ int interface_jtag_add_dr_scan(int num_fields, const scan_field_t *fields, tap_s
nextTap=jtag_tap_next_enabled(tap);
int found=0;
tap_state_t end_state;
- if (nextTap==NULL)
+ if (nextTap == NULL)
{
end_state = state;
} else
@@ -732,7 +732,7 @@ void embeddedice_write_dcc(jtag_tap_t *tap, int reg_addr, uint8_t *buffer, int l
{
// static int const reg_addr=0x5;
tap_state_t end_state=jtag_get_end_state();
- if (jtag_tap_next_enabled(jtag_tap_next_enabled(NULL))==NULL)
+ if (jtag_tap_next_enabled(jtag_tap_next_enabled(NULL)) == NULL)
{
/* better performance via code duplication */
if (little)