From: Scott Wood Date: Mon, 7 Oct 2013 11:42:35 -0500 Subject: [U-Boot] [PATCH 7/9][v2] net: tsec: Use portable types and accessors for BDs In-Reply-To: <52528A18.6090407@freescale.com> References: <1380752101.12932.127.camel@snotra.buserror.net> <1380800932-22552-1-git-send-email-claudiu.manoil@freescale.com> <1380825428.12932.154.camel@snotra.buserror.net> <524E7BEA.2070103@freescale.com> <1380901846.7979.2.camel@snotra.buserror.net> <524EEC04.1030105@freescale.com> <52528A18.6090407@freescale.com> Message-ID: <1381164155.7979.65.camel@snotra.buserror.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, 2013-10-07 at 13:16 +0300, Claudiu Manoil wrote: > On 10/5/2013 5:31 PM, Timur Tabi wrote: > > On Fri, Oct 4, 2013 at 11:25 AM, Claudiu Manoil > > wrote: > > > >> [v3] declaring the BDs as __iomem to avoid casting submitted: > >> http://patchwork.ozlabs.org/patch/280664/ > > > > + out_be32(®s->tbase, (u32)&txbd[0]); > > + out_be32(®s->rbase, (u32)&rxbd[0]); > > > > &rxbd[0] is a virtual address. > > > > Doesn't rbase require a physical address? You're assuming that virt == phys. > > > > > > These SoCs don't feature IOMMU so it cannot be a virtual address. > I think you're suggesting that virt_to_phys() should be used > to fix that, right? However, virt_to_phys() is equivalent to that > simple cast in most cases as there's no CONFIG_PHYS_64BIT for the > platforms with eTSEC. I'm actually not sure if there's a platform > with eTSEC for which that cast wouldn't be enough. There is CONFIG_PHYS_64BIT for most eTSEC SoCs, but since this is a RAM address rather than MMIO (and U-Boot only uses a static identity mapping of the low 2G of RAM), it doesn't matter, though ideally virt_to_phys should still be used. -Scott