public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 3/6] mv_egiga: bugfix: DMA issue fixed using volatile
Date: Fri, 09 Jul 2010 15:00:58 +0200	[thread overview]
Message-ID: <4C371D8A.70108@free.fr> (raw)
In-Reply-To: <4C370DCE.2020108@free.fr>

Le 09/07/2010 13:53, Albert ARIBAUD a ?crit :
> Le 09/07/2010 13:11, Prafulla Wadaskar a ?crit :
>
>> You can use volatile qualifier for the variables in DMA specific code instead of modifying structures,
>> Try to use memory barrier or something like that-
>> Some ref : http://gcc.gnu.org/ml/gcc/2003-04/msg01180.html
>> may be someone c-expert on the list can suggest better
>
> Seems we've followed the same line of reasoning. :)
>
> I'll look into forcing a sequence point without resorting to asm.

Found it. arch/arm/include/asm/system.h provides isb() which expands to 
an asm statement acting as a sequence point. Inserting an isb() right 
before starting DMA ensures that all writes to the descriptor are 
emitted before setting the TQC register for DMA, so that should work.

Shouldn't I send out the isb() fix as a separate patch? After all, it is 
a fix for a bug (uncontrolled sequencing) which is present for kirkwood 
even though we were lucky enough that it did not bite so far.

Amicalement,
-- 
Albert.

  reply	other threads:[~2010-07-09 13:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-09  6:34 [U-Boot] [PATCH V2 0/6] Marvell egiga multiple SoC support Albert Aribaud
2010-07-09  6:34 ` [U-Boot] [PATCH V2 1/6] net: rename: kirkwood_egiga as mv_egiga Albert Aribaud
2010-07-09  6:34   ` [U-Boot] [PATCH V2 2/6] mv_egiga: support SoCs other than kirkwood Albert Aribaud
2010-07-09  6:34     ` [U-Boot] [PATCH V2 3/6] mv_egiga: bugfix: DMA issue fixed using volatile Albert Aribaud
2010-07-09  6:34       ` [U-Boot] [PATCH V2 4/6] mv_egiga: only randomize MAC on kirkwood Albert Aribaud
2010-07-09  6:34         ` [U-Boot] [PATCH V2 5/6] mv_egiga: add support for orion5x egiga controller Albert Aribaud
2010-07-09  6:34           ` [U-Boot] [PATCH V2 6/6] edminiv2: add ethernet support Albert Aribaud
2010-07-09  8:58         ` [U-Boot] [PATCH V2 4/6] mv_egiga: only randomize MAC on kirkwood Prafulla Wadaskar
2010-07-09  9:17           ` Albert ARIBAUD
2010-07-09  9:16       ` [U-Boot] [PATCH V2 3/6] mv_egiga: bugfix: DMA issue fixed using volatile Prafulla Wadaskar
2010-07-09  9:54         ` Albert ARIBAUD
2010-07-09 11:11           ` Prafulla Wadaskar
2010-07-09 11:53             ` Albert ARIBAUD
2010-07-09 13:00               ` Albert ARIBAUD [this message]
2010-07-10  6:41                 ` Prafulla Wadaskar
2010-07-09 11:51           ` [U-Boot] mv_egiga: effect on making struct members volatile(was: [PATCH V2 3/6] mv_egiga: bugfix: DMA issue fixed using volatile) Albert ARIBAUD
2010-07-09  9:08   ` [U-Boot] [PATCH V2 1/6] net: rename: kirkwood_egiga as mv_egiga Prafulla Wadaskar

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=4C371D8A.70108@free.fr \
    --to=albert.aribaud@free.fr \
    --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