diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-13 10:11:13 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-13 11:58:14 -0800 |
commit | 0f1163e823c6ca3c2a81fa296157f5dde0635fea (patch) | |
tree | 60551098bba500cd8b7fc4bd669d64fd3ed8f061 /src/flash/davinci_nand.c | |
parent | d0dee7ccafcf87259fadf6c5de43df8583b0e885 (diff) | |
download | openocd+libswd-0f1163e823c6ca3c2a81fa296157f5dde0635fea.tar.gz openocd+libswd-0f1163e823c6ca3c2a81fa296157f5dde0635fea.tar.bz2 openocd+libswd-0f1163e823c6ca3c2a81fa296157f5dde0635fea.tar.xz openocd+libswd-0f1163e823c6ca3c2a81fa296157f5dde0635fea.zip |
target_t -> struct target
Remove misleading typedef and redundant suffix from struct target.
Diffstat (limited to 'src/flash/davinci_nand.c')
-rw-r--r-- | src/flash/davinci_nand.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/flash/davinci_nand.c b/src/flash/davinci_nand.c index d4c16197..cc144206 100644 --- a/src/flash/davinci_nand.c +++ b/src/flash/davinci_nand.c @@ -38,7 +38,7 @@ enum ecc { }; struct davinci_nand { - target_t *target; + struct target *target; uint8_t chipsel; /* chipselect 0..3 == CS2..CS5 */ uint8_t eccmode; @@ -69,7 +69,7 @@ struct davinci_nand { #define NANDERRADDR 0xd0 /* 4-bit ECC err addr, 1st of 2 */ #define NANDERRVAL 0xd8 /* 4-bit ECC err value, 1st of 2 */ -static int halted(target_t *target, const char *label) +static int halted(struct target *target, const char *label) { if (target->state == TARGET_HALTED) return true; @@ -86,7 +86,7 @@ static int davinci_register_commands(struct command_context_s *cmd_ctx) static int davinci_init(struct nand_device_s *nand) { struct davinci_nand *info = nand->controller_priv; - target_t *target = info->target; + struct target *target = info->target; uint32_t nandfcr; if (!halted(target, "init")) @@ -116,7 +116,7 @@ static int davinci_reset(struct nand_device_s *nand) static int davinci_nand_ready(struct nand_device_s *nand, int timeout) { struct davinci_nand *info = nand->controller_priv; - target_t *target = info->target; + struct target *target = info->target; uint32_t nandfsr; /* NOTE: return code is zero/error, else success; not ERROR_* */ @@ -139,7 +139,7 @@ static int davinci_nand_ready(struct nand_device_s *nand, int timeout) static int davinci_command(struct nand_device_s *nand, uint8_t command) { struct davinci_nand *info = nand->controller_priv; - target_t *target = info->target; + struct target *target = info->target; if (!halted(target, "command")) return ERROR_NAND_OPERATION_FAILED; @@ -151,7 +151,7 @@ static int davinci_command(struct nand_device_s *nand, uint8_t command) static int davinci_address(struct nand_device_s *nand, uint8_t address) { struct davinci_nand *info = nand->controller_priv; - target_t *target = info->target; + struct target *target = info->target; if (!halted(target, "address")) return ERROR_NAND_OPERATION_FAILED; @@ -163,7 +163,7 @@ static int davinci_address(struct nand_device_s *nand, uint8_t address) static int davinci_write_data(struct nand_device_s *nand, uint16_t data) { struct davinci_nand *info = nand->controller_priv; - target_t *target = info->target; + struct target *target = info->target; if (!halted(target, "write_data")) return ERROR_NAND_OPERATION_FAILED; @@ -175,7 +175,7 @@ static int davinci_write_data(struct nand_device_s *nand, uint16_t data) static int davinci_read_data(struct nand_device_s *nand, void *data) { struct davinci_nand *info = nand->controller_priv; - target_t *target = info->target; + struct target *target = info->target; if (!halted(target, "read_data")) return ERROR_NAND_OPERATION_FAILED; @@ -190,7 +190,7 @@ static int davinci_read_block_data(struct nand_device_s *nand, uint8_t *data, int data_size) { struct davinci_nand *info = nand->controller_priv; - target_t *target = info->target; + struct target *target = info->target; uint32_t nfdata = info->data; uint32_t tmp; @@ -223,7 +223,7 @@ static int davinci_write_block_data(struct nand_device_s *nand, uint8_t *data, int data_size) { struct davinci_nand *info = nand->controller_priv; - target_t *target = info->target; + struct target *target = info->target; uint32_t nfdata = info->data; uint32_t tmp; int status; @@ -322,7 +322,7 @@ static int davinci_read_page(struct nand_device_s *nand, uint32_t page, static void davinci_write_pagecmd(struct nand_device_s *nand, uint8_t cmd, uint32_t page) { struct davinci_nand *info = nand->controller_priv; - target_t *target = info->target; + struct target *target = info->target; int page3 = nand->address_cycles - (nand->page_size == 512); /* write command ({page,otp}x{read,program} */ @@ -346,7 +346,7 @@ static int davinci_writepage_tail(struct nand_device_s *nand, uint8_t *oob, uint32_t oob_size) { struct davinci_nand *info = nand->controller_priv; - target_t *target = info->target; + struct target *target = info->target; uint8_t status; if (oob_size) @@ -379,7 +379,7 @@ static int davinci_write_page_ecc1(struct nand_device_s *nand, uint32_t page, { unsigned oob_offset; struct davinci_nand *info = nand->controller_priv; - target_t *target = info->target; + struct target *target = info->target; const uint32_t fcr_addr = info->aemif + NANDFCR; const uint32_t ecc1_addr = info->aemif + NANDFECC + (4 * info->chipsel); uint32_t fcr, ecc1; @@ -467,7 +467,7 @@ static int davinci_write_page_ecc4(struct nand_device_s *nand, uint32_t page, struct davinci_nand *info = nand->controller_priv; const uint8_t *l; - target_t *target = info->target; + struct target *target = info->target; const uint32_t fcr_addr = info->aemif + NANDFCR; const uint32_t ecc4_addr = info->aemif + NAND4BITECC; uint32_t fcr, ecc4; @@ -547,7 +547,7 @@ static int davinci_write_page_ecc4infix(struct nand_device_s *nand, uint32_t pag uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size) { struct davinci_nand *info = nand->controller_priv; - target_t *target = info->target; + struct target *target = info->target; const uint32_t fcr_addr = info->aemif + NANDFCR; const uint32_t ecc4_addr = info->aemif + NAND4BITECC; uint32_t fcr, ecc4; @@ -632,7 +632,7 @@ static int davinci_read_page_ecc4infix(struct nand_device_s *nand, uint32_t page NAND_DEVICE_COMMAND_HANDLER(davinci_nand_device_command) { struct davinci_nand *info; - target_t *target; + struct target *target; unsigned long chip, aemif; enum ecc eccmode; int chipsel; |