[U-Boot] [PATCH v2 2/4] nand: lpc32xx: add hardware ECC support
LEMIEUX, SYLVAIN
slemieux at Tycoint.com
Wed Jul 29 19:35:58 CEST 2015
Hi Vladimir, Marek,
Thanks for the feedback; see comments below.
> From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Vladimir Zapolskiy
>
> Hi Marek, Sylvain,
>
> On 29.07.2015 19:50, Marek Vasut wrote:
> > On Wednesday, July 29, 2015 at 06:14:08 PM, slemieux.tyco at gmail.com wrote:
> >
>
> [snip]
>
> >> static void lpc32xx_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
> >> {
> >> +#if defined(CONFIG_DMA_LPC32XX) && !defined(CONFIG_SPL_BUILD)
> >
> > I'm not a big fan of those ifdefs -- why not use DMA even in SPL ?
>
> I think the main reason is that DMA in SPL has not been tested yet.
>
> If needed (?) the dependency between DMA and SPL may be described
> separately, e.g.
>
> +#if defined(CONFIG_DMA_LPC32XX) && defined(CONFIG_SPL_BUILD)
> +#warning "DMA support in SPL image is not tested"
> +#endif
>
Agree with Vladimir to add this change if everybody is OK with the change.
>
> Regarding this particular #ifdef case I suppose just
>
> +#if defined(CONFIG_DMA_LPC32XX)
>
> is good enough here, either it is SPL or U-boot.
I agree with this change for the ifdef; is there any objection to this change?
>
> >> + lpc32xx_nand_xfer(mtd, buf, len, 1);
> >> +#else
> >> while (len-- > 0)
> >> *buf++ = readl(&lpc32xx_nand_slc_regs->data);
> >> +#endif
> >> }
>
> I would propose to add another pair of DMA specific
> lpc32xx_read_buf()/lpc32xx_write_buf() functions chosen under
> CONFIG_DMA_LPC32XX condition, this might improve readability.
>
I will do it; it will make the code more easy to read.
> --
> With best wishes,
> Vladimir
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
________________________________
This e-mail contains privileged and confidential information intended for the use of the addressees named above. If you are not the intended recipient of this e-mail, you are hereby notified that you must not disseminate, copy or take any action in respect of any information contained in it. If you have received this e-mail in error, please notify the sender immediately by e-mail and immediately destroy this e-mail and its attachments.
More information about the U-Boot
mailing list