X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Fdsp5680xx.c;fp=src%2Ftarget%2Fdsp5680xx.c;h=62844ea3b74c2ed5d138fabcd9daffe099476dae;hp=ec07c2519da6ef5c1969181d526af1d58f8b22f5;hb=7e64e5a895ecd9bf25c5d2b39ff3119dafa30489;hpb=4cf5ab614bd830355065bb9400acf5484dc3f2c3 diff --git a/src/target/dsp5680xx.c b/src/target/dsp5680xx.c index ec07c2519d..62844ea3b7 100644 --- a/src/target/dsp5680xx.c +++ b/src/target/dsp5680xx.c @@ -1410,27 +1410,21 @@ static int dsp5680xx_write_32(struct target *t, uint32_t a, uint32_t c, * P: (program) memory or X: (dat) memory. * * @param target - * @param address + * @param a address * @param size Bytes (1), Half words (2), Words (4). * @param count In bytes. - * @param buffer + * @param b buffer * * @return */ -static int dsp5680xx_write(struct target *t, target_addr_t a, uint32_t s, uint32_t c, +static int dsp5680xx_write(struct target *target, target_addr_t a, uint32_t size, uint32_t count, const uint8_t *b) { /* TODO Cannot write 32bit to odd address, will write 0x12345678 as 0x5678 0x0012 */ - struct target *target = t; - uint32_t address = a; - uint32_t count = c; - uint8_t const *buffer = b; - uint32_t size = s; - check_halt_and_debug(target); int retval = 0; @@ -1479,12 +1473,12 @@ static int dsp5680xx_write_buffer(struct target *t, target_addr_t a, uint32_t si * * @return */ -static int dsp5680xx_read_buffer(struct target *t, target_addr_t a, uint32_t size, - uint8_t *buf) +static int dsp5680xx_read_buffer(struct target *target, target_addr_t address, uint32_t size, + uint8_t *buffer) { - check_halt_and_debug(t); + check_halt_and_debug(target); /* The "/2" solves the byte/word addressing issue.*/ - return dsp5680xx_read(t, a, 2, size / 2, buf); + return dsp5680xx_read(target, address, 2, size / 2, buffer); } /** @@ -1499,19 +1493,19 @@ static int dsp5680xx_read_buffer(struct target *t, target_addr_t a, uint32_t siz * * @return */ -static int dsp5680xx_checksum_memory(struct target *t, target_addr_t a, uint32_t s, +static int dsp5680xx_checksum_memory(struct target *target, target_addr_t address, uint32_t size, uint32_t *checksum) { return ERROR_FAIL; } /** - * Calculates a signature over @a word_count words in the data from @a buff16. + * Calculates a signature over @a word_count words in the data from @a buff8. * The algorithm used is the same the FM uses, so the @a 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 buff8 * @param word_count * * @return @@ -1609,7 +1603,7 @@ int dsp5680xx_f_protect_check(struct target *target, uint16_t *protected) * Some commands use the parameters @a address and @a data, others ignore them. * * @param target - * @param command Command to execute. + * @param c Command to execute. * @param address Command parameter. * @param data Command parameter. * @param hfm_ustat FM status register. @@ -1617,21 +1611,10 @@ int dsp5680xx_f_protect_check(struct target *target, uint16_t *protected) * * @return */ -static int dsp5680xx_f_ex(struct target *t, uint16_t c, uint32_t a, uint32_t d, - uint16_t *h, int p) +static int dsp5680xx_f_ex(struct target *target, uint16_t c, uint32_t address, uint32_t data, + uint16_t *hfm_ustat, int pmem) { - struct target *target = t; - uint32_t command = c; - - uint32_t address = a; - - uint32_t data = d; - - uint16_t *hfm_ustat = h; - - int pmem = p; - int retval; retval = core_load_TX_RX_high_addr_to_r0(target); @@ -1799,13 +1782,9 @@ static int set_fm_ck_div(struct target *target) * * @return */ -static int dsp5680xx_f_signature(struct target *t, uint32_t a, uint32_t words, +static int dsp5680xx_f_signature(struct target *target, uint32_t address, uint32_t words, uint16_t *signature) { - struct target *target = t; - - uint32_t address = a; - int retval; uint16_t hfm_ustat;