diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2010-12-31 19:46:09 +0800 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2011-01-02 19:58:58 +0100 |
commit | 093ec6656ab7fb523b8a811f4bd628e3b50f8367 (patch) | |
tree | 456ca54797aad5484fc6a5d868fedf48da2e0fab /src/flash/nand/s3c2410.c | |
parent | f49283a062192800a3263dcef620911010ffc718 (diff) | |
download | riscv-openocd-093ec6656ab7fb523b8a811f4bd628e3b50f8367.zip riscv-openocd-093ec6656ab7fb523b8a811f4bd628e3b50f8367.tar.gz riscv-openocd-093ec6656ab7fb523b8a811f4bd628e3b50f8367.tar.bz2 |
NAND/S3CXXXX: remove private "target" copy
Remove "target" form private data, and use
common one in struct nand_block.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src/flash/nand/s3c2410.c')
-rw-r--r-- | src/flash/nand/s3c2410.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/flash/nand/s3c2410.c b/src/flash/nand/s3c2410.c index 1827c74..e998f65 100644 --- a/src/flash/nand/s3c2410.c +++ b/src/flash/nand/s3c2410.c @@ -46,8 +46,7 @@ NAND_DEVICE_COMMAND_HANDLER(s3c2410_nand_device_command) static int s3c2410_init(struct nand_device *nand) { - struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; - struct target *target = s3c24xx_info->target; + struct target *target = nand->target; target_write_u32(target, S3C2410_NFCONF, S3C2410_NFCONF_EN | S3C2410_NFCONF_TACLS(3) | @@ -58,8 +57,7 @@ static int s3c2410_init(struct nand_device *nand) static int s3c2410_write_data(struct nand_device *nand, uint16_t data) { - struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; - struct target *target = s3c24xx_info->target; + struct target *target = nand->target; if (target->state != TARGET_HALTED) { LOG_ERROR("target must be halted to use S3C24XX NAND flash controller"); @@ -72,8 +70,7 @@ static int s3c2410_write_data(struct nand_device *nand, uint16_t data) static int s3c2410_read_data(struct nand_device *nand, void *data) { - struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; - struct target *target = s3c24xx_info->target; + struct target *target = nand->target; if (target->state != TARGET_HALTED) { LOG_ERROR("target must be halted to use S3C24XX NAND flash controller"); @@ -86,8 +83,7 @@ static int s3c2410_read_data(struct nand_device *nand, void *data) static int s3c2410_nand_ready(struct nand_device *nand, int timeout) { - struct s3c24xx_nand_controller *s3c24xx_info = nand->controller_priv; - struct target *target = s3c24xx_info->target; + struct target *target = nand->target; uint8_t status; if (target->state != TARGET_HALTED) { |