]> git.sur5r.net Git - openocd/blobdiff - src/flash/tms470.c
Author: Raúl Sánchez Siles <rsanchezs@infoglobal.es>
[openocd] / src / flash / tms470.c
index 6a6d830bb39bea7f29c758654ad7f4776674e601..1d7497f1fdbad5c8f2106af03c4f607f5644bb10 100644 (file)
 #include "config.h"
 #endif
 
-#include "log.h"
 #include "tms470.h"
-#include <string.h>
-#include <unistd.h>
+
 
 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);
@@ -196,7 +194,7 @@ static int tms470_read_part_info(struct flash_bank_s *bank)
        case 0x2b:
                part_name = "TMS470R1A288";
 
-               if ((bank->base >= 0x00000000) && (bank->base < 0x00008000))
+               if (bank->base < 0x00008000)
                {
                        tms470_info->ordinal = 0;
                        bank->base = 0x00000000;
@@ -232,7 +230,7 @@ static int tms470_read_part_info(struct flash_bank_s *bank)
        case 0x2d:
                part_name = "TMS470R1A384";
 
-               if ((bank->base >= 0x00000000) && (bank->base < 0x00020000))
+               if (bank->base < 0x00020000)
                {
                        tms470_info->ordinal = 0;
                        bank->base = 0x00000000;
@@ -955,7 +953,8 @@ static int tms470_write(struct flash_bank_s *bank, u8 * buffer, u32 offset, u32
 {
        target_t *target = bank->target;
        u32 glbctrl, fmbac2, orig_fmregopt, fmbsea, fmbseb, fmmaxpp, fmmstat;
-       int i, result = ERROR_OK;
+       int result = ERROR_OK;
+       u32 i;
 
        if (target->state != TARGET_HALTED)
        {