diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-06-13 15:45:39 +0200 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2017-06-20 09:14:32 +0200 |
commit | fa6134e5457d3177b82b35fa4004505f2571150a (patch) | |
tree | 52e84d98848274706a771075c4fbe13d4b0e749d /drivers/mtd/nand/denali.h | |
parent | mtd: nand: denali: rework interrupt handling (diff) | |
download | linux-fa6134e5457d3177b82b35fa4004505f2571150a.tar.xz linux-fa6134e5457d3177b82b35fa4004505f2571150a.zip |
mtd: nand: denali: switch over to cmd_ctrl instead of cmdfunc
The NAND_CMD_SET_FEATURES support is missing from denali_cmdfunc().
We also see /* TODO: Read OOB data */ comment.
It would be possible to add more commands along with the current
implementation, but having ->cmd_ctrl() seems a better approach from
the discussion with Boris [1].
Rely on the default ->cmdfunc() from the framework and implement the
driver's own ->cmd_ctrl().
This transition also fixes NAND_CMD_STATUS and NAND_CMD_PARAM handling.
NAND_CMD_STATUS was just faked by the register read, so the only valid
bit was the WP bit. NAND_CMD_PARAM was completely broken; not only the
command sent on the bus was NAND_CMD_STATUS instead of NAND_CMD_PARAM,
but also the driver was only reading 8 bytes, while the parameter page
contains several hundreds of bytes.
Also add ->write_byte(), which is needed for write direction commands,
->read/write_buf(16), which will be used some commits later.
->read_word() is not used for now, but the core may call it in the
future.
Now, this driver can drop nand_onfi_get_set_features_notsupp().
[1] https://lkml.org/lkml/2017/3/15/97
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/mtd/nand/denali.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/mtd/nand/denali.h b/drivers/mtd/nand/denali.h index a0ac0f84f8b5..a84d8784ee98 100644 --- a/drivers/mtd/nand/denali.h +++ b/drivers/mtd/nand/denali.h @@ -306,8 +306,6 @@ #define MODE_11 0x0C000000 struct nand_buf { - int head; - int tail; uint8_t *buf; dma_addr_t dma_buf; }; |