diff options
author | Huang Shijie <b32955@freescale.com> | 2014-01-02 22:01:41 -0500 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:57:52 -0400 |
commit | 701fcc5591e36cbe54ac0a8dfc7391b444134b35 (patch) | |
tree | befdb003593c04bbe22e5ef4e2583782fd8c0e3f /drivers/mtd/nand | |
parent | 4103472ec2885946e0b64713b4f4efdb3c091740 (diff) |
mtd: gpmi: do not use the mtd->writesize
The nfc_geo->payload_size is equal to the mtd->writesize now,
use the nfc_geo->payload_size to replace the mtd->writesize.
This patch makes preparation for the gpmi's subpage read support.
In the subpage support, the nfc_geo->payload_size maybe smaller then
the mtd->writesize.
Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index ca6369fe91ff..5aaa7f541ea1 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c | |||
@@ -985,7 +985,7 @@ static int gpmi_ecc_read_page(struct mtd_info *mtd, struct nand_chip *chip, | |||
985 | int ret; | 985 | int ret; |
986 | 986 | ||
987 | dev_dbg(this->dev, "page number is : %d\n", page); | 987 | dev_dbg(this->dev, "page number is : %d\n", page); |
988 | ret = read_page_prepare(this, buf, mtd->writesize, | 988 | ret = read_page_prepare(this, buf, nfc_geo->payload_size, |
989 | this->payload_virt, this->payload_phys, | 989 | this->payload_virt, this->payload_phys, |
990 | nfc_geo->payload_size, | 990 | nfc_geo->payload_size, |
991 | &payload_virt, &payload_phys); | 991 | &payload_virt, &payload_phys); |
@@ -999,7 +999,7 @@ static int gpmi_ecc_read_page(struct mtd_info *mtd, struct nand_chip *chip, | |||
999 | 999 | ||
1000 | /* go! */ | 1000 | /* go! */ |
1001 | ret = gpmi_read_page(this, payload_phys, auxiliary_phys); | 1001 | ret = gpmi_read_page(this, payload_phys, auxiliary_phys); |
1002 | read_page_end(this, buf, mtd->writesize, | 1002 | read_page_end(this, buf, nfc_geo->payload_size, |
1003 | this->payload_virt, this->payload_phys, | 1003 | this->payload_virt, this->payload_phys, |
1004 | nfc_geo->payload_size, | 1004 | nfc_geo->payload_size, |
1005 | payload_virt, payload_phys); | 1005 | payload_virt, payload_phys); |
@@ -1041,7 +1041,7 @@ static int gpmi_ecc_read_page(struct mtd_info *mtd, struct nand_chip *chip, | |||
1041 | chip->oob_poi[0] = ((uint8_t *) auxiliary_virt)[0]; | 1041 | chip->oob_poi[0] = ((uint8_t *) auxiliary_virt)[0]; |
1042 | } | 1042 | } |
1043 | 1043 | ||
1044 | read_page_swap_end(this, buf, mtd->writesize, | 1044 | read_page_swap_end(this, buf, nfc_geo->payload_size, |
1045 | this->payload_virt, this->payload_phys, | 1045 | this->payload_virt, this->payload_phys, |
1046 | nfc_geo->payload_size, | 1046 | nfc_geo->payload_size, |
1047 | payload_virt, payload_phys); | 1047 | payload_virt, payload_phys); |