[U-Boot] [PATCH 1/4] sunxi: nand: Add basic sunxi NAND driver with DMA support

Marek Vasut
2015-07-16T21:26:51Z

On Thursday, July 16, 2015 at 11:15:58 PM, Scott Wood wrote:

[...]

> > +/* temporary buffer in internal ram */
> > +#ifdef CONFIG_SPL_BUILD
> > +/* in SPL temporary buffer cannot be @ 0x0 */
> > +unsigned char temp_buf[SPL_WRITE_SIZE] __aligned(0x10)
> > __section(".text#"); +#else
> > +/* put temporary buffer @ 0x0 */
> > +unsigned char *temp_buf = (unsigned char *)0x0;
> > +#endif
>
> If 0x0 is the address of an SRAM, its address should be symbolically
> defined. Also consider mapping it to a different virtual address, to avoid
> potential compiler mischief.

The DMA I believe accesses it via PA anyway, so mapping it elsewhere would
only confuse everyone who's hacking on the driver. Just my 5 cents ;-)

[...]

Best regards,
Marek Vasut