[U-Boot] [PATCH 4/4]: arm: Kirkwood: See to it that sent data is 8-byte aligned
Simon Kagstrom
simon.kagstrom at netinsight.net
Wed Jul 8 14:44:39 CEST 2009
On Wed, 8 Jul 2009 05:17:08 -0700
Prafulla Wadaskar <prafulla at marvell.com> wrote:
> > U-boot might use non-8-byte-aligned addresses for sending
> > data, which the kwgbe_send doesn't accept (bootp does this
> > for me). This patch copies the data to be sent to a temporary
> > buffer if it is non-aligned.
> Kirkwood egiga driver may not be the only client for this kind of requirements. Any Ethernet controller using DMA will require aligned data pointer.
> I would suggest either upper layers should pass the aligned buffer pointers
> Or
> this patch should go in net/ethic, so that other drivers can benefit
Well, I've looked around a bit and other drivers also handle it this
way - see greth.c for example. I agree that it would be nice to handle
it at an upper layer, but that would require a good code review to find
the potential places where this problem could occur. I feel I'm a bit
too U-boot green to do that as of now :-)
I'll submit a new patch with this malloc'ed though.
// Simon
More information about the U-Boot
mailing list