From: Andre Przywara <osp@andrep.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/8] ARM: bootm: allow skipping fdt memory node fixup
Date: Sat, 6 Jun 2015 01:14:09 +0100 [thread overview]
Message-ID: <20150606011409.7634f8ef@slackpad.lan> (raw)
In-Reply-To: <CAPnjgZ0eWpSyHQjz-AzGOwyLWYC+JfEWy4PqR+aEoe+mjzHr3g@mail.gmail.com>
On Fri, 5 Jun 2015 08:12:25 -0600
Simon Glass <sjg@chromium.org> wrote:
Hi Simon,
thanks for taking a look.
> On 4 June 2015 at 17:58, Andre Przywara <osp@andrep.de> wrote:
> > From: Rob Herring <robh@kernel.org>
> >
> > Currently, u-boot will always fixup the DT memory node on ARM. If
> > the dtb has correct memory information, then we don't want or need
> > u-boot to touch the memory node. Allow platforms to skip this by
> > not filling in dram bank information.
> >
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > Signed-off-by: Andre Przywara <osp@andrep.de>
> > ---
> > arch/arm/lib/board.c | 2 ++
> > arch/arm/lib/bootm-fdt.c | 5 ++++-
> > 2 files changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
> > index 37ea6e9..a3c7315 100644
> > --- a/arch/arm/lib/board.c
> > +++ b/arch/arm/lib/board.c
>
> I don't think we should be patching this file now - everything should
> be on generic board.
Right, looking closer at this patch much of it is actually not
necessary. Having CONFIG_NR_DRAM_BANKS set to 0 automatically skips a
lot of the code already, so we don't need any extra gating.
Hope that there are no compilers which complain about zero-sized arrays.
The only thing that harms us is the final fdt_setprop(), which will
_clear_ the reg property in the memory node in this case.
So I replaced this patch by just skipping the reg property setting if
the number of banks is 0 in common/fdt_support.c.
From looking at all callers of fdt_fixup_memory_banks() this looks like
a safe approach. Any objections?
I will send the replaced patch with the next revision.
Cheers,
Andre.
>
> > @@ -191,8 +191,10 @@ typedef int (init_fnc_t) (void);
> >
> > __weak void dram_init_banksize(void)
> > {
> > +#if
> > gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
> > gd->bd->bi_dram[0].size = gd->ram_size;
> > +#endif
> > }
> >
> > __weak int arch_cpu_init(void)
>
> [snip]
>
> Regards,
> Simon
next prev parent reply other threads:[~2015-06-06 0:14 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-04 23:58 [U-Boot] [PATCH 0/8] ARM: highbank: fix Calxeda machines Andre Przywara
2015-06-04 23:58 ` [U-Boot] [PATCH 1/8] ARM: highbank: add missing SCU register setup for reset Andre Przywara
2015-06-13 2:09 ` [U-Boot] [U-Boot, " Tom Rini
2015-06-04 23:58 ` [U-Boot] [PATCH 2/8] ARM: highbank: add reset support for Calxeda Midway machine Andre Przywara
2015-06-13 2:09 ` [U-Boot] [U-Boot, " Tom Rini
2015-06-04 23:58 ` [U-Boot] [PATCH 3/8] cmd_scsi: use lbaint_t for LBA values instead of u32 Andre Przywara
2015-06-13 2:09 ` [U-Boot] [U-Boot, " Tom Rini
2015-06-04 23:58 ` [U-Boot] [PATCH 4/8] ahci: support LBA48 data reads for 2+TB drives Andre Przywara
2015-06-13 2:10 ` [U-Boot] [U-Boot, " Tom Rini
2015-06-25 1:43 ` Bin Meng
2015-06-04 23:58 ` [U-Boot] [PATCH 5/8] ahci: extend data io wait to 10s Andre Przywara
2015-06-13 2:10 ` [U-Boot] [U-Boot,5/8] " Tom Rini
2015-06-04 23:58 ` [U-Boot] [PATCH 6/8] ARM: bootm: allow skipping fdt memory node fixup Andre Przywara
2015-06-05 14:12 ` Simon Glass
2015-06-06 0:14 ` Andre Przywara [this message]
2015-06-08 0:57 ` Simon Glass
2015-06-13 10:43 ` [U-Boot] [PATCH] fdt: prevent clearing memory node if there are no banks Andre Przywara
2015-06-15 15:57 ` Rob Herring
2015-06-16 18:07 ` Simon Glass
2015-06-04 23:58 ` [U-Boot] [PATCH 7/8] ARM: highbank: remove DRAM bank setup Andre Przywara
2015-06-13 2:10 ` [U-Boot] [U-Boot,7/8] " Tom Rini
2015-06-13 11:01 ` Andre Przywara
2015-06-15 15:18 ` Tom Rini
2015-06-04 23:58 ` [U-Boot] [PATCH 8/8] highbank: add custom ahci_link_up function Andre Przywara
2015-06-13 2:10 ` [U-Boot] [U-Boot, " Tom Rini
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=20150606011409.7634f8ef@slackpad.lan \
--to=osp@andrep.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