]> git.sur5r.net Git - openocd/blobdiff - src/flash/nand/mx3.c
flash/nand: review NAND driver interface
[openocd] / src / flash / nand / mx3.c
index 4823534c04c4c1cc6d1c2337a49d2869bdfd7728..7676d1b8478e5d7f49fc5372bfdf5c90da6cf8a6 100644 (file)
@@ -47,7 +47,7 @@ static const char sram_buffer_bounds_err_msg[] =
        "trying to access out of SRAM buffer bound (addr=0x%" PRIx32 ")";
 static const char get_status_register_err_msg[] = "can't get NAND status";
 static uint32_t in_sram_address;
-unsigned char sign_of_sequental_byte_read;
+static unsigned char sign_of_sequental_byte_read;
 
 static int test_iomux_settings (struct target * target, uint32_t value,
                                uint32_t mask, const char *text);
@@ -61,7 +61,6 @@ static int do_data_output (struct nand_device *nand);
 
 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)
 {
@@ -312,11 +311,6 @@ static int imx31_write_data (struct nand_device *nand, uint16_t data)
        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)
 {
        /*
@@ -438,7 +432,7 @@ static int imx31_address (struct nand_device *nand, uint8_t address)
        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;
@@ -876,6 +870,5 @@ struct nand_flash_controller imx31_nand_flash_controller = {
                .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,
        };