diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-09 09:20:33 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-09 18:42:47 -0800 |
commit | 8b5c5c054d7ae08990e817a52bd28a326b27e54a (patch) | |
tree | 7f237043d7a60aa936be83099f5bbea49193f0e0 /src/flash/s3c2440_nand.c | |
parent | 5c95741df7a582ef4901bc18f85f7c4f38b252dd (diff) | |
download | openocd+libswd-8b5c5c054d7ae08990e817a52bd28a326b27e54a.tar.gz openocd+libswd-8b5c5c054d7ae08990e817a52bd28a326b27e54a.tar.bz2 openocd+libswd-8b5c5c054d7ae08990e817a52bd28a326b27e54a.tar.xz openocd+libswd-8b5c5c054d7ae08990e817a52bd28a326b27e54a.zip |
flash/*nand*.c: remove useless declarations
Remove useless forward declarations.
Moves command registration to end of files.
Moves flash structure definition to end of files.
Signed-off-by: Zachary T Welch <zw@superlucidity.net>
Diffstat (limited to 'src/flash/s3c2440_nand.c')
-rw-r--r-- | src/flash/s3c2440_nand.c | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/src/flash/s3c2440_nand.c b/src/flash/s3c2440_nand.c index 54875da5..2321382c 100644 --- a/src/flash/s3c2440_nand.c +++ b/src/flash/s3c2440_nand.c @@ -31,29 +31,6 @@ #include "s3c24xx_nand.h" -static int s3c2440_nand_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct nand_device_s *device); -static int s3c2440_init(struct nand_device_s *device); -//static int s3c2440_nand_ready(struct nand_device_s *device, int timeout); - -nand_flash_controller_t s3c2440_nand_controller = -{ - .name = "s3c2440", - .nand_device_command = s3c2440_nand_device_command, - .register_commands = s3c24xx_register_commands, - .init = s3c2440_init, - .reset = s3c24xx_reset, - .command = s3c24xx_command, - .address = s3c24xx_address, - .write_data = s3c24xx_write_data, - .read_data = s3c24xx_read_data, - .write_page = s3c24xx_write_page, - .read_page = s3c24xx_read_page, - .write_block_data = s3c2440_write_block_data, - .read_block_data = s3c2440_read_block_data, - .controller_ready = s3c24xx_controller_ready, - .nand_ready = s3c2440_nand_ready, -}; - static int s3c2440_nand_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct nand_device_s *device) @@ -181,3 +158,21 @@ int s3c2440_write_block_data(struct nand_device_s *device, uint8_t *data, int da return ERROR_OK; } + +nand_flash_controller_t s3c2440_nand_controller = { + .name = "s3c2440", + .nand_device_command = &s3c2440_nand_device_command, + .register_commands = &s3c24xx_register_commands, + .init = &s3c2440_init, + .reset = &s3c24xx_reset, + .command = &s3c24xx_command, + .address = &s3c24xx_address, + .write_data = &s3c24xx_write_data, + .read_data = &s3c24xx_read_data, + .write_page = s3c24xx_write_page, + .read_page = s3c24xx_read_page, + .write_block_data = &s3c2440_write_block_data, + .read_block_data = &s3c2440_read_block_data, + .controller_ready = &s3c24xx_controller_ready, + .nand_ready = &s3c2440_nand_ready, + }; |