public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 1/3] spl: add RAM boot device only if it is actually defined
Date: Mon, 21 Nov 2016 10:58:51 -0800	[thread overview]
Message-ID: <20161121185853.11300-2-stefan@agner.ch> (raw)
In-Reply-To: <20161121185853.11300-1-stefan@agner.ch>

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_DEVICE is not
enabled.

Fixes: 98136b2f26fa ("spl: Convert spl_ram_load_image() to use linker list")

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
---

Changes in v4:
- Use correct config CONFIG_SPL_RAM_DEVICE to descide whether to add
  BOOT_DEVICE_RAM to linker list.

Changes in v3: None
Changes in v2:
- Use CONFIG_SPL_RAM_SUPPORT to descide whether to compile the
  function in first place.

 common/spl/spl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index bdb165a..32b9f1e 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -220,7 +220,9 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
 
 	return 0;
 }
+#if defined(CONFIG_SPL_RAM_DEVICE)
 SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_RAM, spl_ram_load_image);
+#endif
 #if defined(CONFIG_SPL_DFU_SUPPORT)
 SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_DFU, spl_ram_load_image);
 #endif
-- 
2.10.2

  reply	other threads:[~2016-11-21 18:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21 18:58 [U-Boot] [PATCH v4 0/3] spl: USB Gadget cleanup Stefan Agner
2016-11-21 18:58 ` Stefan Agner [this message]
2016-11-24  2:20   ` [U-Boot] [PATCH v4 1/3] spl: add RAM boot device only if it is actually defined Simon Glass
2016-11-29  1:08   ` [U-Boot] [U-Boot, v4, " Tom Rini
2016-11-21 18:58 ` [U-Boot] [PATCH v4 2/3] spl: dfu: move DFU Kconfig to SPL Kconfig Stefan Agner
2016-11-29  1:08   ` [U-Boot] [U-Boot, v4, " Tom Rini
2016-11-21 18:58 ` [U-Boot] [PATCH v4 3/3] spl: add USB Gadget config option Stefan Agner
2016-11-29  1:08   ` [U-Boot] [U-Boot,v4,3/3] " Tom Rini

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=20161121185853.11300-2-stefan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox