armv7a: make local functions static
[openocd.git] / src / target / dsp5680xx.c
index e56861e4cea651c0a31b336b03abdd501f40597f..116f609d7e67ed6a533d9ccc84bc587a53906174 100644 (file)
@@ -450,7 +450,7 @@ static int eonce_exit_debug_mode(struct target * target,uint8_t * eonce_status){
   return retval;
 }
 
-int switch_tap(struct target * target, struct jtag_tap * master_tap,struct jtag_tap * core_tap){
+static int switch_tap(struct target * target, struct jtag_tap * master_tap,struct jtag_tap * core_tap){
   int retval = ERROR_OK;
   uint32_t instr;
   uint32_t ir_out;//not used, just to make jtag happy.
@@ -582,11 +582,11 @@ static int eonce_enter_debug_mode(struct target * target, uint16_t * eonce_statu
   instr = MASTER_TAP_CMD_IDCODE;
   retval =  dsp5680xx_irscan(target, & instr, & ir_out,DSP5680XX_JTAG_MASTER_TAP_IRLEN);
   err_check_propagate(retval);
-  usleep(TIME_DIV_FREESCALE*100*1000);
+  jtag_add_sleep(TIME_DIV_FREESCALE*100*1000);
 
   // Enable EOnCE module
   jtag_add_reset(0,1);
-  usleep(TIME_DIV_FREESCALE*200*1000);
+  jtag_add_sleep(TIME_DIV_FREESCALE*200*1000);
   instr = 0x0606ffff;// This was selected experimentally.
   retval =  dsp5680xx_drscan(target,(uint8_t *) & instr,(uint8_t *) & ir_out,32);
   err_check_propagate(retval);
@@ -608,9 +608,9 @@ static int eonce_enter_debug_mode(struct target * target, uint16_t * eonce_statu
   retval = dsp5680xx_drscan(target,(uint8_t *) & instr_16,(uint8_t *) & read_16,8);
   instr_16 = 0x20;
   retval = dsp5680xx_drscan(target,(uint8_t *) & instr_16,(uint8_t *) & read_16,8);
-  usleep(TIME_DIV_FREESCALE*100*1000);
+  jtag_add_sleep(TIME_DIV_FREESCALE*100*1000);
   jtag_add_reset(0,0);
-  usleep(TIME_DIV_FREESCALE*300*1000);
+  jtag_add_sleep(TIME_DIV_FREESCALE*300*1000);
 
   instr = JTAG_INSTR_ENABLE_ONCE;
   //Two rounds of jtag 0x6  (enable eonce) to enable EOnCE.
@@ -1600,7 +1600,7 @@ int dsp5680xx_f_wr(struct target * target, uint8_t *buffer, uint32_t address, ui
 }
 
 // Reset state machine
-int reset_jtag(void){
+static int reset_jtag(void){
   int retval;
   tap_state_t states[2];
   const char *cp = "RESET";
@@ -1640,11 +1640,11 @@ int dsp5680xx_f_unlock(struct target * target){
   }
 
   jtag_add_reset(0,1);
-  usleep(TIME_DIV_FREESCALE*200*1000);
+  jtag_add_sleep(TIME_DIV_FREESCALE*200*1000);
 
   retval = reset_jtag();
   err_check(retval,"Failed to reset JTAG state machine");
-  usleep(150);
+  jtag_add_sleep(150);
 
   // Enable core tap
   tap_chp->enabled = true;
@@ -1654,9 +1654,9 @@ int dsp5680xx_f_unlock(struct target * target){
   instr = JTAG_INSTR_DEBUG_REQUEST;
   retval =  dsp5680xx_irscan(target, & instr, & ir_out,DSP5680XX_JTAG_CORE_TAP_IRLEN);
   err_check_propagate(retval);
-  usleep(TIME_DIV_FREESCALE*100*1000);
+  jtag_add_sleep(TIME_DIV_FREESCALE*100*1000);
   jtag_add_reset(0,0);
-  usleep(TIME_DIV_FREESCALE*300*1000);
+  jtag_add_sleep(TIME_DIV_FREESCALE*300*1000);
 
   // Enable master tap
   tap_chp->enabled = false;
@@ -1672,13 +1672,13 @@ int dsp5680xx_f_unlock(struct target * target){
   retval =  dsp5680xx_drscan(target,(uint8_t *) & instr,(uint8_t *) & ir_out,16);
   err_check_propagate(retval);
 
-  usleep(TIME_DIV_FREESCALE*150*1000);
+  jtag_add_sleep(TIME_DIV_FREESCALE*150*1000);
   jtag_add_reset(0,1);
-  usleep(TIME_DIV_FREESCALE*200*1000);
+  jtag_add_sleep(TIME_DIV_FREESCALE*200*1000);
 
   retval = reset_jtag();
   err_check(retval,"Failed to reset JTAG state machine");
-  usleep(150);
+  jtag_add_sleep(150);
 
   instr = 0x0606ffff;
   retval =  dsp5680xx_drscan(target,(uint8_t *) & instr,(uint8_t *) & ir_out,32);
@@ -1706,9 +1706,9 @@ int dsp5680xx_f_unlock(struct target * target){
   retval = dsp5680xx_drscan(target,(uint8_t *) & instr_16,(uint8_t *) & read_16,8);
   instr_16 = 0x20;
   retval = dsp5680xx_drscan(target,(uint8_t *) & instr_16,(uint8_t *) & read_16,8);
-  usleep(TIME_DIV_FREESCALE*100*1000);
+  jtag_add_sleep(TIME_DIV_FREESCALE*100*1000);
   jtag_add_reset(0,0);
-  usleep(TIME_DIV_FREESCALE*300*1000);
+  jtag_add_sleep(TIME_DIV_FREESCALE*300*1000);
   return retval;
 }
 
@@ -1719,13 +1719,13 @@ int dsp5680xx_f_lock(struct target * target){
   err_check_propagate(retval);
 
   jtag_add_reset(0,1);
-  usleep(TIME_DIV_FREESCALE*200*1000);
+  jtag_add_sleep(TIME_DIV_FREESCALE*200*1000);
 
   retval = reset_jtag();
   err_check(retval,"Failed to reset JTAG state machine");
-  usleep(TIME_DIV_FREESCALE*100*1000);
+  jtag_add_sleep(TIME_DIV_FREESCALE*100*1000);
   jtag_add_reset(0,0);
-  usleep(TIME_DIV_FREESCALE*300*1000);
+  jtag_add_sleep(TIME_DIV_FREESCALE*300*1000);
 
   return retval;
 }

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)