All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: socfpga: fix SPL booting from fpga OnChip RAM
Date: Mon, 8 Oct 2018 15:22:38 +0200	[thread overview]
Message-ID: <303b392e-36de-60c5-4d53-2b0a4222fb39@denx.de> (raw)
In-Reply-To: <CAAh8qszKFx1Ao2qREWE3bS3nHAzPQJkcwrHZBcKz4GfV6zSOJg@mail.gmail.com>

On 10/08/2018 03:17 PM, Simon Goldschmidt wrote:
> On Mon, Oct 8, 2018 at 1:42 PM Marek Vasut <marex@denx.de> wrote:
>>
>> On 10/08/2018 06:04 AM, Simon Goldschmidt wrote:
>>>
>>>
>>> Marek Vasut <marex at denx.de <mailto:marex@denx.de>> 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
>>>     <simon.k.r.goldschmidt@gmail.com
>>>     <mailto:simon.k.r.goldschmidt@gmail.com>>
>>>     >>> ---
>>>     >>>
>>>     >>>
>>>     >>> 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.

That's fine, I had those address range checks in mind.

-- 
Best regards,
Marek Vasut

      reply	other threads:[~2018-10-08 13:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-06 20:33 [U-Boot] [PATCH] arm: socfpga: fix SPL booting from fpga OnChip RAM Simon Goldschmidt
2018-10-06 20:38 ` Tom Rini
2018-10-07 11:08   ` Simon Goldschmidt
2018-10-07 12:36     ` Marek Vasut
2018-10-08  4:04       ` Simon Goldschmidt
2018-10-08  9:03         ` Marek Vasut
2018-10-08 13:17           ` Simon Goldschmidt
2018-10-08 13:22             ` Marek Vasut [this message]

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=303b392e-36de-60c5-4d53-2b0a4222fb39@denx.de \
    --to=marex@denx.de \
    --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.