From: Vimal Singh <vimal.newwork@gmail.com>
To: Sukumar Ghorai <s-ghorai@ti.com>
Cc: linux-mtd@lists.infradead.org, sbranden@broadcom.com,
leochen@broadcom.com, David.Woodhouse@intel.com,
linux-omap@vger.kernel.org, tony@atomide.com,
Vimal Singh <vimalsingh@ti.com>
Subject: Re: [PATCH 3/6] OMAP NAND: configurable fifo threshold to gain the throughput
Date: Fri, 16 Apr 2010 18:15:01 +0530 [thread overview]
Message-ID: <p2tce9ab5791004160545ye1d56355r506e0e9573c27d99@mail.gmail.com> (raw)
In-Reply-To: <1271417714-4408-1-git-send-email-s-ghorai@ti.com>
Hi Ghorai,
On Fri, Apr 16, 2010 at 5:05 PM, Sukumar Ghorai <s-ghorai@ti.com> wrote:
[...]
> - ret = gpmc_prefetch_enable(info->gpmc_cs, 0x0, len, 0x0);
> + ret = gpmc_prefetch_enable(info->gpmc_cs, 0x40, 0x0, len, 0x0);
Use macros here too then.
> if (ret) {
> /* PFPW engine is busy, use cpu copy method */
> if (info->nand.options & NAND_BUSWIDTH_16)
> @@ -354,7 +354,7 @@ static void omap_write_buf_pref(struct mtd_info *mtd,
> }
>
> /* configure and start prefetch transfer */
> - ret = gpmc_prefetch_enable(info->gpmc_cs, 0x0, len, 0x1);
> + ret = gpmc_prefetch_enable(info->gpmc_cs, 0x40, 0x0, len, 0x1);
here too
> if (ret) {
> /* PFPW engine is busy, use cpu copy method */
> if (info->nand.options & NAND_BUSWIDTH_16)
> @@ -405,10 +405,11 @@ static inline int omap_nand_dma_transfer(struct mtd_info *mtd, void *addr,
> dma_addr_t dma_addr;
> int ret;
>
> - /* The fifo depth is 64 bytes. We have a sync at each frame and frame
> - * length is 64 bytes.
> + /* The fifo depth is 64 bytes max.
> + * But configure the FIFO-threahold to 32 to get a sync at each frame
> + * and frame length is 32 bytes.
> */
> - int buf_len = len >> 6;
> + int buf_len = len >> 5;
>
> if (addr >= high_memory) {
> struct page *p1;
> @@ -447,7 +448,7 @@ static inline int omap_nand_dma_transfer(struct mtd_info *mtd, void *addr,
> OMAP24XX_DMA_GPMC, OMAP_DMA_SRC_SYNC);
> }
> /* configure and start prefetch transfer */
> - ret = gpmc_prefetch_enable(info->gpmc_cs, 0x1, len, is_write);
> + ret = gpmc_prefetch_enable(info->gpmc_cs, 0x20, 0x1, len, is_write);
> if (ret)
> /* PFPW engine is busy, use cpu copy methode */
> goto out_copy;
> @@ -524,6 +525,7 @@ static void omap_write_buf_dma_pref(struct mtd_info *mtd,
> static irqreturn_t omap_nand_irq(int this_irq, void *dev)
> {
> struct omap_nand_info *info = (struct omap_nand_info *) dev;
> + u32 *p = (u32 *) info->buf;
> u32 irq_enb = 0, pref_status = 0, bytes = 0;
> u32 irq_stats = __raw_readl(info->gpmc_baseaddr + GPMC_IRQSTATUS);
> u32 pref_config = __raw_readl(info->gpmc_baseaddr +
> @@ -533,14 +535,11 @@ static irqreturn_t omap_nand_irq(int this_irq, void *dev)
> if (irq_stats & 0x2)
> goto done;
>
> - u32 *p = (u32 *) info->buf;
> - pref_status = gpmc_prefetch_status();
> - bytes = ((pref_status >> 24) & 0x7F);
> + bytes = PREFETCH_FIFOTHRESHOLD_WRITE;
By this, you are not really keeping prefetch the busyest.
you are filling only 'PREFETCH_FIFOTHRESHOLD_WRITE' bytes, while there
could be more free spaces.
Previous way of doing it was more efficent.
> iowrite32_rep(info->nand_pref_fifo_add, p, bytes >> 2);
> info->buf = info->buf + bytes;
>
> } else {
> - u32 *p = (u32 *) info->buf;
> pref_status = gpmc_prefetch_status();
> bytes = ((pref_status >> 24) & 0x7F);
> ioread32_rep(info->nand_pref_fifo_add, p, bytes >> 2);
> @@ -586,7 +585,8 @@ static void omap_read_buf_irq_pref(struct mtd_info *mtd, u_char *buf, int len)
> init_completion(&info->comp);
>
> /* configure and start prefetch transfer */
> - ret = gpmc_prefetch_enable(info->gpmc_cs, 0x0, len, 0x0);
> + ret = gpmc_prefetch_enable(info->gpmc_cs,
> + PREFETCH_FIFOTHRESHOLD_READ, 0x0, len, 0x0);
> if (ret)
> /* PFPW engine is busy, use cpu copy methode */
> goto out_copy;
> @@ -630,7 +630,8 @@ static void omap_write_buf_irq_pref(struct mtd_info *mtd,
> init_completion(&info->comp);
>
> /* configure and start prefetch transfer */
> - ret = gpmc_prefetch_enable(info->gpmc_cs, 0x0, len, 0x1);
> + ret = gpmc_prefetch_enable(info->gpmc_cs,
> + PREFETCH_FIFOTHRESHOLD_WRITE, 0x0, len, 0x1);
In case of write, in my experiments, fifo thresholed '24' was the best
compromise for throughput and cpu load.
Regards,
Vimal
next prev parent reply other threads:[~2010-04-16 12:45 UTC|newest]
Thread overview: 102+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Sukumar Ghorai <s-ghorai@ti.com>
2010-04-06 12:29 ` [PATCH 0/2] OMAP: Flash device support 3630 sdp board Sukumar Ghorai
2010-04-06 12:29 ` [PATCH 1/2] OMAP3630SDP: Add support for Flash Sukumar Ghorai
2010-04-06 12:29 ` [PATCH 2/2] OMAP3630SDP: enable Flash device support Sukumar Ghorai
2010-04-06 13:02 ` [PATCH 1/2] OMAP3630SDP: Add support for Flash Vimal Singh
2010-04-13 17:37 ` [PATCH] nand support on omap3 boards Sukumar Ghorai
2010-04-13 17:37 ` [PATCH v3 1/8] omap3: zoom: Introducing 'board-zoom-flash.c' Sukumar Ghorai
2010-04-13 17:37 ` [PATCH v3 2/8] omap3: add support for NAND on zoom2 board Sukumar Ghorai
2010-04-13 17:37 ` [PATCH v3 3/8] omap3: add support for NAND on zoom3 board Sukumar Ghorai
2010-04-13 17:37 ` [PATCH v2 4/8] omap-3630-sdp : Add support for Flash Sukumar Ghorai
2010-04-13 17:37 ` [PATCH v2 5/8] omap-3630-sdp: enable Flash device support Sukumar Ghorai
2010-04-13 17:37 ` [PATCH v2 6/8] omap3: add support for NAND on LDP board Sukumar Ghorai
2010-04-13 17:37 ` [PATCH 7/8] zoom2: enable NAND support Sukumar Ghorai
2010-04-13 17:37 ` [PATCH 8/8] zoom3: " Sukumar Ghorai
2010-04-13 17:37 ` [PATCH] nand support on omap3 boards Sukumar Ghorai
2010-04-13 17:37 ` [PATCH 8/8] omap3: GPMC register definition at common location Sukumar Ghorai
2010-04-13 17:37 ` [PATCH] omap3: NAND Prefetch in IRQ mode support Sukumar Ghorai
2010-04-13 17:37 ` [PATCH] omap-3630 NAND: enable NAND io in prefetch-irq mode Sukumar Ghorai
2010-04-13 17:37 ` [PATCH] omap: NAND: ecc layout select from board file Sukumar Ghorai
2010-04-13 17:37 ` [PATCH] omap: NAND: Making ecc layout as compatible with romcode ecc Sukumar Ghorai
2010-04-14 4:35 ` [PATCH] nand support on omap3 boards Vimal Singh
2010-04-14 4:37 ` Vimal Singh
2010-04-14 4:38 ` Ghorai, Sukumar
2010-05-04 6:00 ` Ghorai, Sukumar
2010-05-04 6:01 ` Ghorai, Sukumar
2010-05-28 13:48 ` Ghorai, Sukumar
2010-04-13 17:44 ` Sukumar Ghorai
2010-04-16 11:32 ` [PATCH 0/6] nand prefetch-irq support and ecc layout chanage Sukumar Ghorai
2010-04-16 11:34 ` [PATCH 1/6] omap3: GPMC register definition at common location Sukumar Ghorai
2010-04-16 11:35 ` [PATCH 2/6] omap3: NAND Prefetch in IRQ mode support Sukumar Ghorai
2010-04-16 11:35 ` [PATCH 3/6] OMAP NAND: configurable fifo threshold to gain the throughput Sukumar Ghorai
2010-04-16 12:45 ` Vimal Singh [this message]
2010-04-16 11:35 ` [PATCH 4/6] omap-3630 NAND: enable NAND io in prefetch-irq mode Sukumar Ghorai
2010-04-16 11:35 ` [PATCH 5/6] omap: NAND: ecc layout select from board file Sukumar Ghorai
2010-04-16 11:35 ` [PATCH 6/6] omap: NAND: Making ecc layout as compatible with romcode ecc Sukumar Ghorai
2010-05-12 9:48 ` [PATCH 0/3] omap3 nand: cleanup exiting platform related code Sukumar Ghorai
2010-05-12 9:48 ` [PATCH 1/3] omap3: GPMC register definition at common location Sukumar Ghorai
2010-05-12 9:48 ` [PATCH 2/3] omap3 nand: cleanup for not to use GPMC virtual address Sukumar Ghorai
2010-05-12 9:48 ` [PATCH 3/3] omap3 nand: fix issue in board file to detect the nand Sukumar Ghorai
2010-05-13 15:41 ` [PATCH 2/3] omap3 nand: cleanup for not to use GPMC virtual address Tony Lindgren
2010-05-13 18:48 ` Ghorai, Sukumar
2010-05-13 6:15 ` [PATCH 1/3] omap3: GPMC register definition at common location Mike Rapoport
2010-05-13 15:41 ` Tony Lindgren
2010-05-13 15:44 ` [PATCH 0/3] omap3 nand: cleanup exiting platform related code Tony Lindgren
2010-05-14 15:23 ` [PATCH v2 0/2] " Sukumar Ghorai
2010-05-14 15:23 ` [PATCH v2 1/2] omap3 nand: cleanup for not to use GPMC virtual address Sukumar Ghorai
2010-05-14 15:23 ` [PATCH v2 2/2] omap3 nand: fix issue in board file to detect the nand Sukumar Ghorai
2010-05-14 15:28 ` [PATCH v2 1/2] omap3 nand: cleanup for not to use GPMC virtual address Tony Lindgren
2010-05-14 18:02 ` Vimal Singh
2010-05-17 4:22 ` Ghorai, Sukumar
2010-05-17 14:26 ` Vimal Singh
2010-05-17 14:34 ` Ghorai, Sukumar
2010-05-14 23:58 ` Tony Lindgren
2010-05-17 5:48 ` Ghorai, Sukumar
2010-05-18 11:16 ` [PATCH v3 0/3] omap3 nand: cleanup exiting platform related code Sukumar Ghorai
2010-05-18 11:16 ` [PATCH v3 1/3] omap3 gpmc: functionality enhancement Sukumar Ghorai
2010-05-18 11:16 ` [PATCH v3 2/3] omap3 nand: cleanup virtual address usages Sukumar Ghorai
2010-05-18 11:16 ` [PATCH v3 3/3] omap3 nand: fix issue in board file to detect nand Sukumar Ghorai
2010-05-19 15:30 ` [PATCH v3 2/3] omap3 nand: cleanup virtual address usages Vimal Singh
2010-05-19 17:24 ` Ghorai, Sukumar
2010-05-19 18:07 ` Vimal Singh
2010-05-19 18:19 ` Tony Lindgren
2010-05-19 14:46 ` [PATCH v3 1/3] omap3 gpmc: functionality enhancement Vimal Singh
2010-05-19 15:14 ` Peter Barada
2010-05-19 15:48 ` Peter Barada
2010-05-19 18:04 ` Ghorai, Sukumar
2010-05-19 18:30 ` Vimal Singh
2010-05-20 5:38 ` Ghorai, Sukumar
2010-05-20 14:34 ` Vimal Singh
2010-05-25 14:37 ` Ghorai, Sukumar
2010-05-25 15:34 ` Vimal Singh
2010-05-27 13:24 ` [PATCH v4 0/3] omap3 nand: cleanup exiting platform related code Sukumar Ghorai
2010-05-27 13:24 ` [PATCH v4 1/3] omap3 gpmc: functionality enhancement Sukumar Ghorai
2010-05-27 13:24 ` [PATCH v4 2/3] omap3 nand: cleanup virtual address usages Sukumar Ghorai
2010-05-27 13:24 ` [PATCH v4 3/3] omap3 nand: fix issue in board file to detect nand Sukumar Ghorai
2010-05-27 18:26 ` [PATCH v4 1/3] omap3 gpmc: functionality enhancement Vimal Singh
2010-06-04 7:40 ` [PATCH v5 0/3] omap3 nand: cleanup exiting platform related code Sukumar Ghorai
2010-06-04 7:40 ` [PATCH v5 1/3] omap3 gpmc: functionality enhancement Sukumar Ghorai
2010-06-04 7:40 ` [PATCH v5 2/3] omap3 nand: cleanup virtual address usages Sukumar Ghorai
2010-06-04 7:40 ` [PATCH v5 3/3] omap3 nand: fix issue in board file to detect nand Sukumar Ghorai
2010-07-07 10:21 ` [PATCH v5 2/3] omap3 nand: cleanup virtual address usages Tony Lindgren
2010-07-07 12:22 ` Ghorai, Sukumar
2010-07-07 10:18 ` [PATCH v5 1/3] omap3 gpmc: functionality enhancement Tony Lindgren
2010-07-07 12:32 ` Ghorai, Sukumar
2010-07-07 13:01 ` Tony Lindgren
2010-07-08 3:54 ` Ghorai, Sukumar
2010-06-08 17:12 ` [PATCH v5 0/3] omap3 nand: cleanup exiting platform related code Vimal Singh
2010-06-15 13:26 ` Ghorai, Sukumar
2010-06-30 14:42 ` Ghorai, Sukumar
2010-06-16 11:39 ` [PATCH v3 0/8] nand support on omap3 boards Sukumar Ghorai
2010-06-16 11:39 ` [PATCH v3 1/8] omap3 flash: rename board-sdp-flash.c to be use by other boards Sukumar Ghorai
2010-06-16 11:39 ` [PATCH v3 2/8] omap3: add support for NAND on zoom2 board Sukumar Ghorai
2010-06-16 11:39 ` [PATCH v3 3/8] omap3: add support for NAND on zoom3 board Sukumar Ghorai
2010-06-16 11:39 ` [PATCH v3 4/8] omap-3630-sdp : Add support for Flash Sukumar Ghorai
2010-06-16 11:39 ` [PATCH v3 5/8] omap3: add support for NAND on LDP board Sukumar Ghorai
2010-06-16 11:39 ` [PATCH v3 6/8] omap-3630-sdp: enable Flash device support Sukumar Ghorai
2010-06-16 11:39 ` [PATCH v3 7/8] zoom2: enable NAND support Sukumar Ghorai
2010-06-16 11:40 ` [PATCH v3 8/8] zoom3: " Sukumar Ghorai
2010-07-05 12:27 ` [PATCH v3 6/8] omap-3630-sdp: enable Flash device support Tony Lindgren
2010-07-06 5:23 ` Ghorai, Sukumar
2010-07-05 12:23 ` [PATCH v3 1/8] omap3 flash: rename board-sdp-flash.c to be use by other boards Tony Lindgren
2010-07-06 6:05 ` Shilimkar, Santosh
2010-07-06 6:27 ` Ghorai, Sukumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=p2tce9ab5791004160545ye1d56355r506e0e9573c27d99@mail.gmail.com \
--to=vimal.newwork@gmail.com \
--cc=David.Woodhouse@intel.com \
--cc=leochen@broadcom.com \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=s-ghorai@ti.com \
--cc=sbranden@broadcom.com \
--cc=tony@atomide.com \
--cc=vimalsingh@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).