mtd: rawnand: Pass a nand_chip object to ecc->hwctl()
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one. Now is ecc->hwctl()'s turn. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
committed by
Miquel Raynal
parent
2b356ab46e
commit
ec47636cd7
@@ -368,9 +368,9 @@ static int fsmc_setup_data_interface(struct mtd_info *mtd, int csline,
|
||||
/*
|
||||
* fsmc_enable_hwecc - Enables Hardware ECC through FSMC registers
|
||||
*/
|
||||
static void fsmc_enable_hwecc(struct mtd_info *mtd, int mode)
|
||||
static void fsmc_enable_hwecc(struct nand_chip *chip, int mode)
|
||||
{
|
||||
struct fsmc_nand_data *host = mtd_to_fsmc(mtd);
|
||||
struct fsmc_nand_data *host = mtd_to_fsmc(nand_to_mtd(chip));
|
||||
|
||||
writel_relaxed(readl(host->regs_va + FSMC_PC) & ~FSMC_ECCPLEN_256,
|
||||
host->regs_va + FSMC_PC);
|
||||
@@ -740,7 +740,7 @@ static int fsmc_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip,
|
||||
|
||||
for (i = 0, s = 0; s < eccsteps; s++, i += eccbytes, p += eccsize) {
|
||||
nand_read_page_op(chip, page, s * eccsize, NULL, 0);
|
||||
chip->ecc.hwctl(mtd, NAND_ECC_READ);
|
||||
chip->ecc.hwctl(chip, NAND_ECC_READ);
|
||||
nand_read_data_op(chip, p, eccsize, false);
|
||||
|
||||
for (j = 0; j < eccbytes;) {
|
||||
|
||||
Reference in New Issue
Block a user