diff options
author | Huang Shijie <shijie8@gmail.com> | 2013-12-20 20:02:28 +0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-01-12 00:20:15 +0400 |
commit | e07caa3687317e1c5a9efa0d315a2d7ca57f3df5 (patch) | |
tree | c2460d146e2c51386da11a5cfe1d5e7a354fc89f /drivers/mtd/nand/denali.h | |
parent | a5900554a8b5fbc4fb731c6f9896ed265683f94e (diff) | |
download | linux-e07caa3687317e1c5a9efa0d315a2d7ca57f3df5.tar.xz |
mtd: denali: kill the NAND_MAX_PAGESIZE/NAND_MAX_OOBSIZE
This patch kills the NAND_MAX_PAGESIZE/NAND_MAX_OOBSIZE by the following
way:
1.) change the @buf field of nand_buf{} from an array to a pointer.
also remove the DENALI_BUF_SIZE macro.
2.) Before we call the nand_scan_ident, we allocate a temporary buffer
whose size is PAGE_SIZE.
3.) After we finish the nand_scan_ident, we have already getten the
page size and oob size. We will allocate the right buffer size
again.
Signed-off-by: Huang Shijie <shijie8@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/denali.h')
-rw-r--r-- | drivers/mtd/nand/denali.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/nand/denali.h b/drivers/mtd/nand/denali.h index cec5712862c9..966817462421 100644 --- a/drivers/mtd/nand/denali.h +++ b/drivers/mtd/nand/denali.h @@ -455,12 +455,10 @@ #define ECC_SECTOR_SIZE 512 -#define DENALI_BUF_SIZE (NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE) - struct nand_buf { int head; int tail; - uint8_t buf[DENALI_BUF_SIZE]; + uint8_t *buf; dma_addr_t dma_buf; }; |