removed trailing whitespaces
authorRodrigo L. Rosa <rodrigorosa.LG@gmail.com>
Wed, 31 Aug 2011 04:14:33 +0000 (21:14 -0700)
committerRodrigo L. Rosa <rodrigorosa.LG@gmail.com>
Wed, 31 Aug 2011 04:16:46 +0000 (21:16 -0700)
emacs is awesome.
replace-regexp RET [ ]+$ RET RET
and it's done

src/target/dsp5680xx.c

index ce729afd4efbbbc780c38d20350e75e0d800d9d4..4d2ae497bcb76fd865a4cfca76abfdaa6deaf07b 100644 (file)
@@ -147,17 +147,17 @@ static int jtag_data_write(struct target * target, uint32_t instr,int num_bits,
 #define jtag_data_write24(target,instr,data_read) jtag_data_write(target,instr,24,data_read)
 #define jtag_data_write32(target,instr,data_read) jtag_data_write(target,instr,32,data_read)
 
-/** 
+/**
  * Executes EOnCE instruction.
- * 
- * @param target 
+ *
+ * @param target
  * @param instr Instruction to execute.
- * @param rw 
- * @param go 
- * @param ex 
+ * @param rw
+ * @param go
+ * @param ex
  * @param eonce_status Value read from the EOnCE status register.
- * 
- * @return 
+ *
+ * @return
  */
 static int eonce_instruction_exec_single(struct target * target, uint8_t instr, uint8_t rw, uint8_t go, uint8_t ex,uint8_t * eonce_status){
   int retval;
@@ -435,13 +435,13 @@ static int eonce_read_status_reg(struct target * target, uint16_t * data){
   return retval;
 }
 
-/** 
+/**
  * Takes the core out of debug mode.
- * 
- * @param target 
+ *
+ * @param target
  * @param eonce_status Data read from the EOnCE status register.
- * 
- * @return 
+ *
+ * @return
  */
 static int eonce_exit_debug_mode(struct target * target,uint8_t * eonce_status){
   int retval;
@@ -496,13 +496,13 @@ int switch_tap(struct target * target, struct jtag_tap * master_tap,struct jtag_
 }
 
 #define TIME_DIV_FREESCALE 0.3
-/** 
+/**
  * Puts the core into debug mode, enabling the EOnCE module.
- * 
- * @param target 
+ *
+ * @param target
  * @param eonce_status Data read from the EOnCE status register.
- * 
- * @return 
+ *
+ * @return
  */
 static int eonce_enter_debug_mode(struct target * target, uint16_t * eonce_status){
   int retval = ERROR_OK;
@@ -592,7 +592,7 @@ static int eonce_enter_debug_mode(struct target * target, uint16_t * eonce_statu
   return retval;
 }
 
-/** 
+/**
  * Puts the core into debug mode, enabling the EOnCE module.
  * This will not always work, eonce_enter_debug_mode executes much
  * more complicated routine, which is guaranteed to work, but requires
@@ -600,11 +600,11 @@ static int eonce_enter_debug_mode(struct target * target, uint16_t * eonce_statu
  * after a reset clock divisors must be set again.
  * This implementation works most of the time, and is not accesible to the
  * user.
- * 
- * @param target 
+ *
+ * @param target
  * @param eonce_status Data read from the EOnCE status register.
- * 
- * @return 
+ *
+ * @return
  */
 static int eonce_enter_debug_mode_without_reset(struct target * target, uint16_t * eonce_status){
   int retval;
@@ -638,12 +638,12 @@ static int eonce_enter_debug_mode_without_reset(struct target * target, uint16_t
   return ERROR_OK;
 }
 
-/** 
+/**
  * Reads the current value of the program counter and stores it.
- * 
- * @param target 
- * 
- * @return 
+ *
+ * @param target
+ *
+ * @return
  */
 static int eonce_pc_store(struct target * target){
   uint8_t tmp[2];
@@ -803,14 +803,14 @@ static int dsp5680xx_resume(struct target *target, int current, uint32_t address
 
 
 
-/** 
+/**
  * The value of @address determines if it corresponds to P: (program) or X: (data) memory. If the address is over 0x200000 then it is considered X: memory, and @pmem = 0.
  * The special case of 0xFFXXXX is not modified, since it allows to read out the memory mapped EOnCE registers.
- * 
- * @param address 
- * @param pmem 
- * 
- * @return 
+ *
+ * @param address
+ * @param pmem
+ *
+ * @return
  */
 static int dsp5680xx_convert_address(uint32_t * address, int * pmem){
   // Distinguish data memory (x:) from program memory (p:) by the address.
@@ -1051,17 +1051,17 @@ static int dsp5680xx_write_32(struct target * target, uint32_t address, uint32_t
   return retval;
 }
 
-/** 
+/**
  * Writes @buffer to memory.
  * The parameter @address determines whether @buffer should be written to P: (program) memory or X: (data) memory.
- * 
- * @param target 
+ *
+ * @param target
  * @param address
  * @param size Bytes (1), Half words (2), Words (4).
  * @param count In bytes.
- * @param buffer 
- * 
- * @return 
+ * @param buffer
+ *
+ * @return
  */
 static int dsp5680xx_write(struct target *target, uint32_t address, uint32_t size, uint32_t count, const uint8_t * buffer){
   //TODO Cannot write 32bit to odd address, will write 0x12345678  as 0x5678 0x0012
@@ -1105,15 +1105,15 @@ static int dsp5680xx_write_buffer(struct target * target, uint32_t address, uint
   return dsp5680xx_write(target, address, 1, size, buffer);
 }
 
-/** 
+/**
  * This function is called by verify_image, it is used to read data from memory.
- * 
- * @param target 
+ *
+ * @param target
  * @param address Word addressing.
  * @param size In bytes.
- * @param buffer 
- * 
- * @return 
+ * @param buffer
+ *
+ * @return
  */
 static int dsp5680xx_read_buffer(struct target * target, uint32_t address, uint32_t size, uint8_t * buffer){
   if(target->state != TARGET_HALTED){
@@ -1124,29 +1124,29 @@ static int dsp5680xx_read_buffer(struct target * target, uint32_t address, uint3
   return dsp5680xx_read(target,address,2,size/2,buffer);
 }
 
-/** 
+/**
  * This function is not implemented.
  * It returns an error in order to get OpenOCD to do read out the data and calculate the CRC, or try a binary comparison.
- * 
- * @param target 
+ *
+ * @param target
  * @param address Start address of the image.
  * @param size In bytes.
- * @param checksum 
- * 
- * @return 
+ * @param checksum
+ *
+ * @return
  */
 static int dsp5680xx_checksum_memory(struct target * target, uint32_t address, uint32_t size, uint32_t * checksum){
   return ERROR_FAIL;
 }
 
-/** 
+/**
  * Calculates a signature over @word_count words in the data from @buff16. The algorithm used is the same the FM uses, so the @return may be used to compare with the one generated by the FM module, and check if flashing was successful.
  * This algorithm is based on the perl script available from the Freescale website at FAQ 25630.
- * 
- * @param buff16 
- * @param word_count 
- * 
- * @return 
+ *
+ * @param buff16
+ * @param word_count
+ *
+ * @return
  */
 static int perl_crc(uint8_t * buff8,uint32_t  word_count){
   uint16_t checksum = 0xffff;
@@ -1166,12 +1166,12 @@ static int perl_crc(uint8_t * buff8,uint32_t  word_count){
   return checksum;
 }
 
-/** 
+/**
  * Resets the SIM. (System Integration Module).
- * 
- * @param target 
- * 
- * @return 
+ *
+ * @param target
+ *
+ * @return
  */
 int dsp5680xx_f_SIM_reset(struct target * target){
   int retval = ERROR_OK;
@@ -1185,12 +1185,12 @@ int dsp5680xx_f_SIM_reset(struct target * target){
   return retval;
 }
 
-/** 
+/**
  * Halts the core and resets the SIM. (System Integration Module).
- * 
- * @param target 
- * 
- * @return 
+ *
+ * @param target
+ *
+ * @return
  */
 static int dsp5680xx_soft_reset_halt(struct target *target){
   //TODO is this what this function is expected to do...?
@@ -1216,17 +1216,17 @@ int dsp5680xx_f_protect_check(struct target * target, uint16_t * protected) {
   return retval;
 }
 
-/** 
+/**
  * Executes a command on the FM module. Some commands use the parameters @address and @data, others ignore them.
- * 
- * @param target 
+ *
+ * @param target
  * @param command Command to execute.
  * @param address Command parameter.
  * @param data Command parameter.
  * @param hfm_ustat FM status register.
  * @param pmem Address is P: (program) memory (@pmem==1) or X: (data) memory (@pmem==0)
- * 
- * @return 
+ *
+ * @return
  */
 static int dsp5680xx_f_execute_command(struct target * target, uint16_t command, uint32_t address, uint32_t data, uint16_t * hfm_ustat, int pmem){
   int retval;
@@ -1304,12 +1304,12 @@ static int dsp5680xx_f_execute_command(struct target * target, uint16_t command,
   return ERROR_OK;
 }
 
-/** 
- * Prior to the execution of any Flash module command, the Flash module Clock Divider (CLKDIV) register must be initialized. The values of this register determine the speed of the internal Flash Clock (FCLK). FCLK must be in the range of 150kHz ≤ FCLK ≤ 200kHz for proper operation of the Flash module. (Running FCLK too slowly wears out the module, while running it too fast under programs Flash leading to bit errors.) 
- * 
- * @param target 
- * 
- * @return 
+/**
+ * Prior to the execution of any Flash module command, the Flash module Clock Divider (CLKDIV) register must be initialized. The values of this register determine the speed of the internal Flash Clock (FCLK). FCLK must be in the range of 150kHz ≤ FCLK ≤ 200kHz for proper operation of the Flash module. (Running FCLK too slowly wears out the module, while running it too fast under programs Flash leading to bit errors.)
+ *
+ * @param target
+ *
+ * @return
  */
 static int set_fm_ck_div(struct target * target){
   uint8_t i[2];
@@ -1349,15 +1349,15 @@ static int set_fm_ck_div(struct target * target){
   return ERROR_OK;
 }
 
-/** 
+/**
  * Executes the FM calculate signature command. The FM will calculate over the data from @address to @address + @words -1. The result is written to a register, then read out by this function and returned in @signature. The value @signature may be compared to the the one returned by perl_crc to verify the flash was written correctly.
- * 
- * @param target 
+ *
+ * @param target
  * @param address Start of flash array where the signature should be calculated.
  * @param words Number of words over which the signature should be calculated.
  * @param signature Value calculated by the FM.
- * 
- * @return 
+ *
+ * @return
  */
 static int dsp5680xx_f_signature(struct target * target, uint32_t address, uint32_t words, uint16_t * signature){
   int retval;
@@ -1389,14 +1389,14 @@ int dsp5680xx_f_erase_check(struct target * target, uint8_t * erased,uint32_t se
   return retval;
 }
 
-/** 
+/**
  * Executes the FM page erase command.
- * 
- * @param target 
+ *
+ * @param target
  * @param sector Page to erase.
  * @param hfm_ustat FM module status register.
- * 
- * @return 
+ *
+ * @return
  */
 static int erase_sector(struct target * target, int sector, uint16_t * hfm_ustat){
   int retval;
@@ -1405,13 +1405,13 @@ static int erase_sector(struct target * target, int sector, uint16_t * hfm_ustat
   return retval;
 }
 
-/** 
+/**
  * Executes the FM mass erase command. Erases the flash array completely.
- * 
- * @param target 
+ *
+ * @param target
  * @param hfm_ustat FM module status register.
- * 
- * @return 
+ *
+ * @return
  */
 static int mass_erase(struct target * target, uint16_t * hfm_ustat){
   int retval;
@@ -1633,10 +1633,10 @@ int dsp5680xx_f_unlock(struct target * target){
   if(retval == ERROR_OK){
     LOG_WARNING("Memory was not locked.");
   }
-  
+
   jtag_add_reset(0,1);
   usleep(TIME_DIV_FREESCALE*200*1000);
-  
+
   retval = reset_jtag();
   err_check(retval,"Failed to reset JTAG state machine");
   usleep(150);

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)