From ed9c4ef3c41ac21d0a08cb7e07ab68d0c7930138 Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Fri, 13 Nov 2009 07:38:52 -0800 Subject: [PATCH] s3c24xx_nand_controller_t -> struct s3c24xx_nand_controller Remove misleading typedef and redundant suffix from struct s3c24xx_nand_controller. --- src/flash/s3c2410_nand.c | 10 +++++----- src/flash/s3c2412_nand.c | 4 ++-- src/flash/s3c2440_nand.c | 10 +++++----- src/flash/s3c2443_nand.c | 4 ++-- src/flash/s3c24xx_nand.c | 14 +++++++------- src/flash/s3c24xx_nand.h | 6 +++--- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/flash/s3c2410_nand.c b/src/flash/s3c2410_nand.c index c57fe936..4d084403 100644 --- a/src/flash/s3c2410_nand.c +++ b/src/flash/s3c2410_nand.c @@ -32,7 +32,7 @@ NAND_DEVICE_COMMAND_HANDLER(s3c2410_nand_device_command) { - s3c24xx_nand_controller_t *info; + struct s3c24xx_nand_controller *info; CALL_S3C24XX_DEVICE_COMMAND(nand, &info); /* fill in the address fields for the core device */ @@ -46,7 +46,7 @@ NAND_DEVICE_COMMAND_HANDLER(s3c2410_nand_device_command) static int s3c2410_init(struct nand_device_s *nand) { - s3c24xx_nand_controller_t *s3c24xx_info = nand->controller_priv; + struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; target_t *target = s3c24xx_info->target; target_write_u32(target, S3C2410_NFCONF, @@ -58,7 +58,7 @@ static int s3c2410_init(struct nand_device_s *nand) static int s3c2410_write_data(struct nand_device_s *nand, uint16_t data) { - s3c24xx_nand_controller_t *s3c24xx_info = nand->controller_priv; + struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; target_t *target = s3c24xx_info->target; if (target->state != TARGET_HALTED) { @@ -72,7 +72,7 @@ static int s3c2410_write_data(struct nand_device_s *nand, uint16_t data) static int s3c2410_read_data(struct nand_device_s *nand, void *data) { - s3c24xx_nand_controller_t *s3c24xx_info = nand->controller_priv; + struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; target_t *target = s3c24xx_info->target; if (target->state != TARGET_HALTED) { @@ -86,7 +86,7 @@ static int s3c2410_read_data(struct nand_device_s *nand, void *data) static int s3c2410_nand_ready(struct nand_device_s *nand, int timeout) { - s3c24xx_nand_controller_t *s3c24xx_info = nand->controller_priv; + struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; target_t *target = s3c24xx_info->target; uint8_t status; diff --git a/src/flash/s3c2412_nand.c b/src/flash/s3c2412_nand.c index b41705dc..9f456fe5 100644 --- a/src/flash/s3c2412_nand.c +++ b/src/flash/s3c2412_nand.c @@ -32,7 +32,7 @@ NAND_DEVICE_COMMAND_HANDLER(s3c2412_nand_device_command) { - s3c24xx_nand_controller_t *info; + struct s3c24xx_nand_controller *info; CALL_S3C24XX_DEVICE_COMMAND(nand, &info); /* fill in the address fields for the core device */ @@ -46,7 +46,7 @@ NAND_DEVICE_COMMAND_HANDLER(s3c2412_nand_device_command) static int s3c2412_init(struct nand_device_s *nand) { - s3c24xx_nand_controller_t *s3c24xx_info = nand->controller_priv; + struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; target_t *target = s3c24xx_info->target; target_write_u32(target, S3C2410_NFCONF, diff --git a/src/flash/s3c2440_nand.c b/src/flash/s3c2440_nand.c index 8c056878..40037c7f 100644 --- a/src/flash/s3c2440_nand.c +++ b/src/flash/s3c2440_nand.c @@ -33,7 +33,7 @@ NAND_DEVICE_COMMAND_HANDLER(s3c2440_nand_device_command) { - s3c24xx_nand_controller_t *info; + struct s3c24xx_nand_controller *info; CALL_S3C24XX_DEVICE_COMMAND(nand, &info); /* fill in the address fields for the core device */ @@ -47,7 +47,7 @@ NAND_DEVICE_COMMAND_HANDLER(s3c2440_nand_device_command) static int s3c2440_init(struct nand_device_s *nand) { - s3c24xx_nand_controller_t *s3c24xx_info = nand->controller_priv; + struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; target_t *target = s3c24xx_info->target; target_write_u32(target, S3C2410_NFCONF, @@ -63,7 +63,7 @@ static int s3c2440_init(struct nand_device_s *nand) int s3c2440_nand_ready(struct nand_device_s *nand, int timeout) { - s3c24xx_nand_controller_t *s3c24xx_info = nand->controller_priv; + struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; target_t *target = s3c24xx_info->target; uint8_t status; @@ -89,7 +89,7 @@ int s3c2440_nand_ready(struct nand_device_s *nand, int timeout) int s3c2440_read_block_data(struct nand_device_s *nand, uint8_t *data, int data_size) { - s3c24xx_nand_controller_t *s3c24xx_info = nand->controller_priv; + struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; target_t *target = s3c24xx_info->target; uint32_t nfdata = s3c24xx_info->data; uint32_t tmp; @@ -125,7 +125,7 @@ int s3c2440_read_block_data(struct nand_device_s *nand, uint8_t *data, int data_ int s3c2440_write_block_data(struct nand_device_s *nand, uint8_t *data, int data_size) { - s3c24xx_nand_controller_t *s3c24xx_info = nand->controller_priv; + struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; target_t *target = s3c24xx_info->target; uint32_t nfdata = s3c24xx_info->data; uint32_t tmp; diff --git a/src/flash/s3c2443_nand.c b/src/flash/s3c2443_nand.c index 30549f6b..0f086441 100644 --- a/src/flash/s3c2443_nand.c +++ b/src/flash/s3c2443_nand.c @@ -33,7 +33,7 @@ NAND_DEVICE_COMMAND_HANDLER(s3c2443_nand_device_command) { - s3c24xx_nand_controller_t *info; + struct s3c24xx_nand_controller *info; CALL_S3C24XX_DEVICE_COMMAND(nand, &info); /* fill in the address fields for the core device */ @@ -47,7 +47,7 @@ NAND_DEVICE_COMMAND_HANDLER(s3c2443_nand_device_command) static int s3c2443_init(struct nand_device_s *nand) { - s3c24xx_nand_controller_t *s3c24xx_info = nand->controller_priv; + struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; target_t *target = s3c24xx_info->target; target_write_u32(target, S3C2410_NFCONF, diff --git a/src/flash/s3c24xx_nand.c b/src/flash/s3c24xx_nand.c index e2bc0053..17de5d41 100644 --- a/src/flash/s3c24xx_nand.c +++ b/src/flash/s3c24xx_nand.c @@ -33,9 +33,9 @@ S3C24XX_DEVICE_COMMAND() { - s3c24xx_nand_controller_t *s3c24xx_info; + struct s3c24xx_nand_controller *s3c24xx_info; - s3c24xx_info = malloc(sizeof(s3c24xx_nand_controller_t)); + s3c24xx_info = malloc(sizeof(struct s3c24xx_nand_controller)); if (s3c24xx_info == NULL) { LOG_ERROR("no memory for nand controller\n"); return -ENOMEM; @@ -59,7 +59,7 @@ int s3c24xx_register_commands(struct command_context_s *cmd_ctx) int s3c24xx_reset(struct nand_device_s *nand) { - s3c24xx_nand_controller_t *s3c24xx_info = nand->controller_priv; + struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; target_t *target = s3c24xx_info->target; if (target->state != TARGET_HALTED) { @@ -74,7 +74,7 @@ int s3c24xx_reset(struct nand_device_s *nand) int s3c24xx_command(struct nand_device_s *nand, uint8_t command) { - s3c24xx_nand_controller_t *s3c24xx_info = nand->controller_priv; + struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; target_t *target = s3c24xx_info->target; if (target->state != TARGET_HALTED) { @@ -89,7 +89,7 @@ int s3c24xx_command(struct nand_device_s *nand, uint8_t command) int s3c24xx_address(struct nand_device_s *nand, uint8_t address) { - s3c24xx_nand_controller_t *s3c24xx_info = nand->controller_priv; + struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; target_t *target = s3c24xx_info->target; if (target->state != TARGET_HALTED) { @@ -103,7 +103,7 @@ int s3c24xx_address(struct nand_device_s *nand, uint8_t address) int s3c24xx_write_data(struct nand_device_s *nand, uint16_t data) { - s3c24xx_nand_controller_t *s3c24xx_info = nand->controller_priv; + struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; target_t *target = s3c24xx_info->target; if (target->state != TARGET_HALTED) { @@ -117,7 +117,7 @@ int s3c24xx_write_data(struct nand_device_s *nand, uint16_t data) int s3c24xx_read_data(struct nand_device_s *nand, void *data) { - s3c24xx_nand_controller_t *s3c24xx_info = nand->controller_priv; + struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; target_t *target = s3c24xx_info->target; if (target->state != TARGET_HALTED) { diff --git a/src/flash/s3c24xx_nand.h b/src/flash/s3c24xx_nand.h index 3f304a98..6cfad3d3 100644 --- a/src/flash/s3c24xx_nand.h +++ b/src/flash/s3c24xx_nand.h @@ -30,7 +30,7 @@ #include "nand.h" #include "s3c24xx_regs_nand.h" -typedef struct s3c24xx_nand_controller_s +struct s3c24xx_nand_controller { struct target_s *target; @@ -39,7 +39,7 @@ typedef struct s3c24xx_nand_controller_s uint32_t addr; uint32_t data; uint32_t nfstat; -} s3c24xx_nand_controller_t; +}; /* Default to using the un-translated NAND register based address */ #undef S3C2410_NFREG @@ -48,7 +48,7 @@ typedef struct s3c24xx_nand_controller_s #define S3C24XX_DEVICE_COMMAND() \ COMMAND_HELPER(s3c24xx_nand_device_command, \ struct nand_device_s *nand, \ - s3c24xx_nand_controller_t **info) + struct s3c24xx_nand_controller **info) S3C24XX_DEVICE_COMMAND(); -- 2.39.5