]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/mtd/nand/tegra_nand.c
mtd: nand: Add page argument to write_page() etc.
[people/ms/u-boot.git] / drivers / mtd / nand / tegra_nand.c
index 3eae4cbee20cc9a79fbcc6e369d6bbe7877911d4..2032f658129c5b5608d2f5d8b433bc5fb565c10f 100644 (file)
@@ -657,16 +657,9 @@ static int nand_read_page_hwecc(struct mtd_info *mtd,
  * @param buf  data buffer
  */
 static int nand_write_page_hwecc(struct mtd_info *mtd,
-       struct nand_chip *chip, const uint8_t *buf, int oob_required)
+       struct nand_chip *chip, const uint8_t *buf, int oob_required,
+       int page)
 {
-       int page;
-       struct nand_drv *info;
-
-       info = (struct nand_drv *)nand_get_controller_data(chip);
-
-       page = (readl(&info->reg->addr_reg1) >> 16) |
-               (readl(&info->reg->addr_reg2) << 16);
-
        nand_rw_page(mtd, chip, (uint8_t *)buf, page, 1, 1);
        return 0;
 }
@@ -697,15 +690,9 @@ static int nand_read_page_raw(struct mtd_info *mtd,
  * @param buf  data buffer
  */
 static int nand_write_page_raw(struct mtd_info *mtd,
-               struct nand_chip *chip, const uint8_t *buf, int oob_required)
+               struct nand_chip *chip, const uint8_t *buf,
+               int oob_required, int page)
 {
-       int page;
-       struct nand_drv *info;
-
-       info = (struct nand_drv *)nand_get_controller_data(chip);
-       page = (readl(&info->reg->addr_reg1) >> 16) |
-               (readl(&info->reg->addr_reg2) << 16);
-
        nand_rw_page(mtd, chip, (uint8_t *)buf, page, 0, 1);
        return 0;
 }