From: Thomas Chou <thomas@wytron.com.tw>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] net/ethoc: use flush_dcache_range instead of flush_dcache
Date: Thu, 10 Nov 2011 17:12:56 +0800 [thread overview]
Message-ID: <4EBB9598.20006@wytron.com.tw> (raw)
In-Reply-To: <1320410288-15008-2-git-send-email-stefan.kristiansson@saunalahti.fi>
On 11/04/2011 08:38 PM, Stefan Kristiansson wrote:
> flush_dcache is not declared in the common.h API,
> flush_dcache_range however is
>
> Signed-off-by: Stefan Kristiansson<stefan.kristiansson@saunalahti.fi>
> Cc: Ben Warren<biggerbadderben@gmail.com>
> Cc: Thomas Chou<thomas@wytron.com.tw>
> ---
> drivers/net/ethoc.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
Acked-by: Thomas Chou <thomas@wytron.com.tw>
>
> diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
> index 7ac9025..cb79753 100644
> --- a/drivers/net/ethoc.c
> +++ b/drivers/net/ethoc.c
> @@ -272,7 +272,7 @@ static int ethoc_init_ring(struct eth_device *dev)
> if (i == priv->num_rx - 1)
> bd.stat |= RX_BD_WRAP;
>
> - flush_dcache(bd.addr, PKTSIZE_ALIGN);
> + flush_dcache_range(bd.addr, bd.addr + PKTSIZE_ALIGN);
> ethoc_write_bd(dev, priv->num_tx + i,&bd);
> }
>
> @@ -377,7 +377,7 @@ static int ethoc_rx(struct eth_device *dev, int limit)
> }
>
> /* clear the buffer descriptor so it can be reused */
> - flush_dcache(bd.addr, PKTSIZE_ALIGN);
> + flush_dcache_range(bd.addr, bd.addr + PKTSIZE_ALIGN);
> bd.stat&= ~RX_BD_STATS;
> bd.stat |= RX_BD_EMPTY;
> ethoc_write_bd(dev, entry,&bd);
> @@ -431,7 +431,7 @@ static int ethoc_send(struct eth_device *dev, volatile void *packet, int length)
> bd.stat&= ~TX_BD_PAD;
> bd.addr = (u32)packet;
>
> - flush_dcache(bd.addr, length);
> + flush_dcache_range(bd.addr, bd.addr + length);
> bd.stat&= ~(TX_BD_STATS | TX_BD_LEN_MASK);
> bd.stat |= TX_BD_LEN(length);
> ethoc_write_bd(dev, entry,&bd);
next prev parent reply other threads:[~2011-11-10 9:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 12:38 [U-Boot] [PATCH 0/3] Fix conflicting definitions of flush_dcache Stefan Kristiansson
2011-11-04 12:38 ` [U-Boot] [PATCH 1/3] net/ethoc: use flush_dcache_range instead " Stefan Kristiansson
2011-11-10 9:12 ` Thomas Chou [this message]
2012-03-30 21:58 ` Wolfgang Denk
2011-11-04 12:38 ` [U-Boot] [PATCH 2/3] net/altera_tse: " Stefan Kristiansson
2011-11-10 9:14 ` Thomas Chou
2012-03-30 21:58 ` Wolfgang Denk
2011-11-04 12:38 ` [U-Boot] [PATCH 3/3] nios2: add flush_dcache_range function Stefan Kristiansson
2011-11-10 9:10 ` Thomas Chou
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=4EBB9598.20006@wytron.com.tw \
--to=thomas@wytron.com.tw \
--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