public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] fdt_support: Use CONFIG_NR_DRAM_BANKS if necessary
  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
  2018-08-16  6:31 ` Ramon Fried
  2018-08-17  2:04 ` [U-Boot] " Tom Rini
  2 siblings, 0 replies; 8+ messages in thread
From: Lukasz Majewski @ 2018-08-13 20:08 UTC (permalink / raw)
  To: u-boot

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>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] fdt_support: Use CONFIG_NR_DRAM_BANKS if necessary
@ 2018-08-13 21:35 Ramon Fried
  2018-08-13 20:08 ` Lukasz Majewski
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ramon Fried @ 2018-08-13 21:35 UTC (permalink / raw)
  To: u-boot

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"")
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;
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] fdt_support: Use CONFIG_NR_DRAM_BANKS if necessary
  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
@ 2018-08-16  6:31 ` Ramon Fried
  2018-08-17  2:04 ` [U-Boot] " Tom Rini
  2 siblings, 0 replies; 8+ messages in thread
From: Ramon Fried @ 2018-08-16  6:31 UTC (permalink / raw)
  To: u-boot

Tom, there are more boards that fail and need some resolution.
Can you merge this patch ?
Thanks,
Ramon.
On Mon, Aug 13, 2018 at 9:35 PM Ramon Fried <ramon.fried@gmail.com> wrote:
>
> 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"")
> 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;
> --
> 2.18.0
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] fdt_support: Use CONFIG_NR_DRAM_BANKS if necessary
  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
  2018-08-16  6:31 ` Ramon Fried
@ 2018-08-17  2:04 ` Tom Rini
  2018-08-18  6:07   ` Anand Moon
  2 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2018-08-17  2:04 UTC (permalink / raw)
  To: u-boot

On Tue, Aug 14, 2018 at 12:35:42AM +0300, Ramon Fried wrote:

> 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"")
> Signed-off-by: Ramon Fried <ramon.fried@gmail.com>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] fdt_support: Use CONFIG_NR_DRAM_BANKS if necessary
  2018-08-17  2:04 ` [U-Boot] " Tom Rini
@ 2018-08-18  6:07   ` Anand Moon
  2018-08-18  8:39     ` Ramon Fried
  0 siblings, 1 reply; 8+ messages in thread
From: Anand Moon @ 2018-08-18  6:07 UTC (permalink / raw)
  To: u-boot

Hi Tom

On Fri, 17 Aug 2018 at 07:36, Tom Rini <trini@konsulko.com> wrote:
>
> On Tue, Aug 14, 2018 at 12:35:42AM +0300, Ramon Fried wrote:
>
> > 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"")
> > Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
>
> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] fdt_support: Use CONFIG_NR_DRAM_BANKS if necessary
  2018-08-18  6:07   ` Anand Moon
@ 2018-08-18  8:39     ` Ramon Fried
  2018-08-18 12:28       ` Tom Rini
  0 siblings, 1 reply; 8+ messages in thread
From: Ramon Fried @ 2018-08-18  8:39 UTC (permalink / raw)
  To: u-boot

On August 18, 2018 9:07:50 AM GMT+03:00, Anand Moon <linux.amoon@gmail.com> wrote:
>Hi Tom
>
>On Fri, 17 Aug 2018 at 07:36, Tom Rini <trini@konsulko.com> wrote:
>>
>> On Tue, Aug 14, 2018 at 12:35:42AM +0300, Ramon Fried wrote:
>>
>> > 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"")
>> > Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
>>
>> 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
>
He merged to his tree. Not available in mainline yet. 
https://github.com/trini/u-boot?files=1

>Best Regards
>-Anand


-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] fdt_support: Use CONFIG_NR_DRAM_BANKS if necessary
  2018-08-18  8:39     ` Ramon Fried
@ 2018-08-18 12:28       ` Tom Rini
  2018-08-18 16:39         ` Anand Moon
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2018-08-18 12:28 UTC (permalink / raw)
  To: u-boot

On Sat, Aug 18, 2018 at 11:39:25AM +0300, Ramon Fried wrote:
> On August 18, 2018 9:07:50 AM GMT+03:00, Anand Moon <linux.amoon@gmail.com> wrote:
> >Hi Tom
> >
> >On Fri, 17 Aug 2018 at 07:36, Tom Rini <trini@konsulko.com> wrote:
> >>
> >> On Tue, Aug 14, 2018 at 12:35:42AM +0300, Ramon Fried wrote:
> >>
> >> > 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"")
> >> > Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
> >>
> >> 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
> >
> 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
-------------- 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>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] fdt_support: Use CONFIG_NR_DRAM_BANKS if necessary
  2018-08-18 12:28       ` Tom Rini
@ 2018-08-18 16:39         ` Anand Moon
  0 siblings, 0 replies; 8+ messages in thread
From: Anand Moon @ 2018-08-18 16:39 UTC (permalink / raw)
  To: u-boot

Hi Tom / Ramon,
On Sat, 18 Aug 2018 at 17:58, Tom Rini <trini@konsulko.com> wrote:
>
> On Sat, Aug 18, 2018 at 11:39:25AM +0300, Ramon Fried wrote:
> > On August 18, 2018 9:07:50 AM GMT+03:00, Anand Moon <linux.amoon@gmail.com> wrote:
> > >Hi Tom
> > >
> > >On Fri, 17 Aug 2018 at 07:36, Tom Rini <trini@konsulko.com> wrote:
> > >>
> > >> On Tue, Aug 14, 2018 at 12:35:42AM +0300, Ramon Fried wrote:
> > >>
> > >> > 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"")
> > >> > Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
> > >>
> > >> 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
> > >
> > 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-08-18 16:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox