X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fflash%2Ftms470.c;h=33753d8314c0042f30e2cb9c469fd15b227efa6b;hb=f876d5e9c769a288faa7fd14b7bf373363542aab;hp=1d7497f1fdbad5c8f2106af03c4f607f5644bb10;hpb=fbcb57baf842a84898dcc1cbe9a8b56d2a0028e1;p=fw%2Fopenocd diff --git a/src/flash/tms470.c b/src/flash/tms470.c index 1d7497f1f..33753d831 100644 --- a/src/flash/tms470.c +++ b/src/flash/tms470.c @@ -28,7 +28,7 @@ static int tms470_register_commands(struct command_context_s *cmd_ctx); static int tms470_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank); static int tms470_erase(struct flash_bank_s *bank, int first, int last); static int tms470_protect(struct flash_bank_s *bank, int set, int first, int last); -static int tms470_write(struct flash_bank_s *bank, u8 * buffer, u32 offset, u32 count); +static int tms470_write(struct flash_bank_s *bank, uint8_t * buffer, u32 offset, u32 count); static int tms470_probe(struct flash_bank_s *bank); static int tms470_auto_probe(struct flash_bank_s *bank); static int tms470_erase_check(struct flash_bank_s *bank); @@ -786,11 +786,11 @@ static int tms470_erase_sector(struct flash_bank_s *bank, int sector) * clear status regiser, sent erase command, kickoff erase */ target_write_u16(target, flashAddr, 0x0040); - LOG_DEBUG("write *(u16 *)0x%08x=0x0040", flashAddr); + LOG_DEBUG("write *(uint16_t *)0x%08x=0x0040", flashAddr); target_write_u16(target, flashAddr, 0x0020); - LOG_DEBUG("write *(u16 *)0x%08x=0x0020", flashAddr); + LOG_DEBUG("write *(uint16_t *)0x%08x=0x0020", flashAddr); target_write_u16(target, flashAddr, 0xffff); - LOG_DEBUG("write *(u16 *)0x%08x=0xffff", flashAddr); + LOG_DEBUG("write *(uint16_t *)0x%08x=0xffff", flashAddr); /* * Monitor FMMSTAT, busy until clear, then check and other flags for @@ -949,7 +949,7 @@ static int tms470_protect(struct flash_bank_s *bank, int set, int first, int las /* ---------------------------------------------------------------------- */ -static int tms470_write(struct flash_bank_s *bank, u8 * buffer, u32 offset, u32 count) +static int tms470_write(struct flash_bank_s *bank, uint8_t * buffer, u32 offset, u32 count) { target_t *target = bank->target; u32 glbctrl, fmbac2, orig_fmregopt, fmbsea, fmbseb, fmmaxpp, fmmstat; @@ -994,7 +994,7 @@ static int tms470_write(struct flash_bank_s *bank, u8 * buffer, u32 offset, u32 for (i = 0; i < count; i += 2) { u32 addr = bank->base + offset + i; - u16 word = (((u16) buffer[i]) << 8) | (u16) buffer[i + 1]; + uint16_t word = (((uint16_t) buffer[i]) << 8) | (uint16_t) buffer[i + 1]; if (word != 0xffff) { @@ -1075,7 +1075,7 @@ static int tms470_erase_check(struct flash_bank_s *bank) tms470_flash_bank_t *tms470_info = bank->driver_priv; int sector, result = ERROR_OK; u32 fmmac2, fmbac2, glbctrl, orig_fmregopt; - static u8 buffer[64 * 1024]; + static uint8_t buffer[64 * 1024]; if (target->state != TARGET_HALTED) {