From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Thu, 28 Aug 2008 05:35:48 +0200 Subject: [U-Boot] [POWERPC] TQM8272: Fix compiling error for the TQM8272 board. In-Reply-To: <20080827200940.GA20876@ld0162-tx32.am.freescale.net> References: <48B5359E.6040101@denx.de> <20080827200940.GA20876@ld0162-tx32.am.freescale.net> Message-ID: <48B61D14.3090706@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Scott, Scott Wood wrote: > 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. Ah, okay ... > As Stefan pointed out, is there any reason you can't use > drivers/mtd/nand/fsl_upm.c? Yes, as I wrote to Stefan, I have no longer the Hardware and I fear such a big change ... bye Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany