From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] fdt_support: Use CONFIG_NR_DRAM_BANKS if necessary
Date: Mon, 13 Aug 2018 22:08:24 +0200 [thread overview]
Message-ID: <20180813220824.69d60065@jawa> (raw)
In-Reply-To: <20180813213542.32434-1-ramon.fried@gmail.com>
Hi Ramon,
> If CONFIG_NR_DRAM_BANKS is bigger than the default
> value (4) define MEMORY_BANKS_MAX as CONFIG_NR_DRAM_BANKS.
Also the Odroid XU3 uses 8 banks (but this is the fault of the board as
it has 4x512MiB probably).
I would also prefer to have the CONFIG_NR_DRAM_BANKS set to 4 (as it
was) and provide patch to convert it to Kconfig.
>
> Fixes: 2a1f4f1758b5 ("Revert "fdt_support: Use CONFIG_NR_DRAM_BANKS
> if defined"") Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
> ---
> common/fdt_support.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/common/fdt_support.c b/common/fdt_support.c
> index 34d2bd59c4..d84f5dbade 100644
> --- a/common/fdt_support.c
> +++ b/common/fdt_support.c
> @@ -409,7 +409,11 @@ static int fdt_pack_reg(const void *fdt, void
> *buf, u64 *address, u64 *size, return p - (char *)buf;
> }
>
> +#if CONFIG_NR_DRAM_BANKS > 4
> +#define MEMORY_BANKS_MAX CONFIG_NR_DRAM_BANKS
> +#else
> #define MEMORY_BANKS_MAX 4
> +#endif
> int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int
> banks) {
> int err, nodeoffset;
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180813/76eb4f94/attachment.sig>
next prev parent reply other threads:[~2018-08-13 20:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-13 21:35 [U-Boot] [PATCH] fdt_support: Use CONFIG_NR_DRAM_BANKS if necessary Ramon Fried
2018-08-13 20:08 ` Lukasz Majewski [this message]
2018-08-16 6:31 ` Ramon Fried
2018-08-17 2:04 ` [U-Boot] " Tom Rini
2018-08-18 6:07 ` Anand Moon
2018-08-18 8:39 ` Ramon Fried
2018-08-18 12:28 ` Tom Rini
2018-08-18 16:39 ` Anand Moon
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=20180813220824.69d60065@jawa \
--to=lukma@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.