summaryrefslogtreecommitdiff
path: root/src/flash/s3c2410_nand.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
commit8b5c5c054d7ae08990e817a52bd28a326b27e54a (patch)
tree7f237043d7a60aa936be83099f5bbea49193f0e0 /src/flash/s3c2410_nand.c
parent5c95741df7a582ef4901bc18f85f7c4f38b252dd (diff)
downloadopenocd+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/s3c2410_nand.c')
-rw-r--r--src/flash/s3c2410_nand.c40
1 files changed, 16 insertions, 24 deletions
diff --git a/src/flash/s3c2410_nand.c b/src/flash/s3c2410_nand.c
index 26306976..4ec4f23a 100644
--- a/src/flash/s3c2410_nand.c
+++ b/src/flash/s3c2410_nand.c
@@ -30,30 +30,6 @@
#include "s3c24xx_nand.h"
-
-static int s3c2410_nand_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct nand_device_s *device);
-static int s3c2410_init(struct nand_device_s *device);
-static int s3c2410_read_data(struct nand_device_s *device, void *data);
-static int s3c2410_write_data(struct nand_device_s *device, uint16_t data);
-static int s3c2410_nand_ready(struct nand_device_s *device, int timeout);
-
-nand_flash_controller_t s3c2410_nand_controller =
-{
- .name = "s3c2410",
- .nand_device_command = s3c2410_nand_device_command,
- .register_commands = s3c24xx_register_commands,
- .init = s3c2410_init,
- .reset = s3c24xx_reset,
- .command = s3c24xx_command,
- .address = s3c24xx_address,
- .write_data = s3c2410_write_data,
- .read_data = s3c2410_read_data,
- .write_page = s3c24xx_write_page,
- .read_page = s3c24xx_read_page,
- .controller_ready = s3c24xx_controller_ready,
- .nand_ready = s3c2410_nand_ready,
-};
-
static int s3c2410_nand_device_command(struct command_context_s *cmd_ctx, char *cmd,
char **args, int argc,
struct nand_device_s *device)
@@ -136,3 +112,19 @@ static int s3c2410_nand_ready(struct nand_device_s *device, int timeout)
return 0;
}
+
+nand_flash_controller_t s3c2410_nand_controller = {
+ .name = "s3c2410",
+ .nand_device_command = &s3c2410_nand_device_command,
+ .register_commands = &s3c24xx_register_commands,
+ .init = &s3c2410_init,
+ .reset = &s3c24xx_reset,
+ .command = &s3c24xx_command,
+ .address = &s3c24xx_address,
+ .write_data = &s3c2410_write_data,
+ .read_data = &s3c2410_read_data,
+ .write_page = s3c24xx_write_page,
+ .read_page = s3c24xx_read_page,
+ .controller_ready = &s3c24xx_controller_ready,
+ .nand_ready = &s3c2410_nand_ready,
+ };