diff options
author | Prabhakar Kushwaha <prabhakar@freescale.com> | 2013-10-04 10:05:36 +0530 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2013-11-21 13:33:40 -0600 |
commit | 71220f80e7489b7fc1766f573ae89c64db2419ce (patch) | |
tree | 21e0ac06a1c36352ba9f3a41a4cf7fdfe4316818 /drivers/mtd/nand/fsl_ifc_spl.c | |
parent | 68ec9c85a9d334c7598b4972af037de05c034f8d (diff) | |
download | u-boot-midas-71220f80e7489b7fc1766f573ae89c64db2419ce.tar.gz u-boot-midas-71220f80e7489b7fc1766f573ae89c64db2419ce.tar.bz2 u-boot-midas-71220f80e7489b7fc1766f573ae89c64db2419ce.zip |
mtd/ifc: Add support of 8K page size NAND flash
Current IFC driver supports till 4K page size NAND flash.
Add support of 8K NAND flash
- Program Spare region size in csor_ext
- Add nand_ecclayout for 4 bit & 8 bit ecc
- Defines constants
- Add support of 8K NAND boot.
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
CC: Liu Po <po.liu@freescale.com>
Diffstat (limited to 'drivers/mtd/nand/fsl_ifc_spl.c')
-rw-r--r-- | drivers/mtd/nand/fsl_ifc_spl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mtd/nand/fsl_ifc_spl.c b/drivers/mtd/nand/fsl_ifc_spl.c index d4622653fa..9fa5ccbc56 100644 --- a/drivers/mtd/nand/fsl_ifc_spl.c +++ b/drivers/mtd/nand/fsl_ifc_spl.c @@ -112,10 +112,13 @@ static void nand_load(unsigned int offs, int uboot_size, uchar *dst) port_size = (cspr & CSPR_PORT_SIZE_16) ? 16 : 8; - if (csor & CSOR_NAND_PGS_4K) { + if ((csor & CSOR_NAND_PGS_MASK) == CSOR_NAND_PGS_8K) { + page_size = 8192; + bufnum_mask = 0x0; + } else if ((csor & CSOR_NAND_PGS_MASK) == CSOR_NAND_PGS_4K) { page_size = 4096; bufnum_mask = 0x1; - } else if (csor & CSOR_NAND_PGS_2K) { + } else if ((csor & CSOR_NAND_PGS_MASK) == CSOR_NAND_PGS_2K) { page_size = 2048; bufnum_mask = 0x3; } else { |