From: Huang Shijie <shijie8@gmail.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: Marek Vasut <marex@denx.de>, Huang Shijie <b32955@freescale.com>,
Lee Jones <lee.jones@linaro.org>,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH v3 11/11] mtd: fsl-quadspi: fix __iomem annotations, accessors
Date: Sat, 12 Apr 2014 21:49:43 +0800 [thread overview]
Message-ID: <20140412134939.GA2952@localhost.localdomain> (raw)
In-Reply-To: <20140412061333.GI3131@norris-Latitude-E6410>
On Fri, Apr 11, 2014 at 11:13:33PM -0700, Brian Norris wrote:
> On Sat, Apr 12, 2014 at 12:57:03PM +0800, Huang Shijie wrote:
> > On Fri, Apr 11, 2014 at 12:00:06PM -0700, Brian Norris wrote:
> > > @@ -730,7 +730,7 @@ static int fsl_qspi_read(struct spi_nor *nor, loff_t from,
> > > return ret;
> > >
> > > /* Read out the data directly from the AHB buffer.*/
> > > - memcpy(buf, q->ahb_base + q->chip_base_addr + from, len);
> > > + memcpy_fromio(buf, q->ahb_base + q->chip_base_addr + from, len);
> > ARM does some optimazation to the memcpy, please see arch/arm/lib/memcpy.S.
> >
> > But the memcpy_fromio does not do optimazation, please see _memcpy_fromio.
>
> Ah, yes. I noticed this actually, but didn't think much about it.
>
> > Someone ever sent a patch to fix the issue, but Russell did not merge it.
>
> That's unfortunate.
>
> > please see:
> > http://lists.infradead.org/pipermail/linux-arm-kernel/2009-November/003860.html
> >
> > So we'd better do not change to use memcpy_fromio.
>
> How about the last recommendation of that thread, readsl()?
>
[1] firstly, I think it is not an IO read actually.
We read the data from the AHB memory address in fact, a miss will make the
controller to trigger a QUAD read to the NOR flash.
[2] secondly, the memcpy can work by the unit of 8 bytes (or more?),
while the readsl can work by the unit of 4 bytes at most.
So use memcpy here is better then using the readsl.
> http://lists.infradead.org/pipermail/linux-arm-kernel/2009-November/003984.html
>
> It has your optimization, and it has the type-checking we'd like.
>
> > BTW: i am okay with other patches about the spi-nor.
>
> Thanks. I'll probably merge the first 10 soon and see about respinning
> this one eventually.
Please merge the first 10 patches as soon as possible. :)
thanks
Huang Shijie
next prev parent reply other threads:[~2014-04-12 13:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-11 18:59 [PATCH v3 00/11] mtd: spi-nor: misc. updates, de-duplication Brian Norris
2014-04-11 18:59 ` [PATCH v3 01/11] mtd: spi-nor: drop \t after #define Brian Norris
2014-04-11 18:59 ` [PATCH v3 02/11] mtd: spi-nor: re-name OPCODE_* to SPINOR_OP_* Brian Norris
2014-04-11 18:59 ` [PATCH v3 03/11] mtd: spi-nor: unify read opcode variants with ST SPI FSM Brian Norris
2014-04-11 18:59 ` [PATCH v3 04/11] Documentation: spi-nor: rewrite some portions Brian Norris
2014-04-11 19:00 ` [PATCH v3 05/11] mtd: spi-nor: shorten Kconfig naming Brian Norris
2014-04-11 19:00 ` [PATCH v3 06/11] mtd: st_spi_fsm: fixup Kconfig dependency Brian Norris
2014-04-11 19:00 ` [PATCH v3 07/11] mtd: st_spi_fsm: kill duplicate CMD definitions Brian Norris
2014-04-11 19:00 ` [PATCH v3 08/11] mtd: st_spi_fsm: replace FLACH_CMD_* with SPINOR_OP_* Brian Norris
2014-04-11 19:00 ` [PATCH v3 09/11] mtd: st_spi_fsm: begin using spi-nor.h opcodes Brian Norris
2014-04-11 19:00 ` [PATCH v3 10/11] mtd: spi-nor: allow to be built as module Brian Norris
2014-04-11 19:00 ` [PATCH v3 11/11] mtd: fsl-quadspi: fix __iomem annotations, accessors Brian Norris
2014-04-12 4:57 ` Huang Shijie
2014-04-12 6:13 ` Brian Norris
2014-04-12 13:49 ` Huang Shijie [this message]
2014-04-14 18:21 ` [PATCH v3 00/11] mtd: spi-nor: misc. updates, de-duplication Brian Norris
2014-04-14 18:26 ` Marek Vasut
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=20140412134939.GA2952@localhost.localdomain \
--to=shijie8@gmail.com \
--cc=b32955@freescale.com \
--cc=computersforpeace@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marex@denx.de \
/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