Merge tag 'nand/for-6.8' into mtd/next
* Raw NAND The most meaningful change being the conversion of the brcmnand driver to the ->exec_op() API, this series brought additional changes to the core in order to help controller drivers to handle themselves the WP pin during destructive operations when relevant. As always, there is as well a whole bunch of miscellaneous W=1 fixes, together with a few runtime fixes (double free, timeout value, OOB layout, missing register initialization) and the usual load of remove callbacks turned into void (which led to switch the txx9ndfmc driver to use module_platform_driver()).
This commit is contained in:
@@ -1003,6 +1003,8 @@ struct nand_op_parser {
|
||||
/**
|
||||
* struct nand_operation - NAND operation descriptor
|
||||
* @cs: the CS line to select for this NAND operation
|
||||
* @deassert_wp: set to true when the operation requires the WP pin to be
|
||||
* de-asserted (ERASE, PROG, ...)
|
||||
* @instrs: array of instructions to execute
|
||||
* @ninstrs: length of the @instrs array
|
||||
*
|
||||
@@ -1010,6 +1012,7 @@ struct nand_op_parser {
|
||||
*/
|
||||
struct nand_operation {
|
||||
unsigned int cs;
|
||||
bool deassert_wp;
|
||||
const struct nand_op_instr *instrs;
|
||||
unsigned int ninstrs;
|
||||
};
|
||||
@@ -1021,6 +1024,14 @@ struct nand_operation {
|
||||
.ninstrs = ARRAY_SIZE(_instrs), \
|
||||
}
|
||||
|
||||
#define NAND_DESTRUCTIVE_OPERATION(_cs, _instrs) \
|
||||
{ \
|
||||
.cs = _cs, \
|
||||
.deassert_wp = true, \
|
||||
.instrs = _instrs, \
|
||||
.ninstrs = ARRAY_SIZE(_instrs), \
|
||||
}
|
||||
|
||||
int nand_op_parser_exec_op(struct nand_chip *chip,
|
||||
const struct nand_op_parser *parser,
|
||||
const struct nand_operation *op, bool check_only);
|
||||
@@ -1104,6 +1115,7 @@ struct nand_controller_ops {
|
||||
* the bus without restarting an entire read operation nor
|
||||
* changing the column.
|
||||
* @supported_op.cont_read: The controller supports sequential cache reads.
|
||||
* @controller_wp: the controller is in charge of handling the WP pin.
|
||||
*/
|
||||
struct nand_controller {
|
||||
struct mutex lock;
|
||||
@@ -1112,6 +1124,7 @@ struct nand_controller {
|
||||
unsigned int data_only_read: 1;
|
||||
unsigned int cont_read: 1;
|
||||
} supported_op;
|
||||
bool controller_wp;
|
||||
};
|
||||
|
||||
static inline void nand_controller_init(struct nand_controller *nfc)
|
||||
|
||||
Reference in New Issue
Block a user