diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index ac37ee4b..b36b3860 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,3 +1,10 @@ +2011-06-30 Mike Frysinger + + * include/urjtag/bfin.h (bfin_part_data.emu_oab): Constify. + (bfin_emu_oab): Delete external decl. + * src/bfin/bfin-part-bfin.c (bfin_emu_oab): Constify & localize. + * src/bfin/bfin.c (bfin_emu_wait_ts): Constify. + 2011-07-01 Jie Zhang * src/lib/ansidecl.h: Move to include. diff --git a/urjtag/include/urjtag/bfin.h b/urjtag/include/urjtag/bfin.h index 20ce5f5a..a659df7e 100644 --- a/urjtag/include/urjtag/bfin.h +++ b/urjtag/include/urjtag/bfin.h @@ -129,7 +129,7 @@ struct emu_oab struct bfin_part_data { int bypass; - struct emu_oab *emu_oab; + const struct emu_oab *emu_oab; int scan; uint16_t dbgctl; uint16_t dbgstat; @@ -155,9 +155,6 @@ struct bfin_part_data #define BFIN_PART_EMUPC(part) (((struct bfin_part_data *)((part)->params->data))->emupc) #define BFIN_PART_EMUPC_ORIG(part) (((struct bfin_part_data *)((part)->params->data))->emupc_orig) -extern struct emu_oab bfin_emu_oab; - - #define IDCODE_SCAN 0 #define DBGSTAT_SCAN 1 #define DBGCTL_SCAN 2 diff --git a/urjtag/src/bfin/bfin-part-bfin.c b/urjtag/src/bfin/bfin-part-bfin.c index c957cf33..a7df46f4 100644 --- a/urjtag/src/bfin/bfin-part-bfin.c +++ b/urjtag/src/bfin/bfin-part-bfin.c @@ -152,7 +152,7 @@ bfin_test_command (urj_part_t *part, uint32_t addr, int w, } } -struct emu_oab bfin_emu_oab = +static const struct emu_oab bfin_emu_oab = { bfin_dbgctl_init, bfin_dbgstat_value, diff --git a/urjtag/src/bfin/bfin.c b/urjtag/src/bfin/bfin.c index e81524aa..c14d6057 100644 --- a/urjtag/src/bfin/bfin.c +++ b/urjtag/src/bfin/bfin.c @@ -50,7 +50,7 @@ const char * const scans[] = { int bfin_check_emuready = 1; int bfin_wait_clocks = -1; -static struct timespec bfin_emu_wait_ts = {0, 5000000}; +static const struct timespec bfin_emu_wait_ts = {0, 5000000}; static int