diff options
author | Alexander Kurz <akurz@blala.de> | 2016-02-14 10:04:51 +0100 |
---|---|---|
committer | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2016-05-17 22:30:32 +0100 |
commit | 17ec0b1044685d2da44c6992870b749e0009b83a (patch) | |
tree | 50232558bc6f3e271917888f9063acd7610c8227 /src/jtag | |
parent | 20f7a084ddbf5520e8d60ac9c62f04b08d3abe18 (diff) | |
download | riscv-openocd-17ec0b1044685d2da44c6992870b749e0009b83a.zip riscv-openocd-17ec0b1044685d2da44c6992870b749e0009b83a.tar.gz riscv-openocd-17ec0b1044685d2da44c6992870b749e0009b83a.tar.bz2 |
jtag ulink: dont compile function when not required
ulink_calculate_frequency() is used exclusively when
_DEBUG_JTAG_IO_ is set, no need to compile this
function if it is not used.
Declaring it static in the same commit.
Change-Id: I243ffdf69a1dc3bee6d16e4bb8d78396b6ea5144
Signed-off-by: Alexander Kurz <akurz@blala.de>
Reviewed-on: http://openocd.zylin.com/3241
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Diffstat (limited to 'src/jtag')
-rw-r--r-- | src/jtag/drivers/ulink.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/jtag/drivers/ulink.c b/src/jtag/drivers/ulink.c index cfd693a..130ade3 100644 --- a/src/jtag/drivers/ulink.c +++ b/src/jtag/drivers/ulink.c @@ -193,6 +193,7 @@ int ulink_execute_queued_commands(struct ulink *device, int timeout); const char *ulink_cmd_id_string(uint8_t id); void ulink_print_command(struct ulink_cmd *ulink_cmd); void ulink_print_queue(struct ulink *device); +static int ulink_calculate_frequency(enum ulink_delay_type type, int delay, long *f); #endif int ulink_append_scan_cmd(struct ulink *device, @@ -225,7 +226,6 @@ int ulink_append_test_cmd(struct ulink *device); /* OpenULINK TCK frequency helper functions */ int ulink_calculate_delay(enum ulink_delay_type type, long f, int *delay); -int ulink_calculate_frequency(enum ulink_delay_type type, int delay, long *f); /* Interface between OpenULINK and OpenOCD */ static void ulink_set_end_state(tap_state_t endstate); @@ -1369,6 +1369,7 @@ int ulink_calculate_delay(enum ulink_delay_type type, long f, int *delay) return ERROR_OK; } +#ifdef _DEBUG_JTAG_IO_ /** * Calculate frequency for a given delay value. * @@ -1383,7 +1384,7 @@ int ulink_calculate_delay(enum ulink_delay_type type, long f, int *delay) * @return on success: ERROR_OK * @return on failure: ERROR_FAIL */ -int ulink_calculate_frequency(enum ulink_delay_type type, int delay, long *f) +static int ulink_calculate_frequency(enum ulink_delay_type type, int delay, long *f) { float t, f_float, f_rounded; @@ -1432,6 +1433,7 @@ int ulink_calculate_frequency(enum ulink_delay_type type, int delay, long *f) return ERROR_OK; } +#endif /******************* Interface between OpenULINK and OpenOCD ******************/ |