[U-Boot] [POWERPC] TQM8272: Fix compiling error for the TQM8272 board.
Scott Wood
scottwood at freescale.com
Wed Aug 27 22:09:40 CEST 2008
On Wed, Aug 27, 2008 at 01:08:14PM +0200, Heiko Schocher wrote:
> static void upmnand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
> {
> struct nand_chip *this = mtd->priv;
> + ulong base = (ulong) (this->IO_ADDR_W + chipsel * CFG_NAND_CS_DIST);
> + unsigned char byte = (unsigned char) cmd;
>
> if (ctrl & NAND_CTRL_CHANGE) {
> - if ( ctrl & NAND_CLE )
> - hwctl |= 0x1;
> - else
> - hwctl &= ~0x1;
> - if ( ctrl & NAND_ALE )
> - hwctl |= 0x2;
> - else
> - hwctl &= ~0x2;
> + if ( ctrl & NAND_CLE ) {
> + WRITE_NAND_UPM(byte, base, CFG_NAND_UPM_WRITE_CMD_OFS);
> + return ;
> + } else
> + if ( ctrl & NAND_ALE ) {
> + WRITE_NAND_UPM(byte, base, CFG_NAND_UPM_WRITE_ADDR_OFS);
> + return ;
You shouldn't be writing any bytes unless cmd != NAND_CMD_NONE.
As Stefan pointed out, is there any reason you can't use
drivers/mtd/nand/fsl_upm.c?
-Scott
More information about the U-Boot
mailing list