From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] common/board_f: Add back gd init
Date: Wed, 30 Apr 2014 10:33:19 -0700 [thread overview]
Message-ID: <536133DF.1070406@freescale.com> (raw)
In-Reply-To: <1398725474-864-1-git-send-email-yorksun@freescale.com>
On 04/28/2014 03:51 PM, York Sun wrote:
> For powerpc SoCs, the initial gd is in INIT_RAM, in most cases, resideing
> in locked D-cache. At the time the function baord_inti_f() runs, no other
> RAM is available as a stack. This technique has been used in
> arch/powerpc/lib/board.c and should be added to generic board for powerpc.
>
> Signed-off-by: York Sun <yorksun@freescale.com>
> ---
> common/board_f.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/common/board_f.c b/common/board_f.c
> index cbdf06f..3a00b92 100644
> --- a/common/board_f.c
> +++ b/common/board_f.c
> @@ -970,7 +970,10 @@ static init_fnc_t init_sequence_f[] = {
>
> void board_init_f(ulong boot_flags)
> {
> -#ifndef CONFIG_X86
> +#ifdef CONFIG_PPC
> + gd = (gd_t *)(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET);
> + __asm__ __volatile__("" : : : "memory");
> +#elif !defined(CONFIG_X86)
> gd_t data;
>
> gd = &data;
>
Scott,
Please review this patch. You mentioned in my RFC patch review that "gd is
already initialized at the beginning of board_init_f()". I think that's not the
case. This change is still needed to get gd correct value.
York
next prev parent reply other threads:[~2014-04-30 17:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-28 22:51 [U-Boot] [PATCH 1/2] common/board_f: Add back gd init York Sun
2014-04-28 22:51 ` [U-Boot] [PATCH 2/2] common/board_f: Fix size variable York Sun
2014-04-30 17:33 ` York Sun [this message]
2014-04-30 17:57 ` [U-Boot] [PATCH 1/2] common/board_f: Add back gd init Scott Wood
2014-04-30 18:14 ` York Sun
2014-04-30 18:24 ` Scott Wood
2014-04-30 18:30 ` York Sun
2014-04-30 20:38 ` York Sun
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=536133DF.1070406@freescale.com \
--to=yorksun@freescale.com \
--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