mtd: rawnand: Propage CS selection to sub operations
Some controller using the instruction parse infrastructure might need to know which CS a specific sub-operation is targeting. Let's propagate this information. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20200505101353.1776394-2-boris.brezillon@collabora.com
This commit is contained in:

committed by
Miquel Raynal

parent
699d3e6a87
commit
1f1ec62262
@@ -2174,7 +2174,7 @@ static void nand_op_parser_trace(const struct nand_op_parser_ctx *ctx)
|
|||||||
char *prefix = " ";
|
char *prefix = " ";
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
pr_debug("executing subop:\n");
|
pr_debug("executing subop (CS%d):\n", ctx->subop.cs);
|
||||||
|
|
||||||
for (i = 0; i < ctx->ninstrs; i++) {
|
for (i = 0; i < ctx->ninstrs; i++) {
|
||||||
instr = &ctx->instrs[i];
|
instr = &ctx->instrs[i];
|
||||||
@@ -2238,6 +2238,7 @@ int nand_op_parser_exec_op(struct nand_chip *chip,
|
|||||||
const struct nand_operation *op, bool check_only)
|
const struct nand_operation *op, bool check_only)
|
||||||
{
|
{
|
||||||
struct nand_op_parser_ctx ctx = {
|
struct nand_op_parser_ctx ctx = {
|
||||||
|
.subop.cs = op->cs,
|
||||||
.subop.instrs = op->instrs,
|
.subop.instrs = op->instrs,
|
||||||
.instrs = op->instrs,
|
.instrs = op->instrs,
|
||||||
.ninstrs = op->ninstrs,
|
.ninstrs = op->ninstrs,
|
||||||
|
@@ -709,6 +709,7 @@ struct nand_op_instr {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* struct nand_subop - a sub operation
|
* struct nand_subop - a sub operation
|
||||||
|
* @cs: the CS line to select for this NAND sub-operation
|
||||||
* @instrs: array of instructions
|
* @instrs: array of instructions
|
||||||
* @ninstrs: length of the @instrs array
|
* @ninstrs: length of the @instrs array
|
||||||
* @first_instr_start_off: offset to start from for the first instruction
|
* @first_instr_start_off: offset to start from for the first instruction
|
||||||
@@ -724,6 +725,7 @@ struct nand_op_instr {
|
|||||||
* controller driver.
|
* controller driver.
|
||||||
*/
|
*/
|
||||||
struct nand_subop {
|
struct nand_subop {
|
||||||
|
unsigned int cs;
|
||||||
const struct nand_op_instr *instrs;
|
const struct nand_op_instr *instrs;
|
||||||
unsigned int ninstrs;
|
unsigned int ninstrs;
|
||||||
unsigned int first_instr_start_off;
|
unsigned int first_instr_start_off;
|
||||||
|
Reference in New Issue
Block a user