mirror of
https://xff.cz/git/u-boot/
synced 2025-10-18 08:23:24 +02:00
NAND: Add 16bit NAND support for the NDFC
This patch adds support for 16 bit NAND devices attached to the NDFC on ppc4xx processors. Two config entries were added: CONFIG_SYS_NDFC_16 - Setting this tells the NDFC that a 16 bit device is attached. CONFIG_SYS_NDFC_EBC0_CFG - This is for the External Bus Controller configuration register. Also, a new ndfc_read_byte() function was added which does not first convert the data to little endian. The NAND SPL was also modified to do 16bit bad block testing when a 16 bit chip is being used. Signed-off-by: Alex Waterman <awaterman@dawning.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
This commit is contained in:
committed by
Scott Wood
parent
c9494866df
commit
eced4626e4
@@ -122,10 +122,15 @@ static int nand_is_bad_block(struct mtd_info *mtd, int block)
|
||||
nand_command(mtd, block, 0, CONFIG_SYS_NAND_BAD_BLOCK_POS, NAND_CMD_READOOB);
|
||||
|
||||
/*
|
||||
* Read one byte
|
||||
* Read one byte (or two if it's a 16 bit chip).
|
||||
*/
|
||||
if (readb(this->IO_ADDR_R) != 0xff)
|
||||
return 1;
|
||||
if (this->options & NAND_BUSWIDTH_16) {
|
||||
if (readw(this->IO_ADDR_R) != 0xffff)
|
||||
return 1;
|
||||
} else {
|
||||
if (readb(this->IO_ADDR_R) != 0xff)
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user