summaryrefslogtreecommitdiff
path: root/src/flash/nand/s3c2410.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/flash/nand/s3c2410.c')
-rw-r--r--src/flash/nand/s3c2410.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/flash/nand/s3c2410.c b/src/flash/nand/s3c2410.c
index 1827c74e..e998f65f 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) {