All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/3] spl: add RAM boot device only if it is actually defined
Date: Mon, 14 Nov 2016 14:44:00 -0800	[thread overview]
Message-ID: <ffaa08f030defb9e361a19f7575356f2@agner.ch> (raw)
In-Reply-To: <CAPnjgZ11+SB_2mkELbg2DuNHcjGLFrwWHodaHSXcb=ZWDW125Q@mail.gmail.com>

On 2016-11-14 12:44, Simon Glass wrote:
> Hi Stefan,
> 
> On 12 November 2016 at 12:13, Stefan Agner <stefan@agner.ch> wrote:
>> From: Stefan Agner <stefan.agner@toradex.com>
>>
>> Some devices (e.g. dra7xx) support loading to RAM using DFU without
>> having direct boot from RAM support. Make sure the linker list
>> does not contain BOOT_DEVICE_RAM if CONFIG_SPL_RAM_SUPPORT is not
>> enabled.
>>
>> Fixes: 98136b2f26fa ("spl: Convert spl_ram_load_image() to use linker list")
>>
>> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
>> ---
>>
>> Changes in v2:
>> - Use CONFIG_SPL_RAM_SUPPORT to descide whether to compile the
>>   function in first place.
>>
>>  common/spl/spl.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> Instead of this, how about moving it into its own file and putting
> that condition in the Makefile?

Generally a good idea.

What I don't like to much that we have two orthogonal config options
using that same function...

We probably should have something like:

CONFIG_SPL_RAM_SUPPORT
CONFIG_SPL_RAM_ONLY_SUPPORT depends on CONFIG_SPL_RAM_SUPPORT
CONFIG_SPL_DFU_SUPPORT depends on CONFIG_SPL_RAM_SUPPORT

Then we could use a single config option (CONFIG_SPL_RAM_SUPPORT) for
the new file.

However, that is beyond bug fixing, and I'd rather prefer to have it in
a separate patch, what do you think?

--
Stefan

  reply	other threads:[~2016-11-14 22:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-12 19:13 [U-Boot] [PATCH v2 0/3] spl: USB Gadget cleanup Stefan Agner
2016-11-12 19:13 ` [U-Boot] [PATCH v2 1/3] spl: add RAM boot device only if it is actually defined Stefan Agner
2016-11-14 20:44   ` Simon Glass
2016-11-14 22:44     ` Stefan Agner [this message]
2016-11-15  0:33       ` Simon Glass
2016-11-12 19:13 ` [U-Boot] [PATCH v2 2/3] spl: dfu: move DFU Kconfig to SPL Kconfig Stefan Agner
2016-11-14 20:44   ` Simon Glass
2016-11-12 19:13 ` [U-Boot] [PATCH v2 3/3] spl: add USB Gadget config option Stefan Agner
2016-11-15  8:52 ` [U-Boot] [PATCH v2 0/3] spl: USB Gadget cleanup B, Ravi
2016-11-15 20:40   ` Stefan Agner
2016-11-16  7:07     ` B, Ravi

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=ffaa08f030defb9e361a19f7575356f2@agner.ch \
    --to=stefan@agner.ch \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.