]> git.sur5r.net Git - openocd/blobdiff - src/flash/nand/s3c2410.c
NAND/S3CXXXX: remove private "target" copy
[openocd] / src / flash / nand / s3c2410.c
index 1827c74e776a79d5b5f06043c0c8415c29032178..e998f65fd5787467cf24b9fd8aaeb4a2340b2f37 100644 (file)
@@ -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) {