[PATCH v2 0/5] ARM: add support for Zynq

Steffen Trumtrar s.trumtrar at pengutronix.de
Tue Mar 19 09:57:58 EDT 2013


On Tue, Mar 19, 2013 at 07:59:27AM -0500, Josh Cartwright wrote:
> On Tue, Mar 19, 2013 at 10:21:55AM +0100, Steffen Trumtrar wrote:
> > Hi!
> > 
> > Still nothing fancy. Boots a little faster from SD and has a console.
> > For ethernet the macb-driver works fine,
> 
> I've also found the macb driver works, but it does require a change to
> prevent byteswapping during DMA, have you run into this on the ZedBoard?
> (patch below).

I already sent the same patch :-)
Xilinx decided to use a different reset default than Cadence uses.

> 
> Also, have you thought about how you'll handle the OCM mapping?  For my
> testing, I'm using a PBL image (which contains the lowlevel init), but I
> still need some hook into the decompressed image to remove the OCM
> mapping from the lower address space.  This can't be done during the
> execution of the PBL image, since it's running from OCM.
> 
> As far as I could tell, there was no good way to hook in early to the
> decompressed image.
> 
> I ran into this trying to boot the 14.4 release uImage, since it has a
> load address of 0x8000, and spans the 'hole' at 0x30000 configured out
> of BootROM to be 'Reserved' (writes to here trigger a Data Abort).
> 

You also need that for the mainline kernel. Or it won't even uncompress.


> > but needs to be "freed" from its at91 heritage (meaning: the struct
> > at91_ether_platform_data should be renamed first and defined someplace
> > else than a board.h)
> 
> I'm assuming you've done this, but if not, I've made this change in my
> tree.  For what it's worth, I went with 'struct macb_platform_data' and
> moved it into include/platform_data/macb.h.
> 

Actually, I haven't. If you have a series that renames tree-wide please
post that.

> >
> > Changelog:
> > 	- addressed all comments by Sascha and Josh
> > 	  (some uart stuff, defines, endianess, ...)
> > 	- squashed a little
> > 
> > Regards,
> > Steffen
> 
> -- 8< --
> Subject: [PATCH] macb: disable byte-order translation through DMA
> 
> Packet data already exists in memory in network byte-order.  Prevent the
> GEM from performing endianness translation through DMA.
> 
> Signed-off-by: Josh Cartwright <joshc at eso.teric.us>
> ---
>  drivers/net/macb.c | 1 +
>  drivers/net/macb.h | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> index 14a0689..25d1b9f 100644
> --- a/drivers/net/macb.c
> +++ b/drivers/net/macb.c
> @@ -307,6 +307,7 @@ static void macb_configure_dma(struct macb_device *bp)
>  		dmacfg |= GEM_BF(FBLDO, 16);
>  		dmacfg |= GEM_BIT(TXPBMS) | GEM_BF(RXBMS, -1L);
>  		dmacfg |= GEM_BIT(DDRP);
> +		dmacfg &= ~GEM_BIT(ENDIAN);
>  		gem_writel(bp, DMACFG, dmacfg);
>  	}
>  }
> diff --git a/drivers/net/macb.h b/drivers/net/macb.h
> index cadd561..fc4d1a9 100644
> --- a/drivers/net/macb.h
> +++ b/drivers/net/macb.h
> @@ -168,6 +168,8 @@
>  /* Bitfields in DMACFG. */
>  #define GEM_FBLDO_OFFSET			0
>  #define GEM_FBLDO_SIZE				5
> +#define GEM_ENDIAN_OFFSET			7
> +#define GEM_ENDIAN_SIZE				1
>  #define GEM_RXBMS_OFFSET			8
>  #define GEM_RXBMS_SIZE				2
>  #define GEM_TXPBMS_OFFSET			10
> -- 
> 1.8.1.5
> 
> 

-- 
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 |



More information about the barebox mailing list