public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 09/11] S3C24XX: Add NAND Flash driver
Date: Mon, 17 Sep 2012 10:56:14 -0700	[thread overview]
Message-ID: <5057643E.20806@ti.com> (raw)
In-Reply-To: <505758FA.2090805@inov.pt>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/17/12 10:08, Jos? Miguel Gon?alves wrote:
> On 17-09-2012 17:57, Tom Rini wrote:
>> On Sun, Sep 16, 2012 at 10:16:47AM +0100, Jos? Miguel Gon?alves
>> wrote:
>>> 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
>>>>>>> <jose.goncalves@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).
>>>> 
>>> 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...
>> There's two parts to this: - What else can you do in a single
>> binary, in theory?  Is there boot medium detection and you would
>> want to have, for example, NAND and SD support in the same
>> binary?  I would say memory is meant for using, but this is a
>> board maintainer decision and that's you :)
> 
> That's exactly what I've got in mind when I talked about a future 
> expansion! Being able to boot also from an SD card. With only 8KB
> for .text and .data, I can not use printfs in the SPL for this
> platform (at least with the present printf support for SPL).
> 
>> - We have a define today (CONFIG_SPL_LIBCOMMON_SUPPORT) that
>> toggles printf or no printf.  If we really need to say yes to 
>> LIBCOMMON_SUPPORT and no to printf, we need finer grained config 
>> options and then a do-nothing printf is used for SPL.  Doing the 
>> opt-out driver by driver just punts this problem down the road to
>> the next developer and that's not very nice (and adding 
>> CONFIG_SPL_PRINTF_SUPPORT shouldn't be a big patch, modify a few 
>> Makefiles, update a bunch of config files, add 
>> common/spl/dummy_funcs.c and a __weak printf).

OK, so please take a stab at option two, on top of my SPL series,
keeping in mind what Scott has said (which makes sense) because
otherwise you'll be changing a lot of MMC files too to drop out printf :)

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBAgAGBQJQV2Q+AAoJENk4IS6UOR1W0VMP/1ToNzW5XmNApUGYIZi1d779
hJ6MieZoiTHOCnrHiRMMMAfOnPNnt+63TozmXWkhNhlPVRCs1Irx8nCpzMabjevr
ZENjnewtKsvgBsICak5rSQLbfyQBUG8tL3iBMPnYwyNhDf8CgED6rNCnxhV8Lr7j
o0gELaNHPRD7bJwglXo3TN0BxNtTrww3uSArSYh4WMVaOP908Mk7p7y8qEVSvNeh
BrdbVZK1oPmhlke9EUXfCQYqn/JdJ7mtdW1q5PdST7GFtnLZmqpj+FuOEwN3OioA
DE6J461Aqr95mGVUnUr7PxglytL6zLKJcE8YpIhu9nL6r9QRg0wm4HIKr3uTKLl5
WBs4ziJsLtm5IAZ7xg2FOsPrCkrAiL3bVQg0+7xVc1cVzKIGmtMR6oGVS+nI38Q6
lzmz0AQSuobeLkiP4+tL8C7kFkwMcj9I5LByN968ZMvbTftecIsdgYSkluOdGU5w
dwKPjplU4t8yy6d1TXbh0Xdw7q8cBZ3bjqbAKi3uo9BpEHgCDOwHp7oOTuJTDB/7
C6WxXHdQFHh7m0hxf1zkawOeh+oqd5MHAxjlckQ/zmg5UsmNWDA6RmmYgWrOBw9m
jCvN/lhe1soBnxaz2byUKwEkPIDwmBl+JgtSL7DMZ7bLfS59daXiaMNac2JPstG3
j0lBvj7SCVnQrE6SJxxa
=71I1
-----END PGP SIGNATURE-----

  reply	other threads:[~2012-09-17 17:56 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 17:28 [U-Boot] [PATCH v2 00/11] S3C24XX: Add support to MINI2416 board José Miguel Gonçalves
2012-09-14 17:28 ` [U-Boot] [PATCH v2 01/11] ARM: fix relocation on ARM926EJS José Miguel Gonçalves
2012-09-15 18:03   ` Marek Vasut
2012-09-16  9:45     ` José Miguel Gonçalves
2012-09-16 10:06       ` Marek Vasut
2012-09-16 10:16         ` José Miguel Gonçalves
2012-09-16 15:36           ` Marek Vasut
2012-09-16 16:26             ` José Miguel Gonçalves
2012-09-16 17:17               ` Marek Vasut
2012-09-17  6:28             ` Christian Riesch
2012-09-17  8:34               ` José Miguel Gonçalves
2012-09-17  9:03                 ` Christian Riesch
2012-09-17  9:20                   ` José Miguel Gonçalves
2012-09-17 17:18             ` Tom Rini
2012-09-17 17:23               ` Scott Wood
2012-09-17 17:32                 ` Tom Rini
2012-09-17 17:26               ` Marek Vasut
2012-09-17 17:35                 ` Tom Rini
2012-09-17 17:48                   ` Marek Vasut
2012-09-17 18:00                     ` Tom Rini
2012-09-17 17:27               ` José Miguel Gonçalves
2012-10-04 14:24   ` Albert ARIBAUD
2012-09-14 17:28 ` [U-Boot] [PATCH v2 02/11] S3C24XX: Add core support for Samsung's S3C24XX SoCs José Miguel Gonçalves
2012-09-14 18:03   ` Marek Vasut
     [not found]     ` <505375E3.6050005@inov.pt>
2012-09-14 18:25       ` Marek Vasut
2012-09-14 19:01         ` Scott Wood
2012-09-14 19:07           ` Marek Vasut
2012-09-14 19:17             ` Scott Wood
2012-09-14 18:39   ` Tom Rini
2012-09-14 17:28 ` [U-Boot] [PATCH v2 03/11] serial: Add support to 4 ports in serial_s3c24x0 José Miguel Gonçalves
2012-09-14 17:28 ` [U-Boot] [PATCH v2 04/11] serial: Use a more precise baud rate generation for serial_s3c24x0 José Miguel Gonçalves
2012-09-14 18:05   ` Marek Vasut
2012-09-14 17:28 ` [U-Boot] [PATCH v2 05/11] serial: Remove unnecessary delay in serial_s3c24x0 José Miguel Gonçalves
2012-09-14 18:05   ` Marek Vasut
2012-09-14 17:28 ` [U-Boot] [PATCH v2 06/11] rtc: Improve rtc_get() on s3c24x0_rtc José Miguel Gonçalves
2012-09-14 18:06   ` Marek Vasut
2012-09-14 17:28 ` [U-Boot] [PATCH v2 07/11] rtc: Fix rtc_reset() " José Miguel Gonçalves
2012-09-14 18:07   ` Marek Vasut
2012-09-14 17:28 ` [U-Boot] [PATCH v2 08/11] rtc: Don't allow setting unsuported years " José Miguel Gonçalves
2012-09-14 18:08   ` Marek Vasut
2012-09-14 17:29 ` [U-Boot] [PATCH v2 09/11] S3C24XX: Add NAND Flash driver José Miguel Gonçalves
2012-09-14 18:21   ` Marek Vasut
2012-09-14 18:45     ` José Miguel Gonçalves
2012-09-14 19:01       ` Tom Rini
2012-09-16  9:16         ` José Miguel Gonçalves
2012-09-17 16:57           ` Tom Rini
2012-09-17 17:03             ` Scott Wood
2012-09-17 17:08               ` Tom Rini
2012-09-17 17:13                 ` Scott Wood
2012-09-17 17:08             ` José Miguel Gonçalves
2012-09-17 17:56               ` Tom Rini [this message]
2012-09-17 18:05                 ` José Miguel Gonçalves
2012-09-17 18:27                   ` Tom Rini
2012-09-17 18:34                     ` José Miguel Gonçalves
2012-09-17 18:56                       ` Tom Rini
2012-09-14 19:24     ` Scott Wood
2012-09-14 20:20       ` Tom Rini
2012-09-14 20:29         ` Scott Wood
2012-09-17 11:11     ` José Miguel Gonçalves
2012-09-14 18:47   ` Tom Rini
2012-09-14 17:29 ` [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile José Miguel Gonçalves
2012-09-14 18:22   ` Marek Vasut
2012-09-14 19:08   ` Tom Rini
2012-09-16  9:27     ` José Miguel Gonçalves
2012-09-17  6:47       ` Christian Riesch
2012-09-17  8:30         ` José Miguel Gonçalves
2012-09-17  9:10           ` Christian Riesch
2012-09-17  9:24             ` José Miguel Gonçalves
2012-09-17 14:45               ` Tom Rini
2012-09-17 16:29                 ` Marek Vasut
2012-09-17 16:35                   ` Tom Rini
2012-09-17 16:27               ` Scott Wood
2012-09-17 16:51                 ` Tom Rini
2012-09-17 17:32                   ` Scott Wood
2012-09-17 17:53                     ` Tom Rini
2012-09-17 18:16                       ` Scott Wood
2012-09-17 19:52                       ` Wolfgang Denk
2012-09-14 17:29 ` [U-Boot] [PATCH v2 11/11] S3C24XX: Add support to MINI2416 board José Miguel Gonçalves
2012-09-14 18:58   ` Tom Rini
2012-09-16  9:11     ` José Miguel Gonçalves
2012-09-17 14:39       ` Tom Rini
2012-09-17 14:47         ` José Miguel Gonçalves
2012-09-17 15:11           ` Tom Rini
2012-09-18 12:11             ` José Miguel Gonçalves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5057643E.20806@ti.com \
    --to=trini@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox