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

Timur Tabi
2013-10-05T14:49:17Z

On Sat, Oct 5, 2013 at 9:31 AM, Timur Tabi <timur@tabi.org> wrote:
>
> + 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.

Also:

- out_be32(&regs->tbase, (unsigned int)(&rtx.txbd[tx_idx]));
- out_be32(&regs->rbase, (unsigned int)(&rtx.rxbd[rx_idx]));
+ out_be32(&regs->tbase, (u32)&txbd[0]);
+ out_be32(&regs->rbase, (u32)&rxbd[0]);

Are you assuming that rx_idx will always be zero in this case?