From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] cmd_nand: dump: Align data and OOB buffers
Date: Tue, 31 Jul 2012 11:14:28 -0500 [thread overview]
Message-ID: <50180464.1050101@freescale.com> (raw)
In-Reply-To: <5017FC68.8090905@wwwdotorg.org>
On 07/31/2012 10:40 AM, Stephen Warren wrote:
> On 07/31/2012 12:21 AM, Thierry Reding wrote:
>> In order for cache invalidation and flushing to work properly, the data
>> and OOB buffers must be aligned to full cache lines.
>>
>> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
>
> You probably want to CC the NAND maintainer, Scott Wood (I have here) so
> he can ack this or apply it.
>
>> ---
>> common/cmd_nand.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/common/cmd_nand.c b/common/cmd_nand.c
>> index a91ccf4..4367f5a 100644
>> --- a/common/cmd_nand.c
>> +++ b/common/cmd_nand.c
>> @@ -48,8 +48,8 @@ static int nand_dump(nand_info_t *nand, ulong off, int only_oob, int repeat)
>>
>> last = off;
>>
>> - datbuf = malloc(nand->writesize);
>> - oobbuf = malloc(nand->oobsize);
>> + datbuf = memalign(ARCH_DMA_MINALIGN, nand->writesize);
>> + oobbuf = memalign(ARCH_DMA_MINALIGN, nand->oobsize);
>> if (!datbuf || !oobbuf) {
>> puts("No memory for page buffer\n");
>> return 1;
>
Acked-by: Scott Wood <scottwood@freescale.com>
...though I'm still not fond of the idea that every user of an API has
to know whether DMA might be used on the buffer.
-Scott
next prev parent reply other threads:[~2012-07-31 16:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-31 6:21 [U-Boot] [PATCH 1/2] cmd_nand: dump: Align data and OOB buffers Thierry Reding
2012-07-31 6:21 ` [U-Boot] [PATCH 2/2] tegra: Enable NAND on TEC Thierry Reding
2012-07-31 15:40 ` Stephen Warren
2012-07-31 17:58 ` Thierry Reding
2012-07-31 7:00 ` [U-Boot] [PATCH 1/2] cmd_nand: dump: Align data and OOB buffers Simon Glass
2012-07-31 15:40 ` Stephen Warren
2012-07-31 16:14 ` Scott Wood [this message]
2012-09-07 21:42 ` Tom Warren
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=50180464.1050101@freescale.com \
--to=scottwood@freescale.com \
--cc=u-boot@lists.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