From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1] ppc: Fix ppc4xx CONFIG_SYS_GENERIC_BOARD
Date: Wed, 05 Nov 2014 10:24:19 +0100 [thread overview]
Message-ID: <5459ECC3.8080904@denx.de> (raw)
In-Reply-To: <1415008591-20829-1-git-send-email-dirk.eibach@gdsys.cc>
On 03.11.2014 10:56, dirk.eibach at gdsys.cc wrote:
> From: Dirk Eibach <dirk.eibach@gdsys.cc>
>
> I realized that with v2014.10 u-boot is not starting up on
> ppc4xx boards with CONFIG_SYS_GENERIC_BOARD set.
>
> I bisected it down to this:
> d54d7eb support blackfin board initialization in generic board_f
>
> With
> d29437a ppc: Make ppc4xx ready for CONFIG_SYS_GENERIC_BOARD
> I set gd to a defined value for ppc4xx in cpu_init_f().
> I did not realize that the gd struct has also to be memset()
> to zero at this point.
>
> But at least commit d54d7eb assumes it is:
> @@ -516,11 +528,13 @@ static int reserve_malloc(void)
> /* (permanently) allocate a Board Info struct */
> static int reserve_board(void)
> {
> - gd->start_addr_sp -= sizeof(bd_t);
> - gd->bd = (bd_t *)map_sysmem(gd->start_addr_sp, sizeof(bd_t));
> - memset(gd->bd, '\0', sizeof(bd_t));
> - debug("Reserving %zu Bytes for Board Info at: %08lx\n",
> - sizeof(bd_t), gd->start_addr_sp);
> + if (!gd->bd) {
> + gd->start_addr_sp -= sizeof(bd_t);
> + gd->bd = (bd_t *)map_sysmem(gd->start_addr_sp, sizeof(bd_t));
> + memset(gd->bd, '\0', sizeof(bd_t));
> + debug("Reserving %zu Bytes for Board Info at: %08lx\n",
> + sizeof(bd_t), gd->start_addr_sp);
> + }
> return 0;
> }
> #endif
>
> This might also be an issue on other architectures, so maintainers should
> check.
Thanks Dirk for fixing this on ppc4xx. Applied to u-boot-ppc4xx/master.
Thanks,
Stefan
prev parent reply other threads:[~2014-11-05 9:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-03 9:56 [U-Boot] [PATCH v1] ppc: Fix ppc4xx CONFIG_SYS_GENERIC_BOARD dirk.eibach at gdsys.cc
2014-11-05 9:24 ` Stefan Roese [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=5459ECC3.8080904@denx.de \
--to=sr@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox