Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f75e5097 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

[MTD] NAND modularize write function



Modularize the write function and reorganaize the internal buffer
management. Remove obsolete chip options and fixup all affected
users.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent e4d222ff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1666,7 +1666,7 @@ static int __init doc_probe(unsigned long physadr)
	nand->ecc.mode		= NAND_ECC_HW_SYNDROME;
	nand->ecc.size		= 512;
	nand->ecc.bytes		= 6;
	nand->options		= NAND_USE_FLASH_BBT | NAND_HWECC_SYNDROME;
	nand->options		= NAND_USE_FLASH_BBT;

	doc->physadr		= physadr;
	doc->virtadr		= virtadr;
+0 −3
Original line number Diff line number Diff line
@@ -198,9 +198,6 @@ static void __exit ep7312_cleanup(void)
	/* Release resources, unregister device */
	nand_release(ap7312_mtd);

	/* Free internal data buffer */
	kfree(this->data_buf);

	/* Free the MTD device structure */
	kfree(ep7312_mtd);
}
+261 −514

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -666,7 +666,7 @@ static inline int nand_memory_bbt(struct mtd_info *mtd, struct nand_bbt_descr *b
	struct nand_chip *this = mtd->priv;

	bd->options &= ~NAND_BBT_SCANEMPTY;
	return create_bbt(mtd, this->data_buf, bd, -1);
	return create_bbt(mtd, this->buffers.databuf, bd, -1);
}

/**
+0 −1
Original line number Diff line number Diff line
@@ -571,7 +571,6 @@ static int __init rtc_from4_init(void)
	this->ecc.mode = NAND_ECC_HW_SYNDROME;
	this->ecc.size = 512;
	this->ecc.bytes = 8;
	this->options |= NAND_HWECC_SYNDROME;
	/* return the status of extra status and ECC checks */
	this->errstat = rtc_from4_errstat;
	/* set the nand_oobinfo to support FPGA H/W error detection */
Loading