Re: Writing to NAND, Which is not visible to USER

From: Lennart Sorensen
Date: Tue Apr 13 2010 - 16:24:15 EST


On Fri, Apr 09, 2010 at 05:01:58PM +0530, Prabhu Chawandi wrote:
> I want to write someting to the NAND flash, which is not a part of
> partitioning.
>
> say , out of 128 MB , I am using 64 MB which I have partitioned using
> MTD, but I have to access the other 64 MB.
>
> Can any one help me or give me any ideas ?
>
> Is it possible to write using assmbly code. I am using MIPS board.

I suspect you can't do that.

Most devices have registers needed to access them, in the case of a NAND
flash, commands like 'erase block', 'read', 'write', etc. If you try to
do erase block from your program and then the kernel tries to do something
in its half of the flash, who owns the registers of the NAND flash?

You probably will have to just use the kernel's driver to provide another
partition and then access that directly (without a filesystem) from
your program. At least that way one driver is in charge of accessing
the device.

--
Len Sorensen
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/