/** NAND device command called when driver is instantiated during configuration. */
__NAND_DEVICE_COMMAND((*nand_device_command));
- /** Register controller specific commands as a TCL interface to the driver. */
- int (*register_commands)(struct command_context *cmd_ctx);
-
/** Initialize the NAND device. */
int (*init)(struct nand_device *nand);
/** Read a page from the NAND device. */
int (*read_page)(struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size);
- /** Check if the controller is ready for more instructions with timeout. */
- int (*controller_ready)(struct nand_device *nand, int timeout);
-
/** Check if the NAND device is ready for more instructions with timeout. */
int (*nand_ready)(struct nand_device *nand, int timeout);
};
.read_data = lpc3180_read_data,
.write_page = lpc3180_write_page,
.read_page = lpc3180_read_page,
- .controller_ready = lpc3180_controller_ready,
.nand_ready = lpc3180_nand_ready,
};
static int imx27_command(struct nand_device *nand, uint8_t command);
static int imx27_address(struct nand_device *nand, uint8_t address);
-static int imx27_controller_ready(struct nand_device *nand, int tout);
NAND_DEVICE_COMMAND_HANDLER(imx27_nand_device_command)
{
return ERROR_NAND_OPERATION_FAILED;
}
-static int imx27_nand_ready(struct nand_device *nand, int timeout)
-{
- return imx27_controller_ready(nand, timeout);
-}
-
static int imx27_reset(struct nand_device *nand)
{
/*
return ERROR_OK;
}
-static int imx27_controller_ready(struct nand_device *nand, int tout)
+static int imx27_nand_ready(struct nand_device *nand, int tout)
{
uint16_t poll_complete_status;
struct mx2_nf_controller *mx2_nf_info = nand->controller_priv;
.read_data = &imx27_read_data,
.write_page = &imx27_write_page,
.read_page = &imx27_read_page,
- .controller_ready = &imx27_controller_ready,
.nand_ready = &imx27_nand_ready,
};
static int imx31_command (struct nand_device *nand, uint8_t command);
static int imx31_address (struct nand_device *nand, uint8_t address);
-static int imx31_controller_ready (struct nand_device *nand, int tout);
NAND_DEVICE_COMMAND_HANDLER(imx31_nand_device_command)
{
return ERROR_NAND_OPERATION_FAILED;
}
-static int imx31_nand_ready (struct nand_device *nand, int timeout)
-{
- return imx31_controller_ready (nand, timeout);
-}
-
static int imx31_reset (struct nand_device *nand)
{
/*
return ERROR_OK;
}
-static int imx31_controller_ready (struct nand_device *nand, int tout)
+static int imx31_nand_ready (struct nand_device *nand, int tout)
{
uint16_t poll_complete_status;
struct mx3_nf_controller *mx3_nf_info = nand->controller_priv;
.read_data = &imx31_read_data,
.write_page = &imx31_write_page,
.read_page = &imx31_read_page,
- .controller_ready = &imx31_controller_ready,
.nand_ready = &imx31_nand_ready,
};
return nonce_nand_command(nand, NAND_CMD_RESET);
}
-static int nonce_nand_controller_ready(struct nand_device *nand, int timeout)
-{
- return true;
-}
-
NAND_DEVICE_COMMAND_HANDLER(nonce_nand_device_command)
{
return ERROR_OK;
.read_data = &nonce_nand_read,
.write_data = &nonce_nand_write,
.write_block_data = &nonce_nand_fast_block_write,
- .controller_ready = &nonce_nand_controller_ready,
};
return orion_nand_command(nand, NAND_CMD_RESET);
}
-static int orion_nand_controller_ready(struct nand_device *nand, int timeout)
-{
- return 1;
-}
-
NAND_DEVICE_COMMAND_HANDLER(orion_nand_device_command)
{
struct orion_nand_controller *hw;
.write_data = orion_nand_write,
.write_block_data = orion_nand_fast_block_write,
.reset = orion_nand_reset,
- .controller_ready = orion_nand_controller_ready,
.nand_device_command = orion_nand_device_command,
.init = orion_nand_init,
};
.read_data = &s3c2410_read_data,
.write_page = s3c24xx_write_page,
.read_page = s3c24xx_read_page,
- .controller_ready = &s3c24xx_controller_ready,
.nand_ready = &s3c2410_nand_ready,
};
.read_page = s3c24xx_read_page,
.write_block_data = &s3c2440_write_block_data,
.read_block_data = &s3c2440_read_block_data,
- .controller_ready = &s3c24xx_controller_ready,
.nand_ready = &s3c2440_nand_ready,
};
.read_page = s3c24xx_read_page,
.write_block_data = &s3c2440_write_block_data,
.read_block_data = &s3c2440_read_block_data,
- .controller_ready = &s3c24xx_controller_ready,
.nand_ready = &s3c2440_nand_ready,
};
.read_page = s3c24xx_read_page,
.write_block_data = &s3c2440_write_block_data,
.read_block_data = &s3c2440_read_block_data,
- .controller_ready = &s3c24xx_controller_ready,
.nand_ready = &s3c2440_nand_ready,
};
target_read_u8(target, s3c24xx_info->data, data);
return ERROR_OK;
}
-
-int s3c24xx_controller_ready(struct nand_device *nand, int timeout)
-{
- return 1;
-}
int s3c24xx_write_data(struct nand_device *nand, uint16_t data);
int s3c24xx_read_data(struct nand_device *nand, void *data);
-int s3c24xx_controller_ready(struct nand_device *nand, int tout);
-
#define s3c24xx_write_page NULL
#define s3c24xx_read_page NULL
.read_page = s3c24xx_read_page,
.write_block_data = &s3c2440_write_block_data,
.read_block_data = &s3c2440_read_block_data,
- .controller_ready = &s3c24xx_controller_ready,
.nand_ready = &s3c2440_nand_ready,
};