|
@@ -2668,7 +2668,7 @@ static uint8_t *nand_fill_oob(struct mtd_info *mtd, uint8_t *oob, size_t len,
|
|
static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
|
|
static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
|
|
struct mtd_oob_ops *ops)
|
|
struct mtd_oob_ops *ops)
|
|
{
|
|
{
|
|
- int chipnr, realpage, page, blockmask, column;
|
|
|
|
|
|
+ int chipnr, realpage, page, column;
|
|
struct nand_chip *chip = mtd_to_nand(mtd);
|
|
struct nand_chip *chip = mtd_to_nand(mtd);
|
|
uint32_t writelen = ops->len;
|
|
uint32_t writelen = ops->len;
|
|
|
|
|
|
@@ -2704,7 +2704,6 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
|
|
|
|
|
|
realpage = (int)(to >> chip->page_shift);
|
|
realpage = (int)(to >> chip->page_shift);
|
|
page = realpage & chip->pagemask;
|
|
page = realpage & chip->pagemask;
|
|
- blockmask = (1 << (chip->phys_erase_shift - chip->page_shift)) - 1;
|
|
|
|
|
|
|
|
/* Invalidate the page cache, when we write to the cached page */
|
|
/* Invalidate the page cache, when we write to the cached page */
|
|
if (to <= ((loff_t)chip->pagebuf << chip->page_shift) &&
|
|
if (to <= ((loff_t)chip->pagebuf << chip->page_shift) &&
|