All of lore.kernel.org
 help / color / mirror / Atom feed
From: Auer, Lukas <lukas.auer@aisec.fraunhofer.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/4] riscv: prior_stage_fdt_address should only be used when OF_PRIOR_STAGE is enabled
Date: Thu, 25 Apr 2019 20:56:41 +0000	[thread overview]
Message-ID: <9807c4678a089e344be39521ec6189a66c406be8.camel@aisec.fraunhofer.de> (raw)
In-Reply-To: <20190424063313.12188-4-uboot@andestech.com>

Hi Rick,

On Wed, 2019-04-24 at 14:33 +0800, Andes wrote:
> From: Rick Chen <rick@andestech.com>
> 
> This patch will fix prior_stage_fdt_address write failure problem, when
> AE350 was booting from flash.
> 
> When AE350 was booting from falsh, prior_stage_fdt_address will be in

nit: should be flash

> flash address, we shall avoid it to be written.
> 
> Signed-off-by: Rick Chen <rick@andestech.com>
> Cc: Greentime Hu <greentime@andestech.com>
> ---
>  arch/riscv/cpu/cpu.c   | 2 ++
>  arch/riscv/cpu/start.S | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
> index 768c44c..a17d37f 100644
> --- a/arch/riscv/cpu/cpu.c
> +++ b/arch/riscv/cpu/cpu.c
> @@ -15,7 +15,9 @@
>   * The variables here must be stored in the data section since they are used
>   * before the bss section is available.
>   */
> +#  if CONFIG_IS_ENABLED(OF_PRIOR_STAGE)
>  phys_addr_t prior_stage_fdt_address __attribute__((section(".data")));
> +#endif
>  #ifndef CONFIG_XIP
>  u32 hart_lottery __attribute__((section(".data"))) = 0;
>  /*
> diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S
> index 41d9a32..9ede1a7 100644
> --- a/arch/riscv/cpu/start.S
> +++ b/arch/riscv/cpu/start.S
> @@ -111,7 +111,9 @@ call_board_init_f_0:
>  	bnez	tp, secondary_hart_loop
>  #endif
>  
> +#  if CONFIG_IS_ENABLED(OF_PRIOR_STAGE)
>  	la	t0, prior_stage_fdt_address
> +#endif
>  	SREG	s1, 0(t0)

The SREG instruction must also be inside the ifdef here.

Thanks,
Lukas

>  
>  	jal	board_init_f_init_reserve

  parent reply	other threads:[~2019-04-25 20:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24  6:33 [U-Boot] [PATCH v2 0/4] AE350 support SMP boot from flash Andes
2019-04-24  6:33 ` [U-Boot] [PATCH v2 1/4] riscv: hart_lottery and available harts features can be selectable Andes
2019-04-24  7:02   ` Bin Meng
2019-04-25  0:57     ` Rick Chen
2019-04-25 20:55   ` Auer, Lukas
2019-04-29  2:24     ` Rick Chen
2019-04-24  6:33 ` [U-Boot] [PATCH v2 2/4] riscv: configs: Support AE350 SMP booting from flash flow Andes
2019-04-24  7:02   ` Bin Meng
2019-04-25 20:56   ` Auer, Lukas
2019-04-29  2:56     ` Rick Chen
2019-04-24  6:33 ` [U-Boot] [PATCH v2 3/4] riscv: prior_stage_fdt_address should only be used when OF_PRIOR_STAGE is enabled Andes
2019-04-24  7:02   ` Bin Meng
2019-04-25  1:00     ` Rick Chen
2019-04-25 20:58       ` Auer, Lukas
2019-04-29  3:00         ` Rick Chen
2019-04-25 20:56   ` Auer, Lukas [this message]
2019-04-24  6:33 ` [U-Boot] [PATCH v2 4/4] riscv: configs: AE350 will use CONFIG_OF_PRIOR_STAGE when booting from ram Andes
2019-04-24  7:02   ` Bin Meng
2019-04-25  1:02     ` Rick Chen
2019-04-25 20:56   ` Auer, Lukas

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=9807c4678a089e344be39521ec6189a66c406be8.camel@aisec.fraunhofer.de \
    --to=lukas.auer@aisec.fraunhofer.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.