nand_scan identification problem
Thomas Gleixner
tglx at linutronix.de
Thu Jan 27 09:13:36 EST 2005
On Thu, 2005-01-27 at 10:18 -0200, Moises Beck - EDS Digicon wrote:
> Hello,
> I am using a smartmedia card on linux MTD. Everything runs very
> well. But just after power on, the first attempt to load the driver
> spia.o fails. The driver calls nand_scan(), that cannot identify the
> present card. On the second attempt to load the driver, the flash is
> correctly identified. I saw that in nand_scan(), the command
> NAND_CMD_READID return nand_maf_id=0 and nand_dev_id=0 on the first call
> to it. On the second call the IDs are returned correctly. I tried to
> solve this by putting the following code just before the command
> NAND_CMD_READID, on nand_base.c:
>
> /* Select the device */
> this->select_chip(mtd, 0);
>
>
> /* by momo - reset smartmedia e put it on mode READ */
> this->cmdfunc (mtd, NAND_CMD_RESET, -1, -1);
> this->cmdfunc (mtd, NAND_CMD_READ0, -1, -1);
> Anyone has some clue ?
Can you verify that your port pins are initialized correctly before
calling nand_scan().
nCE = high
ALE = low
CLE = low
The calls you inserted do not touch ALE, but the read_ID command does.
tglx
More information about the linux-mtd
mailing list