[U-Boot] [PATCH v2 09/11] S3C24XX: Add NAND Flash driver

Tom Rini trini at ti.com
Fri Sep 14 21:01:20 CEST 2012


On Fri, Sep 14, 2012 at 07:45:40PM +0100, Jos? Miguel Gon?alves wrote:
> On 14-09-2012 19:21, Marek Vasut wrote:
> >Dear Jos? Miguel Gon?alves,
> >
> >>NAND Flash driver with HW ECC for the S3C24XX SoCs.
> >>Currently it only supports SLC NAND chips.
> >>
> >>Signed-off-by: Jos? Miguel Gon?alves <jose.goncalves at inov.pt>
> >[...]
> >
> >>+#include <common.h>
> >>+#include <nand.h>
> >>+#include <asm/io.h>
> >>+#include <asm/arch/s3c24xx_cpu.h>
> >>+#include <asm/errno.h>
> >>+
> >>+#define MAX_CHIPS	2
> >>+static int nand_cs[MAX_CHIPS] = { 0, 1 };
> >>+
> >>+#ifdef CONFIG_SPL_BUILD
> >>+#define printf(arg...) do {} while (0)
> >This doesn't seem quite right ...
> >
> >1) this should be in CPU directory
> >2) should be enabled only if CONFIG_SPL_SERIAL_SUPPORT is not set
> >3) should be inline function, not a macro
> 
> 1) and 3) OK.
> Don't quite understand 2). I want to remove the printfs in the SPL
> build, as it would blown up the internal SoC RAM space available.
> So why add a condition with CONFIG_SPL_SERIAL_SUPPORT?

You've got 8KB, based on the final patch in the series.  At least in my
SPL series that's still enough to get you printf/puts (I believe 4kb was
the cutoff where that had to be dropped).

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120914/a545310e/attachment.pgp>


More information about the U-Boot mailing list