From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UHx3A-0003KJ-3n for barebox@lists.infradead.org; Tue, 19 Mar 2013 13:58:00 +0000 Date: Tue, 19 Mar 2013 14:57:58 +0100 From: Steffen Trumtrar Message-ID: <20130319135758.GE29295@pengutronix.de> References: <1363684920-3034-1-git-send-email-s.trumtrar@pengutronix.de> <20130319125927.GV16050@kryptos> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20130319125927.GV16050@kryptos> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH v2 0/5] ARM: add support for Zynq To: Josh Cartwright Cc: barebox@lists.infradead.org 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 > --- > 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 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox