[U-Boot] [PATCH 7/9][v2] net: tsec: Use portable types and accessors for BDs

Claudiu Manoil claudiu.manoil at freescale.com
Mon Oct 7 12:16:56 CEST 2013


On 10/5/2013 5:31 PM, Timur Tabi wrote:
> On Fri, Oct 4, 2013 at 11:25 AM, Claudiu Manoil
> <claudiu.manoil at freescale.com> wrote:
>
>> [v3] declaring the BDs as __iomem to avoid casting submitted:
>> http://patchwork.ozlabs.org/patch/280664/
>
> + out_be32(&regs->tbase, (u32)&txbd[0]);
> + out_be32(&regs->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.

If so, it should be a separate patch as this fix would apply to
existing (old) code and is out of the scope of this patch about
portable accessors.

Thanks.
Claudiu




More information about the U-Boot mailing list