Bug in edb7312.c ?
z l
zql at glomationinc.com
Fri Oct 6 13:32:53 EDT 2006
Come across this code and it looks it's broken
/*
* hardware specific access to control-lines
*
* NAND_NCE: bit 0 -> bit 7
* NAND_CLE: bit 1 -> bit 4
* NAND_ALE: bit 2 -> bit 5
*/
static void ep7312_hwcontrol(struct mtd_info *mtd, int
cmd, unsigned int ctrl)
{
struct nand_chip *chip = mtd->priv;
if (ctrl & NAND_CTRL_CHANGE) {
unsigned char bits;
bits = (ctrl & (NAND_CLE | NAND_ALE))
<< 3;
bits = (ctrl & NAND_NCE) << 7;
clps_writeb((clps_readb(ep7312_pxdr)
& 0xB0) | 0x10,
ep7312_pxdr);
}
if (cmd != NAND_CMD_NONE)
writeb(cmd, chip->IO_ADDR_W);
}
More information about the linux-mtd
mailing list