diff options
author | mifi <mifi@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-04-18 10:08:13 +0000 |
---|---|---|
committer | mifi <mifi@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-04-18 10:08:13 +0000 |
commit | 0bba832713cca8e5931d5d21f37f526d0a3979cf (patch) | |
tree | a6c657cd1661df9fca66bd97b26d9d9823ae4ca5 /src/flash/str7x.c | |
parent | 13de2d2fefb80b93aa0bde9bcd447b7e1bb24c47 (diff) | |
download | riscv-openocd-0bba832713cca8e5931d5d21f37f526d0a3979cf.zip riscv-openocd-0bba832713cca8e5931d5d21f37f526d0a3979cf.tar.gz riscv-openocd-0bba832713cca8e5931d5d21f37f526d0a3979cf.tar.bz2 |
The following patches was applied:
- openocd-flash-static-keyword-v3.patch
- openocd-lpc2000-fix-erase-obo.patch
- openocd-jlink-fix-sign-ptr-warn.patch
- openocd-wextra-etm.patch
- openocd-wextra-jtag.patch
- openocd-add-new-tap-symbols-v6.patch
Many thanks to Zach Welch <zw(at)superlucidity.net>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1462 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash/str7x.c')
-rw-r--r-- | src/flash/str7x.c | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/src/flash/str7x.c b/src/flash/str7x.c index ec73f64..8d151cf 100644 --- a/src/flash/str7x.c +++ b/src/flash/str7x.c @@ -54,17 +54,17 @@ str7x_mem_layout_t mem_layout_str7bank1[] = { {0x00002000, 0x02000, 0x20000} }; -int str7x_register_commands(struct command_context_s *cmd_ctx); -int str7x_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank); -int str7x_erase(struct flash_bank_s *bank, int first, int last); -int str7x_protect(struct flash_bank_s *bank, int set, int first, int last); -int str7x_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count); -int str7x_probe(struct flash_bank_s *bank); -int str7x_handle_part_id_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); -int str7x_protect_check(struct flash_bank_s *bank); -int str7x_info(struct flash_bank_s *bank, char *buf, int buf_size); - -int str7x_handle_disable_jtag_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); +static int str7x_register_commands(struct command_context_s *cmd_ctx); +static int str7x_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank); +static int str7x_erase(struct flash_bank_s *bank, int first, int last); +static int str7x_protect(struct flash_bank_s *bank, int set, int first, int last); +static int str7x_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count); +static int str7x_probe(struct flash_bank_s *bank); +//static int str7x_handle_part_id_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); +static int str7x_protect_check(struct flash_bank_s *bank); +static int str7x_info(struct flash_bank_s *bank, char *buf, int buf_size); + +static int str7x_handle_disable_jtag_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); flash_driver_t str7x_flash = { @@ -81,7 +81,7 @@ flash_driver_t str7x_flash = .info = str7x_info }; -int str7x_register_commands(struct command_context_s *cmd_ctx) +static int str7x_register_commands(struct command_context_s *cmd_ctx) { command_t *str7x_cmd = register_command(cmd_ctx, NULL, "str7x", NULL, COMMAND_ANY, NULL); @@ -91,13 +91,13 @@ int str7x_register_commands(struct command_context_s *cmd_ctx) return ERROR_OK; } -int str7x_get_flash_adr(struct flash_bank_s *bank, u32 reg) +static int str7x_get_flash_adr(struct flash_bank_s *bank, u32 reg) { str7x_flash_bank_t *str7x_info = bank->driver_priv; return (str7x_info->register_base | reg); } -int str7x_build_block_list(struct flash_bank_s *bank) +static int str7x_build_block_list(struct flash_bank_s *bank) { str7x_flash_bank_t *str7x_info = bank->driver_priv; @@ -155,7 +155,7 @@ int str7x_build_block_list(struct flash_bank_s *bank) /* flash bank str7x <base> <size> 0 0 <target#> <str71_variant> */ -int str7x_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) +static int str7x_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank) { str7x_flash_bank_t *str7x_info; @@ -200,7 +200,7 @@ int str7x_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char return ERROR_OK; } -u32 str7x_status(struct flash_bank_s *bank) +static u32 str7x_status(struct flash_bank_s *bank) { target_t *target = bank->target; u32 retval; @@ -210,7 +210,7 @@ u32 str7x_status(struct flash_bank_s *bank) return retval; } -u32 str7x_result(struct flash_bank_s *bank) +static u32 str7x_result(struct flash_bank_s *bank) { target_t *target = bank->target; u32 retval; @@ -220,7 +220,7 @@ u32 str7x_result(struct flash_bank_s *bank) return retval; } -int str7x_protect_check(struct flash_bank_s *bank) +static int str7x_protect_check(struct flash_bank_s *bank) { str7x_flash_bank_t *str7x_info = bank->driver_priv; target_t *target = bank->target; @@ -247,7 +247,7 @@ int str7x_protect_check(struct flash_bank_s *bank) return ERROR_OK; } -int str7x_erase(struct flash_bank_s *bank, int first, int last) +static int str7x_erase(struct flash_bank_s *bank, int first, int last) { str7x_flash_bank_t *str7x_info = bank->driver_priv; target_t *target = bank->target; @@ -300,7 +300,7 @@ int str7x_erase(struct flash_bank_s *bank, int first, int last) return ERROR_OK; } -int str7x_protect(struct flash_bank_s *bank, int set, int first, int last) +static int str7x_protect(struct flash_bank_s *bank, int set, int first, int last) { str7x_flash_bank_t *str7x_info = bank->driver_priv; target_t *target = bank->target; @@ -354,7 +354,7 @@ int str7x_protect(struct flash_bank_s *bank, int set, int first, int last) return ERROR_OK; } -int str7x_write_block(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count) +static int str7x_write_block(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count) { str7x_flash_bank_t *str7x_info = bank->driver_priv; target_t *target = bank->target; @@ -469,7 +469,7 @@ int str7x_write_block(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 cou return retval; } -int str7x_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count) +static int str7x_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count) { target_t *target = bank->target; str7x_flash_bank_t *str7x_info = bank->driver_priv; @@ -629,23 +629,25 @@ int str7x_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 count) return ERROR_OK; } -int str7x_probe(struct flash_bank_s *bank) +static int str7x_probe(struct flash_bank_s *bank) { return ERROR_OK; } -int str7x_handle_part_id_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) +#if 0 +static int str7x_handle_part_id_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) { return ERROR_OK; } +#endif -int str7x_info(struct flash_bank_s *bank, char *buf, int buf_size) +static int str7x_info(struct flash_bank_s *bank, char *buf, int buf_size) { snprintf(buf, buf_size, "str7x flash driver info" ); return ERROR_OK; } -int str7x_handle_disable_jtag_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) +static int str7x_handle_disable_jtag_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc) { flash_bank_t *bank; target_t *target = NULL; |