summaryrefslogtreecommitdiff
path: root/src/flash/ocl.c
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-09 09:20:33 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-09 18:42:47 -0800
commit712d3fc0fb3ed69342a649d8bbb0d6d901a64720 (patch)
tree353b60ffcae5ac40cd5b2cb10c97838480e8fe17 /src/flash/ocl.c
parent4cd02c63e9213b7f33ec4ac33d481fb00e00708f (diff)
downloadopenocd+libswd-712d3fc0fb3ed69342a649d8bbb0d6d901a64720.tar.gz
openocd+libswd-712d3fc0fb3ed69342a649d8bbb0d6d901a64720.tar.bz2
openocd+libswd-712d3fc0fb3ed69342a649d8bbb0d6d901a64720.tar.xz
openocd+libswd-712d3fc0fb3ed69342a649d8bbb0d6d901a64720.zip
flash/<assorted>.c: remove useless declarations
Remove useless forward declarations. Moves command registrations to end of files. Moves flash structure definitions to end of files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
Diffstat (limited to 'src/flash/ocl.c')
-rw-r--r--src/flash/ocl.c44
1 files changed, 13 insertions, 31 deletions
diff --git a/src/flash/ocl.c b/src/flash/ocl.c
index a2dac50a..51ccc961 100644
--- a/src/flash/ocl.c
+++ b/src/flash/ocl.c
@@ -26,32 +26,6 @@
#include "embeddedice.h"
-static int ocl_register_commands(struct command_context_s *cmd_ctx);
-static int ocl_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank);
-static int ocl_erase(struct flash_bank_s *bank, int first, int last);
-static int ocl_protect(struct flash_bank_s *bank, int set, int first, int last);
-static int ocl_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint32_t count);
-static int ocl_probe(struct flash_bank_s *bank);
-static int ocl_erase_check(struct flash_bank_s *bank);
-static int ocl_protect_check(struct flash_bank_s *bank);
-static int ocl_info(struct flash_bank_s *bank, char *buf, int buf_size);
-static int ocl_auto_probe(struct flash_bank_s *bank);
-
-flash_driver_t ocl_flash =
-{
- .name = "ocl",
- .register_commands = ocl_register_commands,
- .flash_bank_command = ocl_flash_bank_command,
- .erase = ocl_erase,
- .protect = ocl_protect,
- .write = ocl_write,
- .probe = ocl_probe,
- .erase_check = ocl_erase_check,
- .protect_check = ocl_protect_check,
- .info = ocl_info,
- .auto_probe = ocl_auto_probe
-};
-
typedef struct ocl_priv_s
{
arm_jtag_t *jtag_info;
@@ -59,11 +33,6 @@ typedef struct ocl_priv_s
unsigned int bufalign;
} ocl_priv_t;
-static int ocl_register_commands(struct command_context_s *cmd_ctx)
-{
- return ERROR_OK;
-}
-
static int ocl_erase_check(struct flash_bank_s *bank)
{
return ERROR_OK;
@@ -378,3 +347,16 @@ static int ocl_auto_probe(struct flash_bank_s *bank)
return ERROR_OK;
}
+
+flash_driver_t ocl_flash = {
+ .name = "ocl",
+ .flash_bank_command = &ocl_flash_bank_command,
+ .erase = &ocl_erase,
+ .protect = &ocl_protect,
+ .write = &ocl_write,
+ .probe = &ocl_probe,
+ .erase_check = &ocl_erase_check,
+ .protect_check = &ocl_protect_check,
+ .info = &ocl_info,
+ .auto_probe = &ocl_auto_probe,
+ };