flash/nand: review NAND driver interface
authorAntonio Borneo <borneo.antonio@gmail.com>
Fri, 31 Dec 2010 11:18:08 +0000 (19:18 +0800)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Sun, 2 Jan 2011 18:49:36 +0000 (19:49 +0100)
From struct nand_flash_controller :
- remove unused field register_commands;
- remove field controller_ready, exported but
  never referenced.
Remove dead code pointed by controller_ready.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
13 files changed:
src/flash/nand/driver.h
src/flash/nand/lpc3180.c
src/flash/nand/mx2.c
src/flash/nand/mx3.c
src/flash/nand/nonce.c
src/flash/nand/orion.c
src/flash/nand/s3c2410.c
src/flash/nand/s3c2412.c
src/flash/nand/s3c2440.c
src/flash/nand/s3c2443.c
src/flash/nand/s3c24xx.c
src/flash/nand/s3c24xx.h
src/flash/nand/s3c6400.c

index deb41b2a96bb0414605ddffff9fcf3b9c49b927a..4edce9fab1d3b75c96111acf982b86a57d1e1689 100644 (file)
@@ -42,9 +42,6 @@ struct nand_flash_controller
        /** 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);
 
@@ -75,9 +72,6 @@ struct nand_flash_controller
        /** 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);
 };
index d81443d1e0d5edef5b55def8cfb9e8cffbdccb00..3285c42f1ecc28905abfa6e2baad09e083c65b10 100644 (file)
@@ -1363,6 +1363,5 @@ struct nand_flash_controller lpc3180_nand_controller = {
        .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,
 };
index 147546d7483d53bf25e304e53b9d8f5f61c21dff..42bb0720f131ba2900d302c9a39a6b74ec5fc0d3 100644 (file)
@@ -73,7 +73,6 @@ static int do_data_output(struct nand_device *nand);
 
 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)
 {
@@ -229,11 +228,6 @@ static int imx27_write_data(struct nand_device *nand, uint16_t data)
        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)
 {
        /*
@@ -342,7 +336,7 @@ static int imx27_address(struct nand_device *nand, uint8_t address)
        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;
@@ -771,6 +765,5 @@ struct nand_flash_controller imx27_nand_flash_controller = {
        .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,
 };
index 7d9cc8b93255c10002590ca1103a189ddebf4fa4..7676d1b8478e5d7f49fc5372bfdf5c90da6cf8a6 100644 (file)
@@ -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,
        };
index ab490aeab2e2f83053efffcb84a93c023768275d..565ad727f35c54924e9019b8f3a80ca3110df776 100644 (file)
@@ -52,11 +52,6 @@ static int nonce_nand_reset(struct nand_device *nand)
        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;
@@ -79,5 +74,4 @@ struct nand_flash_controller nonce_nand_controller =
        .read_data              = &nonce_nand_read,
        .write_data             = &nonce_nand_write,
        .write_block_data       = &nonce_nand_fast_block_write,
-       .controller_ready       = &nonce_nand_controller_ready,
 };
index b46ffaed1fb8a9bf3baeee8608f995d5301c2c92..3ab2364d64ff9ad2f06ec98ab23d4f7e8beedd50 100644 (file)
@@ -116,11 +116,6 @@ static int orion_nand_reset(struct nand_device *nand)
        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;
@@ -175,7 +170,6 @@ struct nand_flash_controller orion_nand_controller =
        .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,
 };
index 3c391bce10453e862a8471db5d2948dbb6a5b54c..1827c74e776a79d5b5f06043c0c8415c29032178 100644 (file)
@@ -118,6 +118,5 @@ struct nand_flash_controller s3c2410_nand_controller = {
                .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,
        };
index 5784305314f161b70583cd2176df0794169c3092..f43f8a69807aff15ef82a72ff86fe0112381e17e 100644 (file)
@@ -74,6 +74,5 @@ struct nand_flash_controller s3c2412_nand_controller = {
                .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,
        };
index d1a421e3cf243d4467fad89f5bbd76170976fac5..797ce242ccfd212e97a67252c08f59cb10691033 100644 (file)
@@ -166,6 +166,5 @@ struct nand_flash_controller s3c2440_nand_controller = {
                .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,
        };
index d3414771fb77b7e057cc47455a79b78231ce18d4..5fb2d927b88533ee9e0d28f3c5de0322e9adcb5c 100644 (file)
@@ -75,6 +75,5 @@ struct nand_flash_controller s3c2443_nand_controller = {
                .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,
        };
index d305b221a58c30f2b6436bd4a26302eb09052222..e3b5c2e23635b74397f4e17c4044602779b263f4 100644 (file)
@@ -126,8 +126,3 @@ int s3c24xx_read_data(struct nand_device *nand, void *data)
        target_read_u8(target, s3c24xx_info->data, data);
        return ERROR_OK;
 }
-
-int s3c24xx_controller_ready(struct nand_device *nand, int timeout)
-{
-       return 1;
-}
index 9424cb3eb3adb16e19d7dc67f296d97841bd32ab..059c84d9ff6619284b3e15086ecc5fdf54855b63 100644 (file)
@@ -68,8 +68,6 @@ int s3c24xx_address(struct nand_device *nand, uint8_t address);
 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
 
index 20b6cc17edd53559b882a8261beb3cd5f31682e9..960447d9f35dd8d3963a9ca6ee185ea6078fcbea 100644 (file)
@@ -71,6 +71,5 @@ struct nand_flash_controller s3c6400_nand_controller = {
                .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,
        };

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)