Skip to contentSkip to conversation

fdt_support: Use CONFIG_NR_DRAM_BANKS if necessary

PATCH In review Ramon Fried 4 participants 8 messages Aug 13, 2018 – Aug 18, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fdt_support: Use CONFIG_NR_DRAM_BANKS if necessary

If CONFIG_NR_DRAM_BANKS is bigger than the default value (4) define MEMORY_BANKS_MAX as CONFIG_NR_DRAM_BANKS.

Fixes 2a1f4f1758b5 ("Revert "fdt_support: Use CONFIG_NR_DRAM_BANKS if defined"")
---
 common/fdt_support.c | 4 ++++
 1 file changed, 4 insertions(+)
common/fdt_support.c +4 -0
index 34d2bd59c4..d84f5dbade 100644
@@ -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;
Signature · 1 line
2.18.0
#1 lore raw

PATCH 1/1 fdt_support: Use CONFIG_NR_DRAM_BANKS if necessary

Hi Ramon,

Quoted 2 lines

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.

Quoted 13 lines
Fixes 2a1f4f1758b5 ("Revert "fdt_support: Use CONFIG_NR_DRAM_BANKS

if defined"") Signed-off-by: Ramon Fried <[email protected]>

---
 common/fdt_support.c | 4 ++++
 1 file changed, 4 insertions(+)
common/fdt_support.c +0 -0
index 34d2bd59c4..d84f5dbade 100644
@@ -409,7 +409,11 @@ static int fdt_pack_reg(const void *fdt, void
 *buf, u64 *address, u64 *size, return p - (char *)buf;

common/fdt_support.c static int fdt_pack_reg(const void *fdt, void · line 419

Quoted 10 lines
common/fdt_support.c +4 -0
 }
 
+#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>

#2 lore raw

PATCH 1/1 fdt_support: Use CONFIG_NR_DRAM_BANKS if necessary

In reply to Ramon Fried

Tom, there are more boards that fail and need some resolution. Can you merge this patch ?
Thanks,
Ramon.

Quoted 29 lines · Ramon Fried

If CONFIG_NR_DRAM_BANKS is bigger than the default value (4) define MEMORY_BANKS_MAX as CONFIG_NR_DRAM_BANKS.

Fixes 2a1f4f1758b5 ("Revert "fdt_support: Use CONFIG_NR_DRAM_BANKS if defined"")
---
 common/fdt_support.c | 4 ++++
 1 file changed, 4 insertions(+)
common/fdt_support.c +4 -1
index 34d2bd59c4..d84f5dbade 100644
@@ -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;
--

2.18.0

#3 lore raw
In reply to Ramon Fried
Quoted 5 lines · Ramon Fried

If CONFIG_NR_DRAM_BANKS is bigger than the default value (4) define MEMORY_BANKS_MAX as CONFIG_NR_DRAM_BANKS.

Fixes 2a1f4f1758b5 ("Revert "fdt_support: Use CONFIG_NR_DRAM_BANKS if defined"")

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180816/a229bd53/attachment.sig>
#4 lore raw

Hi Tom

Quoted 6 lines · Tom Rini
Quoted 3 lines · Ramon Fried

If CONFIG_NR_DRAM_BANKS is bigger than the default value (4) define MEMORY_BANKS_MAX as CONFIG_NR_DRAM_BANKS.

Quoted 7 lines
Quoted 2 lines
Fixes 2a1f4f1758b5 ("Revert "fdt_support: Use CONFIG_NR_DRAM_BANKS if defined"")

Applied to u-boot/master, thanks!

--
Tom

I could not find this patch applied to u-boot/master. I check out the latest u-boot

# git clone git://git.denx.de/u-boot.git u-boot-main

Best Regards
-Anand

#5 lore raw
Quoted 15 lines · Anand Moon

Hi Tom

Quoted 7 lines · Tom Rini
Quoted 4 lines · Ramon Fried

If CONFIG_NR_DRAM_BANKS is bigger than the default value (4) define MEMORY_BANKS_MAX as CONFIG_NR_DRAM_BANKS.

Fixes 2a1f4f1758b5 ("Revert "fdt_support: Use CONFIG_NR_DRAM_BANKS

if defined"")

Quoted 4 lines
Quoted 1 line

Applied to u-boot/master, thanks!

Quoted 8 lines
Quoted 2 lines

--
Tom

I could not find this patch applied to u-boot/master. I check out the latest u-boot

# git clone git://git.denx.de/u-boot.git u-boot-main

He merged to his tree. Not available in mainline yet.
https://github.com/trini/u-boot?files=1

Quoted 2 lines

Best Regards
-Anand

Signature · 1 line
Sent from my Android device with K-9 Mail. Please excuse my brevity.
#6 lore raw
Quoted 19 lines · Ramon Fried
Quoted 18 lines · Anand Moon

Hi Tom

Quoted 7 lines · Tom Rini
Quoted 4 lines · Ramon Fried

If CONFIG_NR_DRAM_BANKS is bigger than the default value (4) define MEMORY_BANKS_MAX as CONFIG_NR_DRAM_BANKS.

Fixes 2a1f4f1758b5 ("Revert "fdt_support: Use CONFIG_NR_DRAM_BANKS

if defined"")

Quoted 6 lines
Quoted 1 line

Applied to u-boot/master, thanks!

--
Tom

Quoted 7 lines
Quoted 5 lines

I could not find this patch applied to u-boot/master. I check out the latest u-boot

# git clone git://git.denx.de/u-boot.git u-boot-main

He merged to his tree. Not available in mainline yet.
https://github.com/trini/u-boot?files=1

The tree at git.denx.de can sometimes take a little bit to get fully synced. As of now it is up to date.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180818/7073e8d4/attachment.sig>
#7 lore raw

Hi Tom / Ramon,

Quoted 26 lines · Tom Rini
Quoted 24 lines · Ramon Fried
Quoted 23 lines · Anand Moon

Hi Tom

Quoted 7 lines · Tom Rini
Quoted 4 lines · Ramon Fried

If CONFIG_NR_DRAM_BANKS is bigger than the default value (4) define MEMORY_BANKS_MAX as CONFIG_NR_DRAM_BANKS.

Fixes 2a1f4f1758b5 ("Revert "fdt_support: Use CONFIG_NR_DRAM_BANKS

if defined"")

Quoted 6 lines
Quoted 1 line

Applied to u-boot/master, thanks!

--
Tom

I could not find this patch applied to u-boot/master. I check out the latest u-boot

# git clone git://git.denx.de/u-boot.git u-boot-main
Quoted 8 lines
Quoted 2 lines

He merged to his tree. Not available in mainline yet.
https://github.com/trini/u-boot?files=1

The tree at git.denx.de can sometimes take a little bit to get fully synced. As of now it is up to date.

--
Tom

Thanks fro your inputs.

-Anand