[U-Boot] [PATCH] net: fec: Avoid MX28 bus sync issue

Fabio Estevam
2013-09-12T19:37:44Z

On Thu, Sep 12, 2013 at 3:53 PM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Fabio Estevam,
>
> In message <CAOMZO5BY6kDOCoWn_SRwhPE7ssMjAReZ2bcFXGgFF-_Wrdgo0g@mail.gmail.com> you wrote:
>>
>> > It makes perfect sense to allocate variable with function scope only
>> > on the stack. That's what the stack has been invented for.
>>
>> This buffer in the fec driver will be used in DMA transfer, so maybe
>> that's the reason we should use malloc instead of using the stack?
>
> What has DMA to do with that? We're talking about alignment only.

I mentioned DMA because we align the buffer with __aligned(ARCH_DMA_MINALIGN).

Will try to see if I can reproduce the problem here, but the last time
I tried I was not able to.

Maybe the gcc version that Robert and Hector pointed out may explain
the different behaviour.

Regards,

Fabio Estevam