From: Øyvind H. <go...@us...> - 2010-04-12 16:59:36
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via a8a9eddca0f8f5d8ab73f22c5a159fe1748272d5 (commit) via 41cb9118536db5e5e2836ad6c75daae1d21b6f4a (commit) via f549dadb858cbf1bff1b3369dbdb2cc7d8f083a4 (commit) via 689fa8ad8c9bf40a98bd09303c80b67f72b7ac1f (commit) via da741a51f2dadc66db450a2f44c7c64c886e977a (commit) via f1be0e6af2e204805a8bc2e8cadf828b9fa46c98 (commit) via 2ea78551ab3388032ad78cdeefac7ab75e3bb134 (commit) via 4809dbb2d7aa3b949a555876aad945d3916a8c87 (commit) via 11fd673f0c315346ef065289b164da58dd1fd4c6 (commit) via b2495c010148b8343f8f70f6ee558f505a2c7409 (commit) via 787a5067fbe0eaf05ad2f41a64c3eac776905724 (commit) via fdb9199001080e2d268da77f97365ab7b7f138d2 (commit) via d7246f452f4da9767e9ebdd6fb43b982954c02bf (commit) via c936cb334b9e60c3326675912c97faafb379d3ed (commit) via 5926b5a94fd4e29e0e020c2f87b542fd51bd5d6f (commit) via a6307fed9100877df2def268acece81078e06d6f (commit) via 617811ac664504303cf65a69c1b3f8ca262def0b (commit) via aaf848596c13f26026bcbd1071f7614e818ea766 (commit) via 9acd453d9f1d7d9ef90343f84ffc43ce6e1b434d (commit) via 069f88cfac1199657a7e4c9988b0bc86eca99ac9 (commit) via 300f0f53c54fab5dd994a8bc42edbdc6115ef7b9 (commit) via 402d3292bbd6e04ffefb1bdf7ab61f3bfc36c44a (commit) via 61c06359915cbaef5b8538d2600ecbc17d4b387c (commit) via 0c82bea44acf491164c96efd88c1a831fbf6ce67 (commit) via c0b5ca6d17273aff849bc6546c7388562b751225 (commit) via b2468e3c4f09cd4e9f204aeb885dfdbbeb0a8dbb (commit) via 46781080347af4f207cec108dfc2f96da61dcbfa (commit) via ec1c90e3cd53446939b4655f55166bff6b3d39f4 (commit) via 8ffdefcc59ee0a8d305ac5a9f28b38ad89dea7c5 (commit) via de27d28df90ab3ed190b55ffa4d2a2cbf491732c (commit) via 8a871560f99779b279623540588f7295fe041781 (commit) via 4a1bd5b80603f73593fd7094d7da41ff72130461 (commit) via 0f3bbcf09683904c1f21b6961cbb0f36b07043c0 (commit) via 263b4b9057b4e34eec8b39c4f165d370cb51a9e3 (commit) via 3f0b17e48af9e3481084e1e9e697012b6824df43 (commit) via 321aa6aa8fe9f6c07649776722a341bbfda028ee (commit) via 81fab96c0d0da02e8debc07079d5f6fe699dff45 (commit) from 2a17fd9f9b51516a830ba4b3ae2f2284929ff266 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a8a9eddca0f8f5d8ab73f22c5a159fe1748272d5 Author: Antonio Borneo <bor...@gm...> Date: Sun Apr 11 01:31:42 2010 +0800 TARGET/ARM7_9_COMMON: review scope of symbols Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index 8f63f3c..9f1bb2e 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -184,7 +184,7 @@ static int arm7_9_set_software_breakpoints(struct arm7_9_common *arm7_9) * @param target Pointer to an ARM7/9 target to setup * @return Result of clearing the watchpoints on the target */ -int arm7_9_setup(struct target *target) +static int arm7_9_setup(struct target *target) { struct arm7_9_common *arm7_9 = target_to_arm7_9(target); @@ -202,7 +202,7 @@ int arm7_9_setup(struct target *target) * queue. For software breakpoints, this will be the status of the * required memory reads and writes */ -int arm7_9_set_breakpoint(struct target *target, struct breakpoint *breakpoint) +static int arm7_9_set_breakpoint(struct target *target, struct breakpoint *breakpoint) { struct arm7_9_common *arm7_9 = target_to_arm7_9(target); int retval = ERROR_OK; @@ -331,7 +331,7 @@ int arm7_9_set_breakpoint(struct target *target, struct breakpoint *breakpoint) * queue. For software breakpoints, this will be the status of the * required memory reads and writes */ -int arm7_9_unset_breakpoint(struct target *target, struct breakpoint *breakpoint) +static int arm7_9_unset_breakpoint(struct target *target, struct breakpoint *breakpoint) { int retval = ERROR_OK; struct arm7_9_common *arm7_9 = target_to_arm7_9(target); @@ -506,7 +506,7 @@ int arm7_9_remove_breakpoint(struct target *target, struct breakpoint *breakpoin * @return Error status if watchpoint set fails or the result of executing the * JTAG queue */ -int arm7_9_set_watchpoint(struct target *target, struct watchpoint *watchpoint) +static int arm7_9_set_watchpoint(struct target *target, struct watchpoint *watchpoint) { int retval = ERROR_OK; struct arm7_9_common *arm7_9 = target_to_arm7_9(target); @@ -577,7 +577,7 @@ int arm7_9_set_watchpoint(struct target *target, struct watchpoint *watchpoint) * @return Error status while trying to unset the watchpoint or the result of * executing the JTAG queue */ -int arm7_9_unset_watchpoint(struct target *target, struct watchpoint *watchpoint) +static int arm7_9_unset_watchpoint(struct target *target, struct watchpoint *watchpoint) { int retval = ERROR_OK; struct arm7_9_common *arm7_9 = target_to_arm7_9(target); @@ -729,7 +729,7 @@ int arm7_9_execute_sys_speed(struct target *target) * @param target Pointer to the target to issue commands to * @return Always ERROR_OK */ -int arm7_9_execute_fast_sys_speed(struct target *target) +static int arm7_9_execute_fast_sys_speed(struct target *target) { static int set = 0; static uint8_t check_value[4], check_mask[4]; @@ -804,7 +804,7 @@ int arm7_9_target_request_data(struct target *target, uint32_t size, uint8_t *bu * @return ERROR_OK unless there are issues with the JTAG queue or when reading * from the Embedded ICE unit */ -int arm7_9_handle_target_request(void *priv) +static int arm7_9_handle_target_request(void *priv) { int retval = ERROR_OK; struct target *target = priv; @@ -1095,7 +1095,7 @@ int arm7_9_deassert_reset(struct target *target) * @param target Pointer to the ARM7/9 target to have halt cleared * @return Always ERROR_OK */ -int arm7_9_clear_halt(struct target *target) +static int arm7_9_clear_halt(struct target *target) { struct arm7_9_common *arm7_9 = target_to_arm7_9(target); struct reg *dbg_ctrl = &arm7_9->eice_cache->reg_list[EICE_DBG_CTRL]; @@ -1483,7 +1483,7 @@ static int arm7_9_debug_entry(struct target *target) * @return Error if the target is not halted, has an invalid core mode, or if * the JTAG queue fails to execute */ -int arm7_9_full_context(struct target *target) +static int arm7_9_full_context(struct target *target) { int i; int retval; @@ -1579,7 +1579,7 @@ int arm7_9_full_context(struct target *target) * @return Error status if the target is not halted or the core mode in the * armv4_5 struct is invalid. */ -int arm7_9_restore_context(struct target *target) +static int arm7_9_restore_context(struct target *target) { struct arm7_9_common *arm7_9 = target_to_arm7_9(target); struct arm *armv4_5 = &arm7_9->armv4_5_common; @@ -1735,7 +1735,7 @@ int arm7_9_restore_context(struct target *target) * @param target Pointer to the ARM7/9 target to be restarted * @return Result of executing the JTAG queue */ -int arm7_9_restart_core(struct target *target) +static int arm7_9_restart_core(struct target *target) { struct arm7_9_common *arm7_9 = target_to_arm7_9(target); struct arm_jtag *jtag_info = &arm7_9->jtag_info; @@ -1757,7 +1757,7 @@ int arm7_9_restart_core(struct target *target) * * @param target Pointer to the ARM7/9 target to enable watchpoints on */ -void arm7_9_enable_watchpoints(struct target *target) +static void arm7_9_enable_watchpoints(struct target *target) { struct watchpoint *watchpoint = target->watchpoints; @@ -1775,7 +1775,7 @@ void arm7_9_enable_watchpoints(struct target *target) * * @param target Pointer to the ARM7/9 target to enable breakpoints on */ -void arm7_9_enable_breakpoints(struct target *target) +static void arm7_9_enable_breakpoints(struct target *target) { struct breakpoint *breakpoint = target->breakpoints; @@ -2828,7 +2828,7 @@ COMMAND_HANDLER(handle_arm7_9_dcc_downloads_command) return ERROR_OK; } -int arm7_9_setup_semihosting(struct target *target, int enable) +static int arm7_9_setup_semihosting(struct target *target, int enable) { struct arm7_9_common *arm7_9 = target_to_arm7_9(target); diff --git a/src/target/arm7_9_common.h b/src/target/arm7_9_common.h index 71f9a9d..a741c59 100644 --- a/src/target/arm7_9_common.h +++ b/src/target/arm7_9_common.h @@ -123,7 +123,6 @@ int arm7_9_poll(struct target *target); int arm7_9_target_request_data(struct target *target, uint32_t size, uint8_t *buffer); -int arm7_9_setup(struct target *target); int arm7_9_assert_reset(struct target *target); int arm7_9_deassert_reset(struct target *target); int arm7_9_reset_request_halt(struct target *target); @@ -132,8 +131,6 @@ int arm7_9_soft_reset_halt(struct target *target); int arm7_9_prepare_reset_halt(struct target *target); int arm7_9_halt(struct target *target); -int arm7_9_full_context(struct target *target); -int arm7_9_restore_context(struct target *target); int arm7_9_resume(struct target *target, int current, uint32_t address, int handle_breakpoints, int debug_execution); int arm7_9_step(struct target *target, int current, uint32_t address, int handle_breakpoints); int arm7_9_read_memory(struct target *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer); commit 41cb9118536db5e5e2836ad6c75daae1d21b6f4a Author: Antonio Borneo <bor...@gm...> Date: Sun Apr 11 01:19:41 2010 +0800 NOR/TMS470: review scope of symbols Add "static" qualifier to private functions and data. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/tms470.c b/src/flash/nor/tms470.c index af635d4..edb43af 100644 --- a/src/flash/nor/tms470.c +++ b/src/flash/nor/tms470.c @@ -29,7 +29,7 @@ Internal Support, Helpers ---------------------------------------------------------------------- */ -const struct flash_sector TMS470R1A256_SECTORS[] = { +static const struct flash_sector TMS470R1A256_SECTORS[] = { {0x00000000, 0x00002000, -1, -1}, {0x00002000, 0x00002000, -1, -1}, {0x00004000, 0x00002000, -1, -1}, @@ -49,7 +49,7 @@ const struct flash_sector TMS470R1A256_SECTORS[] = { #define TMS470R1A256_NUM_SECTORS \ ARRAY_SIZE(TMS470R1A256_SECTORS) -const struct flash_sector TMS470R1A288_BANK0_SECTORS[] = { +static const struct flash_sector TMS470R1A288_BANK0_SECTORS[] = { {0x00000000, 0x00002000, -1, -1}, {0x00002000, 0x00002000, -1, -1}, {0x00004000, 0x00002000, -1, -1}, @@ -59,7 +59,7 @@ const struct flash_sector TMS470R1A288_BANK0_SECTORS[] = { #define TMS470R1A288_BANK0_NUM_SECTORS \ ARRAY_SIZE(TMS470R1A288_BANK0_SECTORS) -const struct flash_sector TMS470R1A288_BANK1_SECTORS[] = { +static const struct flash_sector TMS470R1A288_BANK1_SECTORS[] = { {0x00040000, 0x00010000, -1, -1}, {0x00050000, 0x00010000, -1, -1}, {0x00060000, 0x00010000, -1, -1}, @@ -69,7 +69,7 @@ const struct flash_sector TMS470R1A288_BANK1_SECTORS[] = { #define TMS470R1A288_BANK1_NUM_SECTORS \ ARRAY_SIZE(TMS470R1A288_BANK1_SECTORS) -const struct flash_sector TMS470R1A384_BANK0_SECTORS[] = { +static const struct flash_sector TMS470R1A384_BANK0_SECTORS[] = { {0x00000000, 0x00002000, -1, -1}, {0x00002000, 0x00002000, -1, -1}, {0x00004000, 0x00004000, -1, -1}, @@ -85,7 +85,7 @@ const struct flash_sector TMS470R1A384_BANK0_SECTORS[] = { #define TMS470R1A384_BANK0_NUM_SECTORS \ ARRAY_SIZE(TMS470R1A384_BANK0_SECTORS) -const struct flash_sector TMS470R1A384_BANK1_SECTORS[] = { +static const struct flash_sector TMS470R1A384_BANK1_SECTORS[] = { {0x00020000, 0x00008000, -1, -1}, {0x00028000, 0x00008000, -1, -1}, {0x00030000, 0x00008000, -1, -1}, @@ -95,7 +95,7 @@ const struct flash_sector TMS470R1A384_BANK1_SECTORS[] = { #define TMS470R1A384_BANK1_NUM_SECTORS \ ARRAY_SIZE(TMS470R1A384_BANK1_SECTORS) -const struct flash_sector TMS470R1A384_BANK2_SECTORS[] = { +static const struct flash_sector TMS470R1A384_BANK2_SECTORS[] = { {0x00040000, 0x00008000, -1, -1}, {0x00048000, 0x00008000, -1, -1}, {0x00050000, 0x00008000, -1, -1}, @@ -667,7 +667,7 @@ static int tms470_flash_initialize_internal_state_machine(struct flash_bank *ban /* ---------------------------------------------------------------------- */ -int tms470_flash_status(struct flash_bank *bank) +static int tms470_flash_status(struct flash_bank *bank) { struct target *target = bank->target; int result = ERROR_OK; commit f549dadb858cbf1bff1b3369dbdb2cc7d8f083a4 Author: Antonio Borneo <bor...@gm...> Date: Sun Apr 11 01:16:14 2010 +0800 TARGET/MIPS32: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/mips32.c b/src/target/mips32.c index b0cb79c..de8253f 100644 --- a/src/target/mips32.c +++ b/src/target/mips32.c @@ -31,7 +31,7 @@ #include "algorithm.h" #include "register.h" -char* mips32_core_reg_list[] = +static char* mips32_core_reg_list[] = { "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3", "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", @@ -40,12 +40,12 @@ char* mips32_core_reg_list[] = "status", "lo", "hi", "badvaddr", "cause", "pc" }; -const char *mips_isa_strings[] = +static const char *mips_isa_strings[] = { "MIPS32", "MIPS16e" }; -struct mips32_core_reg mips32_core_reg_list_arch_info[MIPS32NUMCOREREGS] = +static struct mips32_core_reg mips32_core_reg_list_arch_info[MIPS32NUMCOREREGS] = { {0, NULL, NULL}, {1, NULL, NULL}, @@ -93,9 +93,9 @@ struct mips32_core_reg mips32_core_reg_list_arch_info[MIPS32NUMCOREREGS] = #define MIPS32NUMFPREGS 34 + 18 -uint8_t mips32_gdb_dummy_fp_value[] = {0, 0, 0, 0}; +static uint8_t mips32_gdb_dummy_fp_value[] = {0, 0, 0, 0}; -struct reg mips32_gdb_dummy_fp_reg = +static struct reg mips32_gdb_dummy_fp_reg = { .name = "GDB dummy floating-point register", .value = mips32_gdb_dummy_fp_value, @@ -105,7 +105,7 @@ struct reg mips32_gdb_dummy_fp_reg = .arch_info = NULL, }; -int mips32_get_core_reg(struct reg *reg) +static int mips32_get_core_reg(struct reg *reg) { int retval; struct mips32_core_reg *mips32_reg = reg->arch_info; @@ -122,7 +122,7 @@ int mips32_get_core_reg(struct reg *reg) return retval; } -int mips32_set_core_reg(struct reg *reg, uint8_t *buf) +static int mips32_set_core_reg(struct reg *reg, uint8_t *buf) { struct mips32_core_reg *mips32_reg = reg->arch_info; struct target *target = mips32_reg->target; @@ -140,7 +140,7 @@ int mips32_set_core_reg(struct reg *reg, uint8_t *buf) return ERROR_OK; } -int mips32_read_core_reg(struct target *target, int num) +static int mips32_read_core_reg(struct target *target, int num) { uint32_t reg_value; struct mips32_core_reg *mips_core_reg; @@ -160,7 +160,7 @@ int mips32_read_core_reg(struct target *target, int num) return ERROR_OK; } -int mips32_write_core_reg(struct target *target, int num) +static int mips32_write_core_reg(struct target *target, int num) { uint32_t reg_value; struct mips32_core_reg *mips_core_reg; diff --git a/src/target/mips32.h b/src/target/mips32.h index 94d29ff..7ffe95f 100644 --- a/src/target/mips32.h +++ b/src/target/mips32.h @@ -41,8 +41,6 @@ enum mips32_isa_mode MIPS32_ISA_MIPS16E = 1, }; -extern const char *mips_isa_strings[]; - struct mips32_comparator { int used; commit 689fa8ad8c9bf40a98bd09303c80b67f72b7ac1f Author: Antonio Borneo <bor...@gm...> Date: Sun Apr 11 01:11:11 2010 +0800 TARGET/MIPS32_PRACC: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/mips32_pracc.c b/src/target/mips32_pracc.c index 19ba886..d96867a 100644 --- a/src/target/mips32_pracc.c +++ b/src/target/mips32_pracc.c @@ -90,6 +90,24 @@ struct mips32_pracc_context struct mips_ejtag *ejtag_info; }; +static int mips32_pracc_read_mem8(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint8_t *buf); +static int mips32_pracc_read_mem16(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint16_t *buf); +static int mips32_pracc_read_mem32(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint32_t *buf); +static int mips32_pracc_read_u32(struct mips_ejtag *ejtag_info, + uint32_t addr, uint32_t *buf); + +static int mips32_pracc_write_mem8(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint8_t *buf); +static int mips32_pracc_write_mem16(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint16_t *buf); +static int mips32_pracc_write_mem32(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint32_t *buf); +static int mips32_pracc_write_u32(struct mips_ejtag *ejtag_info, + uint32_t addr, uint32_t *buf); + static int wait_for_pracc_rw(struct mips_ejtag *ejtag_info, uint32_t *ctrl) { uint32_t ejtag_ctrl; @@ -284,7 +302,7 @@ int mips32_pracc_read_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int size return ERROR_OK; } -int mips32_pracc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) +static int mips32_pracc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) { static const uint32_t code[] = { /* start: */ @@ -354,7 +372,7 @@ int mips32_pracc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int co return retval; } -int mips32_pracc_read_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *buf) +static int mips32_pracc_read_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *buf) { static const uint32_t code[] = { /* start: */ @@ -387,7 +405,7 @@ int mips32_pracc_read_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t return retval; } -int mips32_pracc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) +static int mips32_pracc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) { static const uint32_t code[] = { /* start: */ @@ -464,7 +482,7 @@ int mips32_pracc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int co return ERROR_OK; } -int mips32_pracc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) +static int mips32_pracc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) { static const uint32_t code[] = { /* start: */ @@ -559,7 +577,7 @@ int mips32_pracc_write_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int siz return ERROR_OK; } -int mips32_pracc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) +static int mips32_pracc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) { static const uint32_t code[] = { /* start: */ @@ -608,7 +626,7 @@ int mips32_pracc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int c return ERROR_OK; } -int mips32_pracc_write_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *buf) +static int mips32_pracc_write_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *buf) { static const uint32_t code[] = { /* start: */ @@ -640,7 +658,7 @@ int mips32_pracc_write_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_ return ERROR_OK; } -int mips32_pracc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) +static int mips32_pracc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) { static const uint32_t code[] = { /* start: */ @@ -698,7 +716,7 @@ int mips32_pracc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int c return ERROR_OK; } -int mips32_pracc_write_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) +static int mips32_pracc_write_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) { static const uint32_t code[] = { /* start: */ diff --git a/src/target/mips32_pracc.h b/src/target/mips32_pracc.h index f8b00d0..f2c2680 100644 --- a/src/target/mips32_pracc.h +++ b/src/target/mips32_pracc.h @@ -47,24 +47,6 @@ int mips32_pracc_write_mem(struct mips_ejtag *ejtag_info, int mips32_pracc_fastdata_xfer(struct mips_ejtag *ejtag_info, struct working_area *source, int write, uint32_t addr, int count, uint32_t *buf); -int mips32_pracc_read_mem8(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint8_t *buf); -int mips32_pracc_read_mem16(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint16_t *buf); -int mips32_pracc_read_mem32(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint32_t *buf); -int mips32_pracc_read_u32(struct mips_ejtag *ejtag_info, - uint32_t addr, uint32_t *buf); - -int mips32_pracc_write_mem8(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint8_t *buf); -int mips32_pracc_write_mem16(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint16_t *buf); -int mips32_pracc_write_mem32(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint32_t *buf); -int mips32_pracc_write_u32(struct mips_ejtag *ejtag_info, - uint32_t addr, uint32_t *buf); - int mips32_pracc_read_regs(struct mips_ejtag *ejtag_info, uint32_t *regs); int mips32_pracc_write_regs(struct mips_ejtag *ejtag_info, uint32_t *regs); commit da741a51f2dadc66db450a2f44c7c64c886e977a Author: Antonio Borneo <bor...@gm...> Date: Sun Apr 11 01:03:53 2010 +0800 TARGET/MIPS32_DMAACC: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/mips32_dmaacc.c b/src/target/mips32_dmaacc.c index 7d3c2da..d756928 100644 --- a/src/target/mips32_dmaacc.c +++ b/src/target/mips32_dmaacc.c @@ -28,6 +28,19 @@ #include "mips32_dmaacc.h" +static int mips32_dmaacc_read_mem8(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint8_t *buf); +static int mips32_dmaacc_read_mem16(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint16_t *buf); +static int mips32_dmaacc_read_mem32(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint32_t *buf); + +static int mips32_dmaacc_write_mem8(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint8_t *buf); +static int mips32_dmaacc_write_mem16(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint16_t *buf); +static int mips32_dmaacc_write_mem32(struct mips_ejtag *ejtag_info, + uint32_t addr, int count, uint32_t *buf); /* * The following logic shamelessly cloned from HairyDairyMaid's wrt54g_debrick @@ -364,7 +377,7 @@ int mips32_dmaacc_read_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int siz return ERROR_OK; } -int mips32_dmaacc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) +static int mips32_dmaacc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) { int i; int retval; @@ -377,7 +390,7 @@ int mips32_dmaacc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int c return ERROR_OK; } -int mips32_dmaacc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) +static int mips32_dmaacc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) { int i; int retval; @@ -390,7 +403,7 @@ int mips32_dmaacc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int c return ERROR_OK; } -int mips32_dmaacc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) +static int mips32_dmaacc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) { int i; int retval; @@ -418,7 +431,7 @@ int mips32_dmaacc_write_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int si return ERROR_OK; } -int mips32_dmaacc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) +static int mips32_dmaacc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) { int i; int retval; @@ -431,7 +444,7 @@ int mips32_dmaacc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int return ERROR_OK; } -int mips32_dmaacc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) +static int mips32_dmaacc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) { int i; int retval; @@ -444,7 +457,7 @@ int mips32_dmaacc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int return ERROR_OK; } -int mips32_dmaacc_write_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) +static int mips32_dmaacc_write_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) { int i; int retval; diff --git a/src/target/mips32_dmaacc.h b/src/target/mips32_dmaacc.h index c1aa07d..fdf8cae 100644 --- a/src/target/mips32_dmaacc.h +++ b/src/target/mips32_dmaacc.h @@ -39,18 +39,4 @@ int mips32_dmaacc_read_mem(struct mips_ejtag *ejtag_info, int mips32_dmaacc_write_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int size, int count, void *buf); -int mips32_dmaacc_read_mem8(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint8_t *buf); -int mips32_dmaacc_read_mem16(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint16_t *buf); -int mips32_dmaacc_read_mem32(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint32_t *buf); - -int mips32_dmaacc_write_mem8(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint8_t *buf); -int mips32_dmaacc_write_mem16(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint16_t *buf); -int mips32_dmaacc_write_mem32(struct mips_ejtag *ejtag_info, - uint32_t addr, int count, uint32_t *buf); - #endif commit f1be0e6af2e204805a8bc2e8cadf828b9fa46c98 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 22:25:22 2010 +0800 HELPER/LOG: review unused symbols Remove unused functions: - log_catch - log_rethrow - log_try Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/helper/log.c b/src/helper/log.c index 7450fef..7ace930 100644 --- a/src/helper/log.c +++ b/src/helper/log.c @@ -114,44 +114,6 @@ static void log_forward(const char *file, unsigned line, const char *function, c } } -void log_try(void) -{ - log_forward_count++; -} - -void log_catch(void) -{ - assert(log_forward_count>0); - log_forward_count--; -} - -void log_rethrow(void) -{ - log_catch(); - if (log_forward_count==0) - { - struct store_log_forward *log; - - log = log_head; - while (log != NULL) - { - log_forward(log->file, log->line, log->function, log->string); - - struct store_log_forward *t=log; - log = log->next; - - free((void *)t->file); - free((void *)t->function); - free((void *)t->string); - free(t); - - } - - log_head = NULL; - } -} - - /* The log_puts() serves to somewhat different goals: * * - logging diff --git a/src/helper/log.h b/src/helper/log.h index b936fee..2852140 100644 --- a/src/helper/log.h +++ b/src/helper/log.h @@ -80,14 +80,6 @@ void kept_alive(void); void alive_sleep(uint64_t ms); void busy_sleep(uint64_t ms); -/* log entries can be paused and replayed roughly according to the try/catch/rethrow - * concepts in C++ - */ -void log_try(void); -void log_catch(void); -void log_rethrow(void); - - typedef void (*log_callback_fn)(void *priv, const char *file, unsigned line, const char *function, const char *string); commit 2ea78551ab3388032ad78cdeefac7ab75e3bb134 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 22:20:41 2010 +0800 TARGET/MIPS_EJTAG: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/mips_ejtag.c b/src/target/mips_ejtag.c index 98b27f0..84ad529 100644 --- a/src/target/mips_ejtag.c +++ b/src/target/mips_ejtag.c @@ -72,7 +72,7 @@ int mips_ejtag_get_idcode(struct mips_ejtag *ejtag_info, uint32_t *idcode) return ERROR_OK; } -int mips_ejtag_get_impcode(struct mips_ejtag *ejtag_info, uint32_t *impcode) +static int mips_ejtag_get_impcode(struct mips_ejtag *ejtag_info, uint32_t *impcode) { struct scan_field field; @@ -154,7 +154,7 @@ int mips_ejtag_drscan_8(struct mips_ejtag *ejtag_info, uint32_t *data) return ERROR_OK; } -int mips_ejtag_step_enable(struct mips_ejtag *ejtag_info) +static int mips_ejtag_step_enable(struct mips_ejtag *ejtag_info) { static const uint32_t code[] = { MIPS32_MTC0(1,31,0), /* move $1 to COP0 DeSave */ @@ -170,7 +170,8 @@ int mips_ejtag_step_enable(struct mips_ejtag *ejtag_info) return ERROR_OK; } -int mips_ejtag_step_disable(struct mips_ejtag *ejtag_info) + +static int mips_ejtag_step_disable(struct mips_ejtag *ejtag_info) { static const uint32_t code[] = { MIPS32_MTC0(15,31,0), /* move $15 to COP0 DeSave */ diff --git a/src/target/mips_ejtag.h b/src/target/mips_ejtag.h index f302a70..694cb34 100644 --- a/src/target/mips_ejtag.h +++ b/src/target/mips_ejtag.h @@ -134,7 +134,6 @@ int mips_ejtag_set_instr(struct mips_ejtag *ejtag_info, int new_instr); int mips_ejtag_enter_debug(struct mips_ejtag *ejtag_info); int mips_ejtag_exit_debug(struct mips_ejtag *ejtag_info); -int mips_ejtag_get_impcode(struct mips_ejtag *ejtag_info, uint32_t *impcode); int mips_ejtag_get_idcode(struct mips_ejtag *ejtag_info, uint32_t *idcode); int mips_ejtag_drscan_32(struct mips_ejtag *ejtag_info, uint32_t *data); int mips_ejtag_drscan_8(struct mips_ejtag *ejtag_info, uint32_t *data); commit 4809dbb2d7aa3b949a555876aad945d3916a8c87 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 22:14:34 2010 +0800 NOR/CFI: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c index 5f7ed1e..4dad7b6 100644 --- a/src/flash/nor/cfi.c +++ b/src/flash/nor/cfi.c @@ -244,7 +244,7 @@ static void cfi_intel_clear_status_register(struct flash_bank *bank) cfi_send_command(bank, 0x50, flash_address(bank, 0, 0x0)); } -uint8_t cfi_intel_wait_status_busy(struct flash_bank *bank, int timeout) +static uint8_t cfi_intel_wait_status_busy(struct flash_bank *bank, int timeout) { uint8_t status; @@ -285,7 +285,7 @@ uint8_t cfi_intel_wait_status_busy(struct flash_bank *bank, int timeout) return status; } -int cfi_spansion_wait_status_busy(struct flash_bank *bank, int timeout) +static int cfi_spansion_wait_status_busy(struct flash_bank *bank, int timeout) { uint8_t status, oldstatus; struct cfi_flash_bank *cfi_info = bank->driver_priv; @@ -1810,7 +1810,7 @@ static int cfi_write_words(struct flash_bank *bank, uint8_t *word, uint32_t word return ERROR_FLASH_OPERATION_FAILED; } -int cfi_write(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count) +static int cfi_write(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count) { struct cfi_flash_bank *cfi_info = bank->driver_priv; struct target *target = bank->target; commit 11fd673f0c315346ef065289b164da58dd1fd4c6 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 22:12:20 2010 +0800 TARGET/DSP563XX_ONCE: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/dsp563xx_once.c b/src/target/dsp563xx_once.c index 0186751..416cb6b 100644 --- a/src/target/dsp563xx_once.c +++ b/src/target/dsp563xx_once.c @@ -30,7 +30,7 @@ #include "dsp563xx_once.h" /** single word instruction */ -int dsp563xx_once_ir_exec(struct jtag_tap *tap, uint8_t instr, uint8_t rw, +static int dsp563xx_once_ir_exec(struct jtag_tap *tap, uint8_t instr, uint8_t rw, uint8_t go, uint8_t ex) { dsp563xx_write_dr_u8(tap, 0, @@ -41,7 +41,7 @@ int dsp563xx_once_ir_exec(struct jtag_tap *tap, uint8_t instr, uint8_t rw, } /** single word instruction */ -int dsp563xx_once_ir_exec_nq(struct jtag_tap *tap, uint8_t instr, uint8_t rw, +static int dsp563xx_once_ir_exec_nq(struct jtag_tap *tap, uint8_t instr, uint8_t rw, uint8_t go, uint8_t ex) { dsp563xx_write_dr_u8(tap, 0, diff --git a/src/target/dsp563xx_once.h b/src/target/dsp563xx_once.h index 871f622..942cd65 100644 --- a/src/target/dsp563xx_once.h +++ b/src/target/dsp563xx_once.h @@ -57,12 +57,6 @@ #define DSP563XX_ONCE_OPABEX 0x011 /* trace buffer/inc ptr */ #define DSP563XX_ONCE_NOREG 0x01F /* no register selected */ -/** single word instruction */ -int dsp563xx_once_ir_exec(struct jtag_tap *tap, uint8_t instr, uint8_t rw, - uint8_t go, uint8_t ex); -/** single word instruction */ -int dsp563xx_once_ir_exec_nq(struct jtag_tap *tap, uint8_t instr, uint8_t rw, - uint8_t go, uint8_t ex); /** once read register */ int dsp563xx_once_reg_read(struct jtag_tap *tap, uint8_t reg, uint32_t * data); /** once write register */ commit b2495c010148b8343f8f70f6ee558f505a2c7409 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 22:04:03 2010 +0800 OPENOCD: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/openocd.c b/src/openocd.c index 54c454d..81c2dcd 100644 --- a/src/openocd.c +++ b/src/openocd.c @@ -202,7 +202,7 @@ static const struct command_registration openocd_command_handlers[] = { COMMAND_REGISTRATION_DONE }; -int openocd_register_commands(struct command_context *cmd_ctx) +static int openocd_register_commands(struct command_context *cmd_ctx) { return register_commands(cmd_ctx, NULL, openocd_command_handlers); } commit 787a5067fbe0eaf05ad2f41a64c3eac776905724 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 22:01:16 2010 +0800 JTAG/COMMANDS: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/jtag/commands.c b/src/jtag/commands.c index 6951f03..d236fe9 100644 --- a/src/jtag/commands.c +++ b/src/jtag/commands.c @@ -121,7 +121,7 @@ void* cmd_queue_alloc(size_t size) return t + offset; } -void cmd_queue_free(void) +static void cmd_queue_free(void) { struct cmd_queue_page *page = cmd_queue_pages; diff --git a/src/jtag/commands.h b/src/jtag/commands.h index 692eee4..87bd9c5 100644 --- a/src/jtag/commands.h +++ b/src/jtag/commands.h @@ -158,7 +158,6 @@ struct jtag_command { extern struct jtag_command* jtag_command_queue; void* cmd_queue_alloc(size_t size); -void cmd_queue_free(void); void jtag_queue_command(struct jtag_command *cmd); void jtag_command_queue_reset(void); commit fdb9199001080e2d268da77f97365ab7b7f138d2 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 21:54:37 2010 +0800 BINARYBUFFER: review scope of data and functions Add "static" qualifier to private data and functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/helper/binarybuffer.c b/src/helper/binarybuffer.c index 081cc03..3a16cce 100644 --- a/src/helper/binarybuffer.c +++ b/src/helper/binarybuffer.c @@ -27,7 +27,7 @@ #include "log.h" #include "binarybuffer.h" -const unsigned char bit_reverse_table256[] = +static const unsigned char bit_reverse_table256[] = { 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, @@ -161,7 +161,7 @@ uint32_t flip_u32(uint32_t value, unsigned int num) return c; } -int ceil_f_to_u32(float x) +static int ceil_f_to_u32(float x) { if (x < 0) /* return zero for negative numbers */ return 0; commit d7246f452f4da9767e9ebdd6fb43b982954c02bf Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 21:52:33 2010 +0800 NOR/STR7X: review scope of data Add "static" qualifier to private data. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/str7x.c b/src/flash/nor/str7x.c index fa1744c..d5e8e28 100644 --- a/src/flash/nor/str7x.c +++ b/src/flash/nor/str7x.c @@ -31,7 +31,7 @@ #include <target/algorithm.h> -struct str7x_mem_layout mem_layout_str7bank0[] = { +static struct str7x_mem_layout mem_layout_str7bank0[] = { {0x00000000, 0x02000, 0x01}, {0x00002000, 0x02000, 0x02}, {0x00004000, 0x02000, 0x04}, @@ -42,7 +42,7 @@ struct str7x_mem_layout mem_layout_str7bank0[] = { {0x00030000, 0x10000, 0x80} }; -struct str7x_mem_layout mem_layout_str7bank1[] = { +static struct str7x_mem_layout mem_layout_str7bank1[] = { {0x00000000, 0x02000, 0x10000}, {0x00002000, 0x02000, 0x20000} }; commit c936cb334b9e60c3326675912c97faafb379d3ed Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 21:50:15 2010 +0800 NAND/TCL: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nand/core.h b/src/flash/nand/core.h index e4fb18b..a8e7466 100644 --- a/src/flash/nand/core.h +++ b/src/flash/nand/core.h @@ -221,7 +221,6 @@ int nand_calculate_ecc_kw(struct nand_device *nand, const uint8_t *dat, uint8_t *ecc_code); int nand_register_commands(struct command_context *cmd_ctx); -int nand_init(struct command_context *cmd_ctx); /// helper for parsing a nand device command argument string COMMAND_HELPER(nand_command_get_device, unsigned name_index, diff --git a/src/flash/nand/tcl.c b/src/flash/nand/tcl.c index 29b4b69..86dbd67 100644 --- a/src/flash/nand/tcl.c +++ b/src/flash/nand/tcl.c @@ -512,7 +512,7 @@ static const struct command_registration nand_exec_command_handlers[] = { COMMAND_REGISTRATION_DONE }; -int nand_init(struct command_context *cmd_ctx) +static int nand_init(struct command_context *cmd_ctx) { if (!nand_devices) return ERROR_OK; @@ -536,12 +536,14 @@ COMMAND_HANDLER(handle_nand_init_command) LOG_DEBUG("Initializing NAND devices..."); return nand_init(CMD_CTX); } -int nand_list_walker(struct nand_flash_controller *c, void *x) + +static int nand_list_walker(struct nand_flash_controller *c, void *x) { struct command_context *cmd_ctx = (struct command_context *)x; command_print(cmd_ctx, " %s", c->name); return ERROR_OK; } + COMMAND_HANDLER(handle_nand_list_drivers) { command_print(CMD_CTX, "Available NAND flash controller drivers:"); commit 5926b5a94fd4e29e0e020c2f87b542fd51bd5d6f Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 20:11:40 2010 +0800 MFLASH: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/mflash.c b/src/flash/mflash.c index 289fe5e..d307858 100644 --- a/src/flash/mflash.c +++ b/src/flash/mflash.c @@ -1302,7 +1302,7 @@ static const struct command_registration mflash_exec_command_handlers[] = { COMMAND_REGISTRATION_DONE }; -int mflash_init_drivers(struct command_context *cmd_ctx) +static int mflash_init_drivers(struct command_context *cmd_ctx) { if (!mflash_bank) return ERROR_OK; diff --git a/src/flash/mflash.h b/src/flash/mflash.h index 358d253..bb3cd05 100644 --- a/src/flash/mflash.h +++ b/src/flash/mflash.h @@ -142,7 +142,6 @@ struct mflash_bank }; int mflash_register_commands(struct command_context *cmd_ctx); -int mflash_init_drivers(struct command_context *cmd_ctx); #define MG_MFLASH_SECTOR_SIZE (0x200) /* 512Bytes = 2^9 */ #define MG_MFLASH_SECTOR_SIZE_MASK (0x200-1) commit a6307fed9100877df2def268acece81078e06d6f Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 20:09:59 2010 +0800 NAND/ARM_IO: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nand/arm_io.c b/src/flash/nand/arm_io.c index 0cd39c0..7c7148e 100644 --- a/src/flash/nand/arm_io.c +++ b/src/flash/nand/arm_io.c @@ -43,7 +43,7 @@ * @param area Pointer to a pointer to a working area to copy code to * @return Success or failure of the operation */ -int arm_code_to_working_area(struct target *target, +static int arm_code_to_working_area(struct target *target, const uint32_t *code, unsigned code_size, unsigned additional, struct working_area **area) { commit 617811ac664504303cf65a69c1b3f8ca262def0b Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 20:08:41 2010 +0800 NAND/CORE: review scope of functions Add "static" qualifier to private functions. Move function's comment from core.h to core.c. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nand/core.c b/src/flash/nand/core.c index 50d8249..9013812 100644 --- a/src/flash/nand/core.c +++ b/src/flash/nand/core.c @@ -160,7 +160,14 @@ static struct nand_ecclayout nand_oob_8 = { }; #endif -struct nand_device *get_nand_device_by_name(const char *name) +/** + * Returns the flash bank specified by @a name, which matches the + * driver name and a suffix (option) specify the driver-specific + * bank number. The suffix consists of the '.' and the driver-specific + * bank number: when two davinci banks are defined, then 'davinci.1' refers + * to the second (e.g. DM355EVM). + */ +static struct nand_device *get_nand_device_by_name(const char *name) { unsigned requested = get_flash_name_index(name); unsigned found = 0; diff --git a/src/flash/nand/core.h b/src/flash/nand/core.h index d2d1571..e4fb18b 100644 --- a/src/flash/nand/core.h +++ b/src/flash/nand/core.h @@ -197,15 +197,6 @@ enum oob_formats }; -/** - * Returns the flash bank specified by @a name, which matches the - * driver name and a suffix (option) specify the driver-specific - * bank number. The suffix consists of the '.' and the driver-specific - * bank number: when two davinci banks are defined, then 'davinci.1' refers - * to the second (e.g. DM355EVM). - */ -struct nand_device *get_nand_device_by_name(const char *name); - struct nand_device *get_nand_device_by_num(int num); int nand_page_command(struct nand_device *nand, uint32_t page, commit aaf848596c13f26026bcbd1071f7614e818ea766 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 20:03:19 2010 +0800 NAND/MX3: review scope of data Add "static" qualifier to private data. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nand/mx3.c b/src/flash/nand/mx3.c index 4823534..7d9cc8b 100644 --- a/src/flash/nand/mx3.c +++ b/src/flash/nand/mx3.c @@ -47,7 +47,7 @@ static const char sram_buffer_bounds_err_msg[] = "trying to access out of SRAM buffer bound (addr=0x%" PRIx32 ")"; static const char get_status_register_err_msg[] = "can't get NAND status"; static uint32_t in_sram_address; -unsigned char sign_of_sequental_byte_read; +static unsigned char sign_of_sequental_byte_read; static int test_iomux_settings (struct target * target, uint32_t value, uint32_t mask, const char *text); commit 9acd453d9f1d7d9ef90343f84ffc43ce6e1b434d Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 19:58:15 2010 +0800 NOR/ADUC702X: review scope of data Add "static" qualifier to private data. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/aduc702x.c b/src/flash/nor/aduc702x.c index 88072b9..57c591d 100644 --- a/src/flash/nor/aduc702x.c +++ b/src/flash/nor/aduc702x.c @@ -343,7 +343,7 @@ static int aduc702x_write_single(struct flash_bank *bank, uint8_t *buffer, uint3 return ERROR_OK; } -int aduc702x_write(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count) +static int aduc702x_write(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count) { int retval; commit 069f88cfac1199657a7e4c9988b0bc86eca99ac9 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 19:56:24 2010 +0800 NOR/AVRF: review scope of data Add "static" qualifier to private data. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/avrf.c b/src/flash/nor/avrf.c index 5b40ad7..15b8b27 100644 --- a/src/flash/nor/avrf.c +++ b/src/flash/nor/avrf.c @@ -50,7 +50,7 @@ #define AVR_JTAG_REG_ProgrammingCommand_Len 15 #define AVR_JTAG_REG_FlashDataByte_Len 16 -struct avrf_type avft_chips_info[] = +static struct avrf_type avft_chips_info[] = { /* name, chip_id, flash_page_size, flash_page_num, * eeprom_page_size, eeprom_page_num commit 300f0f53c54fab5dd994a8bc42edbdc6115ef7b9 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 19:54:22 2010 +0800 NOR/CORE: review scope of data Add "static" qualifier to private data. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c index 8b581b0..18012c6 100644 --- a/src/flash/nor/core.c +++ b/src/flash/nor/core.c @@ -36,7 +36,7 @@ * primarily support access from Tcl scripts or from GDB. */ -struct flash_bank *flash_banks; +static struct flash_bank *flash_banks; int flash_driver_erase(struct flash_bank *bank, int first, int last) { commit 402d3292bbd6e04ffefb1bdf7ab61f3bfc36c44a Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 19:38:15 2010 +0800 NOR/DRIVERS: review scope of functions Add "static" qualifier to private functions. Remove unused "extern" in src/ecosboard.c Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/ecosboard.c b/src/ecosboard.c index 4249e1b..1e3152e 100644 --- a/src/ecosboard.c +++ b/src/ecosboard.c @@ -99,9 +99,6 @@ static bool writeLog = true; char hwaddr[512]; - -extern struct flash_driver *flash_drivers[]; - #ifdef CYGPKG_PROFILE_GPROF #include <cyg/profile/profile.h> diff --git a/src/flash/nor/drivers.c b/src/flash/nor/drivers.c index 7f71d83..3e09a00 100644 --- a/src/flash/nor/drivers.c +++ b/src/flash/nor/drivers.c @@ -44,7 +44,7 @@ extern struct flash_driver faux_flash; * The list of built-in flash drivers. * @todo Make this dynamically extendable with loadable modules. */ -struct flash_driver *flash_drivers[] = { +static struct flash_driver *flash_drivers[] = { &lpc2000_flash, &lpc288x_flash, &lpc2900_flash, commit 61c06359915cbaef5b8538d2600ecbc17d4b387c Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 19:29:51 2010 +0800 STR9XPEC: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/str9xpec.c b/src/flash/nor/str9xpec.c index a93b6a2..861d70b 100644 --- a/src/flash/nor/str9xpec.c +++ b/src/flash/nor/str9xpec.c @@ -33,7 +33,7 @@ static int str9xpec_erase_area(struct flash_bank *bank, int first, int last); static int str9xpec_set_address(struct flash_bank *bank, uint8_t sector); static int str9xpec_write_options(struct flash_bank *bank); -int str9xpec_set_instr(struct jtag_tap *tap, uint32_t new_instr, tap_state_t end_state) +static int str9xpec_set_instr(struct jtag_tap *tap, uint32_t new_instr, tap_state_t end_state) { if (tap == NULL) { return ERROR_TARGET_INVALID; commit 0c82bea44acf491164c96efd88c1a831fbf6ce67 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 19:28:13 2010 +0800 TCL: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/flash/nor/core.h b/src/flash/nor/core.h index 98763b7..68220af 100644 --- a/src/flash/nor/core.h +++ b/src/flash/nor/core.h @@ -97,8 +97,6 @@ struct flash_bank /// Registers the 'flash' subsystem commands int flash_register_commands(struct command_context *cmd_ctx); -/// Initializes the 'flash' subsystem drivers -int flash_init_drivers(struct command_context *cmd_ctx); /** * Erases @a length bytes in the @a target flash, starting at @a addr. diff --git a/src/flash/nor/tcl.c b/src/flash/nor/tcl.c index fc7169f..aed55c0 100644 --- a/src/flash/nor/tcl.c +++ b/src/flash/nor/tcl.c @@ -774,7 +774,7 @@ static const struct command_registration flash_exec_command_handlers[] = { COMMAND_REGISTRATION_DONE }; -int flash_init_drivers(struct command_context *cmd_ctx) +static int flash_init_drivers(struct command_context *cmd_ctx) { if (!flash_bank_list()) return ERROR_OK; commit c0b5ca6d17273aff849bc6546c7388562b751225 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 19:25:32 2010 +0800 TIME_SUPPORT: review unused symbols Remove unused functions: - timeval_add Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/helper/time_support.c b/src/helper/time_support.c index 1934315..1f55bc2 100644 --- a/src/helper/time_support.c +++ b/src/helper/time_support.c @@ -51,13 +51,6 @@ int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval * return x->tv_sec < y->tv_sec; } -/* add two struct timeval values */ -int timeval_add(struct timeval *result, struct timeval *x, struct timeval *y) -{ - memcpy(result, x, sizeof(struct timeval)); - return timeval_add_time(result, y->tv_sec, y->tv_usec); -} - int timeval_add_time(struct timeval *result, long sec, long usec) { result->tv_sec += sec; diff --git a/src/helper/time_support.h b/src/helper/time_support.h index a2d180a..fab432d 100644 --- a/src/helper/time_support.h +++ b/src/helper/time_support.h @@ -38,7 +38,6 @@ #endif int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y); -int timeval_add(struct timeval *result, struct timeval *x, struct timeval *y); int timeval_add_time(struct timeval *result, long sec, long usec); /// @returns gettimeofday() timeval as 64-bit in ms commit b2468e3c4f09cd4e9f204aeb885dfdbbeb0a8dbb Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 17:23:06 2010 +0800 HELLO: review unused symbols Remove unused functions: - hello_register_commands Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/hello.c b/src/hello.c index 8cd5fab..d3fce3d 100644 --- a/src/hello.c +++ b/src/hello.c @@ -121,8 +121,3 @@ const struct command_registration hello_command_handlers[] = { }, COMMAND_REGISTRATION_DONE }; - -int hello_register_commands(struct command_context *cmd_ctx) -{ - return register_commands(cmd_ctx, NULL, hello_command_handlers); -} diff --git a/src/hello.h b/src/hello.h index fc674ad..f41c67a 100644 --- a/src/hello.h +++ b/src/hello.h @@ -20,12 +20,8 @@ #ifndef OPENOCD_HELLO_H #define OPENOCD_HELLO_H -struct command_context; struct command_registration; -/// Register the hello commands in the specified command_context -int hello_register_commands(struct command_context *cmd_ctx); - /** * Export the registration for the hello command group, so it can be * embedded in example drivers. commit 46781080347af4f207cec108dfc2f96da61dcbfa Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 17:06:16 2010 +0800 PLD: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/pld/pld.c b/src/pld/pld.c index 5ed7596..90067e3 100644 --- a/src/pld/pld.c +++ b/src/pld/pld.c @@ -206,7 +206,8 @@ static const struct command_registration pld_exec_command_handlers[] = { }, COMMAND_REGISTRATION_DONE }; -int pld_init(struct command_context *cmd_ctx) + +static int pld_init(struct command_context *cmd_ctx) { if (!pld_devices) return ERROR_OK; diff --git a/src/pld/pld.h b/src/pld/pld.h index cd92ff0..d306246 100644 --- a/src/pld/pld.h +++ b/src/pld/pld.h @@ -46,8 +46,6 @@ struct pld_device int pld_register_commands(struct command_context *cmd_ctx); -int pld_init(struct command_context *cmd_ctx); - struct pld_device *get_pld_device_by_num(int num); #define ERROR_PLD_DEVICE_INVALID (-1000) commit ec1c90e3cd53446939b4655f55166bff6b3d39f4 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 17:03:02 2010 +0800 ADI_V5_JTAG: review scope of data Add "static" qualifier to private data. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c index 0d795fb..04c6ae7 100644 --- a/src/target/adi_v5_jtag.c +++ b/src/target/adi_v5_jtag.c @@ -429,7 +429,7 @@ const struct dap_ops jtag_dp_ops = { }; -const uint8_t swd2jtag_bitseq[] = { +static const uint8_t swd2jtag_bitseq[] = { /* More than 50 TCK/SWCLK cycles with TMS/SWDIO high, * putting both JTAG and SWD logic into reset state. */ commit 8ffdefcc59ee0a8d305ac5a9f28b38ad89dea7c5 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 17:01:06 2010 +0800 ARM920T: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/arm920t.c b/src/target/arm920t.c index 99f7dca..658315b 100644 --- a/src/target/arm920t.c +++ b/src/target/arm920t.c @@ -788,7 +788,7 @@ static int arm920t_mcr(struct target *target, int cpnum, uint32_t CRn, uint32_t CRm, uint32_t value); -int arm920t_init_arch_info(struct target *target, +static int arm920t_init_arch_info(struct target *target, struct arm920t_common *arm920t, struct jtag_tap *tap) { struct arm7_9_common *arm7_9 = &arm920t->arm7_9_common; commit de27d28df90ab3ed190b55ffa4d2a2cbf491732c Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 16:59:50 2010 +0800 ARM_JTAG: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/arm_jtag.c b/src/target/arm_jtag.c index 8cc4428..3a552ee 100644 --- a/src/target/arm_jtag.c +++ b/src/target/arm_jtag.c @@ -82,7 +82,7 @@ int arm_jtag_scann_inner(struct arm_jtag *jtag_info, uint32_t new_scan_chain, ta return retval; } -int arm_jtag_reset_callback(enum jtag_event event, void *priv) +static int arm_jtag_reset_callback(enum jtag_event event, void *priv) { struct arm_jtag *jtag_info = priv; commit 8a871560f99779b279623540588f7295fe041781 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 16:57:49 2010 +0800 ARM_SIMULATOR: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/arm_simulator.c b/src/target/arm_simulator.c index 908c613..730f588 100644 --- a/src/target/arm_simulator.c +++ b/src/target/arm_simulator.c @@ -279,7 +279,7 @@ static int thumb_pass_branch_condition(uint32_t cpsr, uint16_t opcode) * if the dry_run_pc argument is provided, no state is changed, * but the new pc is stored in the variable pointed at by the argument */ -int arm_simulate_step_core(struct target *target, +static int arm_simulate_step_core(struct target *target, uint32_t *dry_run_pc, struct arm_sim_interface *sim) { uint32_t current_pc = sim->get_reg(sim, 15); diff --git a/src/target/arm_simulator.h b/src/target/arm_simulator.h index bd5458e..b332a17 100644 --- a/src/target/arm_simulator.h +++ b/src/target/arm_simulator.h @@ -40,8 +40,4 @@ struct arm_sim_interface /* armv4_5 version */ int arm_simulate_step(struct target *target, uint32_t *dry_run_pc); -/* a generic arm simulator. Caller must implement the sim interface */ -int arm_simulate_step_core(struct target *target, - uint32_t *dry_run_pc, struct arm_sim_interface *sim); - #endif /* ARM_SIMULATOR_H */ commit 4a1bd5b80603f73593fd7094d7da41ff72130461 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 16:46:59 2010 +0800 ARMV4_5_MMU: review unused symbols Remove unused data: - armv4_5_mmu_page_type_names Remove prototype of not existing function: - armv4mmu_translate_va Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/armv4_5_mmu.c b/src/target/armv4_5_mmu.c index 4d2fbee..fc1dde7 100644 --- a/src/target/armv4_5_mmu.c +++ b/src/target/armv4_5_mmu.c @@ -26,13 +26,6 @@ #include "armv4_5_mmu.h" -uint32_t armv4mmu_translate_va(struct target *target, struct armv4_5_mmu_common *armv4_5_mmu, uint32_t va, int *type, uint32_t *cb, int *domain, uint32_t *ap); - -char* armv4_5_mmu_page_type_names[] = -{ - "section", "large page", "small page", "tiny page" -}; - uint32_t armv4_5_mmu_translate_va(struct target *target, struct armv4_5_mmu_common *armv4_5_mmu, uint32_t va, int *type, uint32_t *cb, int *domain, uint32_t *ap) { uint32_t first_lvl_descriptor = 0x0; commit 0f3bbcf09683904c1f21b6961cbb0f36b07043c0 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 16:46:01 2010 +0800 ARMV4_5: review scope of data Add "static" qualifier to private data. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/arm.h b/src/target/arm.h index 99bd983..ce8cbe1 100644 --- a/src/target/arm.h +++ b/src/target/arm.h @@ -80,8 +80,6 @@ enum arm_state { ARM_STATE_THUMB_EE, }; -extern const char *arm_state_strings[]; - #define ARM_COMMON_MAGIC 0x0A450A45 /** diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index 1e9a296..eeb6694 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -217,7 +217,7 @@ enum arm_mode armv4_5_number_to_mode(int number) } } -const char *arm_state_strings[] = +static const char *arm_state_strings[] = { "ARM", "Thumb", "Jazelle", "ThumbEE", }; commit 263b4b9057b4e34eec8b39c4f165d370cb51a9e3 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 16:44:54 2010 +0800 EMBEDDEDICE: review scope of functions Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/embeddedice.c b/src/target/embeddedice.c index 69f3a76..7ef4ac4 100644 --- a/src/target/embeddedice.c +++ b/src/target/embeddedice.c @@ -47,6 +47,8 @@ * core entered debug mode. */ +static int embeddedice_set_reg_w_exec(struct reg *reg, uint8_t *buf); + /* * From: ARM9E-S TRM, DDI 0165, table C-4 (and similar, for other cores) */ @@ -469,7 +471,7 @@ void embeddedice_set_reg(struct reg *reg, uint32_t value) * Write an EmbeddedICE register, updating the register cache. * Uses embeddedice_set_reg(); not queued. */ -int embeddedice_set_reg_w_exec(struct reg *reg, uint8_t *buf) +static int embeddedice_set_reg_w_exec(struct reg *reg, uint8_t *buf) { int retval; diff --git a/src/target/embeddedice.h b/src/target/embeddedice.h index d278115..42df8d0 100644 --- a/src/target/embeddedice.h +++ b/src/target/embeddedice.h @@ -106,7 +106,6 @@ void embeddedice_write_reg(struct reg *reg, uint32_t value); void embeddedice_store_reg(struct reg *reg); void embeddedice_set_reg(struct reg *reg, uint32_t value); -int embeddedice_set_reg_w_exec(struct reg *reg, uint8_t *buf); int embeddedice_receive(struct arm_jtag *jtag_info, uint32_t *data, uint32_t size); int embeddedice_send(struct arm_jtag *jtag_info, uint32_t *data, uint32_t size); commit 3f0b17e48af9e3481084e1e9e697012b6824df43 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 00:25:35 2010 +0800 TARGET: review unused symbols Remove unused functions: - target_all_handle_event Signed-off-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/target.c b/src/target/target.c index f1b292a..73594fb 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -3580,22 +3580,6 @@ stat... [truncated message content] |