Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mtd: spinand: Propagate the bus interface across core helpers

For now all drivers provide SSDR variants only. When we add support for
ODTR modes, there will be a need to differentiate the type of variant we
target as well as the need to check if we support one or the other type
of operations.

Pass this parameter to lower level helpers, which for now is unused, in
order to simplify the patch introducing ODTR support.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

+7 -6
+7 -6
drivers/mtd/nand/spi/core.c
··· 1411 1411 } 1412 1412 1413 1413 static int spinand_support_vendor_ops(struct spinand_device *spinand, 1414 - const struct spinand_info *info) 1414 + const struct spinand_info *info, 1415 + enum spinand_bus_interface iface) 1415 1416 { 1416 1417 int i; 1417 1418 ··· 1433 1432 } 1434 1433 1435 1434 static const struct spi_mem_op * 1436 - spinand_select_op_variant(struct spinand_device *spinand, 1435 + spinand_select_op_variant(struct spinand_device *spinand, enum spinand_bus_interface iface, 1437 1436 const struct spinand_op_variants *variants) 1438 1437 { 1439 1438 struct nand_device *nand = spinand_to_nand(spinand); ··· 1523 1522 spinand->read_retries = table[i].read_retries; 1524 1523 spinand->set_read_retry = table[i].set_read_retry; 1525 1524 1526 - op = spinand_select_op_variant(spinand, 1525 + op = spinand_select_op_variant(spinand, SSDR, 1527 1526 info->op_variants.read_cache); 1528 1527 if (!op) 1529 1528 return -EOPNOTSUPP; 1530 1529 1531 1530 spinand->ssdr_op_templates.read_cache = op; 1532 1531 1533 - op = spinand_select_op_variant(spinand, 1532 + op = spinand_select_op_variant(spinand, SSDR, 1534 1533 info->op_variants.write_cache); 1535 1534 if (!op) 1536 1535 return -EOPNOTSUPP; 1537 1536 1538 1537 spinand->ssdr_op_templates.write_cache = op; 1539 1538 1540 - op = spinand_select_op_variant(spinand, 1539 + op = spinand_select_op_variant(spinand, SSDR, 1541 1540 info->op_variants.update_cache); 1542 1541 if (!op) 1543 1542 return -EOPNOTSUPP; 1544 1543 1545 1544 spinand->ssdr_op_templates.update_cache = op; 1546 1545 1547 - ret = spinand_support_vendor_ops(spinand, info); 1546 + ret = spinand_support_vendor_ops(spinand, info, SSDR); 1548 1547 if (ret) 1549 1548 return ret; 1550 1549