[U-Boot] [PATCH] mtd: pxa3xx_nand: Correct allocation and init bug
Kevin Smith
kevin.smith at elecsyscorp.com
Fri Oct 23 21:56:43 CEST 2015
Hi Scott,
On 10/23/2015 01:20 PM, Scott Wood wrote:
>
> Yuck. Could you please rework this driver to not play games with pointers
> and one giant allocation? Why can't this function allocate each region it
> needs separately?
>
> -Scott
>
This driver is taken from Linux. There are a few API modifications to
make it work in U-Boot, but the main form and function of the driver is
the same. The single allocation method is used by Linux and is kept
here in U-boot.
As for why Linux does this, it may be for cache coherency, avoiding
memory fragmentation, speed (fewer calls to malloc), or something else.
I agree it is kind of opaque, but is probably done for a good reason. I
didn't port the driver, and I don't know if the reason is applicable to
U-Boot or if a rework is appropriate. Maybe Stefan can comment?
Either way, I am not able to rework it right now. I think my patch
fixes a legitimate issue. (It at least fixes the crashes I was
experiencing). I hope it can be accepted as-is.
Thanks,
Kevin
More information about the U-Boot
mailing list