public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Thomas Chou <thomas@wytron.com.tw>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] net/altera_tse: use flush_dcache_range instead of flush_dcache
Date: Thu, 10 Nov 2011 17:14:43 +0800	[thread overview]
Message-ID: <4EBB9603.5070702@wytron.com.tw> (raw)
In-Reply-To: <1320410288-15008-3-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/altera_tse.c |    9 ++++++---
>   1 files changed, 6 insertions(+), 3 deletions(-)

Acked-by: Thomas Chou <thomas@wytron.com.tw>

>
> diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c
> index 5b00717..0e6aac7 100644
> --- a/drivers/net/altera_tse.c
> +++ b/drivers/net/altera_tse.c
> @@ -268,7 +268,8 @@ static int tse_eth_send(struct eth_device *dev,
>   	volatile struct alt_sgdma_descriptor *tx_desc_cur =
>   	    (volatile struct alt_sgdma_descriptor *)&tx_desc[0];
>
> -	flush_dcache((unsigned long)packet, length);
> +	flush_dcache_range((unsigned long)packet,
> +			(unsigned long)packet + length);
>   	alt_sgdma_construct_descriptor_burst(
>   		(volatile struct alt_sgdma_descriptor *)&tx_desc[0],
>   		(volatile struct alt_sgdma_descriptor *)&tx_desc[1],
> @@ -306,7 +307,8 @@ static int tse_eth_rx(struct eth_device *dev)
>   		NetReceive(NetRxPackets[0], packet_length);
>
>   		/* start descriptor again */
> -		flush_dcache((unsigned long)(NetRxPackets[0]), PKTSIZE_ALIGN);
> +		flush_dcache_range((unsigned long)(NetRxPackets[0]),
> +			(unsigned long)(NetRxPackets[0]) + PKTSIZE_ALIGN);
>   		alt_sgdma_construct_descriptor_burst(
>   			(volatile struct alt_sgdma_descriptor *)&rx_desc[0],
>   			(volatile struct alt_sgdma_descriptor *)&rx_desc[1],
> @@ -834,7 +836,8 @@ static int tse_eth_init(struct eth_device *dev, bd_t * bd)
>   		0x0	/* channel */
>   		);
>   	debug("Configuring rx desc\n");
> -	flush_dcache((unsigned long)(NetRxPackets[0]), PKTSIZE_ALIGN);
> +	flush_dcache_range((unsigned long)(NetRxPackets[0]),
> +			(unsigned long)(NetRxPackets[0]) + PKTSIZE_ALIGN);
>   	alt_sgdma_construct_descriptor_burst(
>   		(volatile struct alt_sgdma_descriptor *)&rx_desc[0],
>   		(volatile struct alt_sgdma_descriptor *)&rx_desc[1],

  reply	other threads:[~2011-11-10  9:14 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
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 [this message]
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=4EBB9603.5070702@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