From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Jos=E9_Miguel_Gon=E7alves?= Date: Sun, 16 Sep 2012 10:16:47 +0100 Subject: [U-Boot] [PATCH v2 09/11] S3C24XX: Add NAND Flash driver In-Reply-To: <20120914190120.GL22028@bill-the-cat> References: <1347643742-19966-1-git-send-email-jose.goncalves@inov.pt> <1347643742-19966-10-git-send-email-jose.goncalves@inov.pt> <201209142021.12033.marex@denx.de> <50537B54.2060903@inov.pt> <20120914190120.GL22028@bill-the-cat> Message-ID: <505598FF.7010108@inov.pt> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/14/2012 08:01 PM, Tom Rini wrote: > 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 >>> [...] >>> >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> + >>>> +#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). > Barely: $ size u-boot-spl text data bss dec hex filename 3337 8 588 3933 f5d u-boot-spl $ size u-boot-spl-printf text data bss dec hex filename 7968 8 604 8580 2184 u-boot-spl-printf The printf is not so important that justifies exhausting the IRAM space available and preventing any future SPL expansion...