From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Wed, 16 Nov 2016 14:44:19 +0100 Subject: [U-Boot] [PATCH v3 1/3] spl: add RAM boot device only if it is actually defined In-Reply-To: <20161115210246.2245-2-stefan@agner.ch> References: <20161115210246.2245-1-stefan@agner.ch> <20161115210246.2245-2-stefan@agner.ch> Message-ID: <20161116144419.3a80c79c@amdc2363> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefan, > From: Stefan Agner > > 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") > Thanks for the patch and sorry for late reply.... Acked-by: Lukasz Majewski > Signed-off-by: Stefan Agner > --- > > 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 | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/common/spl/spl.c b/common/spl/spl.c > index bdb165a..ef17619 100644 > --- a/common/spl/spl.c > +++ b/common/spl/spl.c > @@ -174,7 +174,7 @@ __weak void __noreturn > jump_to_image_no_args(struct spl_image_info *spl_image) # define > CONFIG_SPL_LOAD_FIT_ADDRESS 0 #endif > > -#if defined(CONFIG_SPL_RAM_DEVICE) || defined(CONFIG_SPL_DFU_SUPPORT) > +#if defined(CONFIG_SPL_RAM_SUPPORT) || > defined(CONFIG_SPL_DFU_SUPPORT) static ulong spl_ram_load_read(struct > spl_load_info *load, ulong sector, ulong count, void *buf) > { > @@ -220,7 +220,9 @@ static int spl_ram_load_image(struct > spl_image_info *spl_image, > return 0; > } > +#if defined(CONFIG_SPL_RAM_SUPPORT) > 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 -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group