NAND suspending

Ben Dooks ben at
Tue Oct 23 12:24:14 EDT 2007

i have been working on an issue with suspend/resume with
the current NAND layer, and am interested on people's thoughts
on the issue. The problem stems from the s3c2410 driver leaving
nFCE set active (ie, low) when going into suspend, causing a
failure to resume properly (another story)

The immediate fix is just to add a call to deselect the
chip in s3c24xx_nand_suspend() by calling the internal
functions s3c2410_nand_select_chip(mtd, -1) to force nFCE
to go inactive.

I had a look through the other NAND drivers, and it seems no
other driver does anything on suspend, and having added some
debug to nand_suspend in nand_base.c, it seems that is not
being called by anything in my setup.

My question is, should my driver ensure that the MTDs it is
looking after are called from the device suspend method, and
if so, what is the appropriate call to make?2~

The next question is that once NAND suspend is called, it
should really call the nand->select_chip method to deselect
the chip when going into suspend, as the datasheet for the
K9F1208 chip quotes suspend currents when nCE is high.

A further interest is whether all possible chips attached
to the controller structure should be marked as being in
suspend, as the s3c2410 can support >1 chip connected to
it (and several of our boards have support for 2-4 chips).
Does the suspend needs to suspend all chips? At the
momemnt the nand_suspend() function uses nand_get_device
which means only one chip can be suspended (and calling
nand_release_device() will mark the chip ready again).

Ben (ben at,

  'a smiley only costs 4 bytes'

More information about the linux-mtd mailing list