public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* NAND Driver in case of NAND Flash Controller
@ 2007-07-02 11:07 Ranga Raju B
  2007-07-02 12:38 ` Josh Boyer
  0 siblings, 1 reply; 2+ messages in thread
From: Ranga Raju B @ 2007-07-02 11:07 UTC (permalink / raw)
  To: linux-mtd

Hi,
    I need to write a Linux MTD NAND Driver for an SoC. It has NAND 
Flash Controller (ARASAN NAND Flash Controller) and I am using a 2Gb 
Micron NAND Flash. The MTD drivers I currently see in the Linux tree are 
basically having the NAND Flash connected directly to the processors 
using GPIO or Address Lines. In this case it is appropriate to write 
callback functions for

hwcontrol
dev_ready
write_byte
read_byte
verify_byte
write_buf
read_buf
verify_buf

Since the IO data lines and control lines are controlled directly by the 
processor.

In case of NAND flash controller we don't have this controller. We need 
to program only the registers and we can get status only from the status 
registers. We have data ports
which can take only 512 bytes at a time. Has anyone written the Linux 
driver for this kind of situation?

I have control only at stage 1. Which are nothing but memory mapped 
interface.

                1                                             2
   ARM  --->  NAND Flash Controller   ---> NAND Flash

I don't  know  where to start this driver. I intend to use JFFS2 over 
MTD partitions.

Best regards
Ranga Raju B

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: NAND Driver in case of NAND Flash Controller
  2007-07-02 11:07 NAND Driver in case of NAND Flash Controller Ranga Raju B
@ 2007-07-02 12:38 ` Josh Boyer
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Boyer @ 2007-07-02 12:38 UTC (permalink / raw)
  To: brraju; +Cc: linux-mtd

On Mon, 2007-07-02 at 16:37 +0530, Ranga Raju B wrote:
> Hi,
>     I need to write a Linux MTD NAND Driver for an SoC. It has NAND 
> Flash Controller (ARASAN NAND Flash Controller) and I am using a 2Gb 
> Micron NAND Flash. The MTD drivers I currently see in the Linux tree are 
> basically having the NAND Flash connected directly to the processors 
> using GPIO or Address Lines. In this case it is appropriate to write 
> callback functions for
> 
> hwcontrol
> dev_ready
> write_byte
> read_byte
> verify_byte
> write_buf
> read_buf
> verify_buf
> 
> Since the IO data lines and control lines are controlled directly by the 
> processor.
> 
> In case of NAND flash controller we don't have this controller. We need 
> to program only the registers and we can get status only from the status 
> registers. We have data ports
> which can take only 512 bytes at a time. Has anyone written the Linux 
> driver for this kind of situation?
> 
> I have control only at stage 1. Which are nothing but memory mapped 
> interface.
> 
>                 1                                             2
>    ARM  --->  NAND Flash Controller   ---> NAND Flash
> 
> I don't  know  where to start this driver. I intend to use JFFS2 over 
> MTD partitions.

Take a look at the NDFC driver in drivers/mtd/nand/.  It is a NAND
controller found on some PowerPC 4xx chips and operates similar to what
you've described.  You might find it helpful when writing a driver for
your NAND controller.

josh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-02 12:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-02 11:07 NAND Driver in case of NAND Flash Controller Ranga Raju B
2007-07-02 12:38 ` Josh Boyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox