From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Goldschmidt Date: Mon, 8 Oct 2018 15:17:24 +0200 Subject: [U-Boot] [PATCH] arm: socfpga: fix SPL booting from fpga OnChip RAM In-Reply-To: <19bc0746-4ba5-8054-fd45-9c6e2153c005@denx.de> References: <20181006203342.11180-1-simon.k.r.goldschmidt@gmail.com> <20181006203858.GY15855@bill-the-cat> <0f05ffea-9483-74be-c364-caf79f94eb20@gmail.com> <19bc0746-4ba5-8054-fd45-9c6e2153c005@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Oct 8, 2018 at 1:42 PM Marek Vasut wrote: > > On 10/08/2018 06:04 AM, Simon Goldschmidt wrote: > > > > > > Marek Vasut > schrieb am Mo., 8. > > Okt. 2018, 02:20: > > > > On 10/07/2018 01:08 PM, Simon Goldschmidt wrote: > > > On 06.10.2018 22:38, Tom Rini wrote: > > >> On Sat, Oct 06, 2018 at 10:33:42PM +0200, Simon Goldschmidt wrote: > > >> > > >>> This patch prevents disabling the FPGA bridges when > > >>> SPL or U-Boot is executed from FPGA onchip RAM. > > >>> > > >>> Signed-off-by: Simon Goldschmidt > > > > > > >>> --- > > >>> > > >>> > > >>> There are other patches required to make boot from > > >>> FPGA work correctly: > > >>> - CONFIG_SPL_TEXT_BASE needs to be set to 0xC0000000 > > >>> ideally this is done by moving SPL_TEXT_BASE to Kconfig: > > >>> https://patchwork.ozlabs.org/patch/976918/ > > >>> - spl_ram.c needs this patch by Michal Simek: > > >>> https://patchwork.ozlabs.org/patch/978694/ > > >>> - For U-Boot to be run from FPGA onchip RAM, either > > >>> CONFIG_SYS_EXTRA_ENV_RELOC needs to be used or this patch > > >>> is required to relocate gd->env_addr: > > >>> https://patchwork.ozlabs.org/patch/975702/ > > >> For the record, I'm currently reviewing the last two parts here. The > > >> first one will come soon (I do Kconfig migrations separate so I > > can see > > >> a lack of size change). > > > > > > > > > OK, after Tom merged the last to parts, I can confirm I can > > successfully > > > boot from FPGA by adapting CONFIG_SYS_TEXT_BASE via config and hacking > > > CONFIG_SPL_TEXT_BASE to 0xC0000000 (as moving this to Kconfig is still > > > missing). > > > > So is this patch still needed ? > > > > > > Yes, sorry for being unclear there. > > Can we do what this patch does with less ifdeffery ? Maybe with simple > if (address > FOO && < bar) remap() ? Hmm, I can try, but the change in misc_gen5.c depends on whether we build SPL or U-Boot, I'm not sure how to do that without ifdef... Does 'if (CONFIG_IS_ENABLED(SPL_BUILD))' work? Does it look nice? It's not used anywhere else like that. Simon