public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Slow read performance of NAND flash on PPC 405EP
@ 2005-09-21 16:49 Andy Hawkins
  2005-09-21 16:58 ` Artem B. Bityutskiy
  2005-09-21 17:00 ` Artem B. Bityutskiy
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Hawkins @ 2005-09-21 16:49 UTC (permalink / raw)
  To: support, linux-mtd, linuxppc-embedded

Hi,

We have a custom PPC-405EP based board, with a Samsumg 8Gbit flash
(K9W8G08U1M) attached via EBC bank 2. When we read from this flash, we are
only getting data rates of around 20 MBits/sec (this is using 'dd' to read
direct from the linux /dev/mtd/x device). Our estimates show that the device
should be capable of something like 100 MBits/sec.

The EBC bank is set up as follows:

#define CFG_EBC_PB2AP           0x8a015480
#define CFG_EBC_PB2CR           0xFF458000  /*
BAS=0xFF4,BS=4MB,BU=R/W,BW=8bit */

The EBC bus is running at 54 MHz. We were originally running this bus at 27
MHz, and this speed increase doesn't appear to have done an awful lot for
us. By looking at the timings of various signals on an oscilloscope, we
adjusted the PB2AP register to that shown above, in an attempt to remove as
many of the wait states as possible.

However, during a read, we are seeing that each byte read cycle takes around
220 nSec (this is taken between the times when the #PERCS2 line for the
device goes low). A significant portion (about 6 clock periods) of this
time, the device appears to be doing nothing (i.e. the chip select line is
inactive). The code in the linux kernel to read a page of data from the
flash is very simple:

static void nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
{
        int i;
        struct nand_chip *this = mtd->priv;

        for (i=0; i<len; i++)
                buf[i] = readb(this->IO_ADDR_R);
}

readb maps to a call to in_8(FLASH_BASE_ADDRESS). The in_8 function does
contain what appear to be un-necessary calls to twi and isync, but removing
these calls does not alter the cycle time significantly.

Is there some setup of the EBC (or other component in the processor) that we
have incorrect that could be affecting the throughput?

Any advice you can offer would be greatly appreciated.

Thanks

Andy

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

* Re: Slow read performance of NAND flash on PPC 405EP
  2005-09-21 16:49 Slow read performance of NAND flash on PPC 405EP Andy Hawkins
@ 2005-09-21 16:58 ` Artem B. Bityutskiy
  2005-09-21 17:00 ` Artem B. Bityutskiy
  1 sibling, 0 replies; 3+ messages in thread
From: Artem B. Bityutskiy @ 2005-09-21 16:58 UTC (permalink / raw)
  To: Andy Hawkins; +Cc: linux-mtd, support, linuxppc-embedded

Andy Hawkins wrote:
> Hi,
Hi Andy

> 
> We have a custom PPC-405EP based board, with a Samsumg 8Gbit flash
> (K9W8G08U1M) attached via EBC bank 2. When we read from this flash, we are
> only getting data rates of around 20 MBits/sec (this is using 'dd' to read
> direct from the linux /dev/mtd/x device). Our estimates show that the device
> should be capable of something like 100 MBits/sec.

Bah, 8Gbit! :-)

JFFS2 is not enough scalable to work with 8Gbit Flashes. The practical 
limit is about 1Gbit. I would suggest to forget about JFFS2 in your 
case. You will never feel comfortable with JFFS2 + 8Gbit flashes.

Try to make 500MB file and remount JFFS2, then open it. See how much 
time this will take. See how much memory will me used.

Also ypu may glance at the introduction chapters at 
http://www.linux-mtd.infradead.org/tech/JFFS3design.pdf

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

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

* Re: Slow read performance of NAND flash on PPC 405EP
  2005-09-21 16:49 Slow read performance of NAND flash on PPC 405EP Andy Hawkins
  2005-09-21 16:58 ` Artem B. Bityutskiy
@ 2005-09-21 17:00 ` Artem B. Bityutskiy
  1 sibling, 0 replies; 3+ messages in thread
From: Artem B. Bityutskiy @ 2005-09-21 17:00 UTC (permalink / raw)
  To: Andy Hawkins; +Cc: linux-mtd, support, linuxppc-embedded

Andy Hawkins wrote:
> Hi,
> 
> We have a custom PPC-405EP based board, with a Samsumg 8Gbit flash
> (K9W8G08U1M) attached via EBC bank 2. When we read from this flash, we are
> only getting data rates of around 20 MBits/sec (this is using 'dd' to read
> direct from the linux /dev/mtd/x device). Our estimates show that the device
> should be capable of something like 100 MBits/sec.
> 
Ops, pardon, you are not going to use JFFS2 :-) Ignore that mail then :-)

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

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

end of thread, other threads:[~2005-09-21 17:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-21 16:49 Slow read performance of NAND flash on PPC 405EP Andy Hawkins
2005-09-21 16:58 ` Artem B. Bityutskiy
2005-09-21 17:00 ` Artem B. Bityutskiy

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