mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Patrice VILCHEZ <patrice.vilchez@atmel.com>,
	barebox@lists.infradead.org,
	Nicolas Ferre <nicolas.ferre@atmel.com>
Subject: Re: [PATCH 01/14] macb: fix mmu support
Date: Tue, 13 Mar 2012 14:37:30 +0100	[thread overview]
Message-ID: <20120313133730.GI3852@pengutronix.de> (raw)
In-Reply-To: <1331551082-7730-1-git-send-email-plagnioj@jcrosoft.com>

On Mon, Mar 12, 2012 at 12:17:49PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

We already have this one in master.

> ---
>  drivers/net/macb.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> index ab0d1af..48492e5 100644
> --- a/drivers/net/macb.c
> +++ b/drivers/net/macb.c
> @@ -50,6 +50,7 @@
>  #include <mach/board.h>
>  #include <linux/clk.h>
>  #include <linux/err.h>
> +#include <asm/mmu.h>
>  
>  #include "macb.h"
>  
> @@ -118,6 +119,7 @@ static int macb_send(struct eth_device *edev, void *packet,
>  	macb->tx_ring[0].ctrl = ctrl;
>  	macb->tx_ring[0].addr = (ulong)packet;
>  	barrier();
> +	dma_flush_range((ulong) packet, (ulong)packet + length);
>  	writel(MACB_BIT(TE) | MACB_BIT(RE) | MACB_BIT(TSTART), macb->regs + MACB_NCR);
>  
>  	if (ctrl & TXBUF_UNDERRUN)
> @@ -430,9 +432,9 @@ static int macb_probe(struct device_d *dev)
>  	macb->miidev.parent = dev;
>  	macb->flags = pdata->flags;
>  
> -	macb->rx_buffer = xmalloc(CFG_MACB_RX_BUFFER_SIZE);
> -	macb->rx_ring = xmalloc(CFG_MACB_RX_RING_SIZE * sizeof(struct macb_dma_desc));
> -	macb->tx_ring = xmalloc(sizeof(struct macb_dma_desc));
> +	macb->rx_buffer = dma_alloc_coherent(CFG_MACB_RX_BUFFER_SIZE);
> +	macb->rx_ring = dma_alloc_coherent(CFG_MACB_RX_RING_SIZE * sizeof(struct macb_dma_desc));
> +	macb->tx_ring = dma_alloc_coherent(sizeof(struct macb_dma_desc));
>  
>  	macb->regs = dev_request_mem_region(dev, 0);
>  
> -- 
> 1.7.7
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-03-13 13:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12 11:17 Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 02/14] at91sam9263ek: add runtime nor detection Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 03/14] at91sam9263ek: add leds support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 04/14] at91sam9263ek: add dfu and usb serial support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 05/14] at91sam9263ek: update defconfig Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 06/14] at91sam9261ek/9g10ek: update partition layout Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 07/14] at91sam9261ek/9g10ek: add leds support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 08/14] at91sam9261ek/9g10ek: add dfu and usb serial support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 09/14] at91sam9261ek/9g10ek: add gpio Keyboard support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 10/14] at91sam9261ek/9g10ek: update board supprt Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 11/14] at91sam9m10g45ek: update partition layout Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:18 ` [PATCH 12/14] at91sam9m10g45ek: add leds support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:18 ` [PATCH 13/14] at91sam9m10g45ek: update defconfig Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:18 ` [PATCH 14/14] at91sam9260ek/9g20ek: " Jean-Christophe PLAGNIOL-VILLARD
2012-03-13 13:37 ` Sascha Hauer [this message]
2012-03-13 17:13   ` [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD

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=20120313133730.GI3852@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=patrice.vilchez@atmel.com \
    --cc=plagnioj@jcrosoft.com \
    /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