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
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to