* [PATCH] configs: rpi: set NR_DRAM_BANKS to four
@ 2020-05-29 14:42 matthias.bgg at kernel.org
2020-07-08 15:21 ` CONFIG_NR_DRAM_BANKS in configs/rpi_4* deleted Matthias Brugger
0 siblings, 1 reply; 3+ messages in thread
From: matthias.bgg at kernel.org @ 2020-05-29 14:42 UTC (permalink / raw)
To: u-boot
From: Matthias Brugger <mbrugger@suse.com>
With the new RPi4 which has 8 GB of RAM, we can have up to four DRAM
banks. Bump up the configuration files to detect all the memory in
U-Boot.
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
---
configs/rpi_4_32b_defconfig | 2 +-
configs/rpi_4_defconfig | 2 +-
configs/rpi_arm64_defconfig | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig
index b22316cbcb..f369bb93bd 100644
--- a/configs/rpi_4_32b_defconfig
+++ b/configs/rpi_4_32b_defconfig
@@ -4,7 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x00008000
CONFIG_TARGET_RPI_4_32B=y
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_ENV_SIZE=0x4000
-CONFIG_NR_DRAM_BANKS=2
+CONFIG_NR_DRAM_BANKS=4
CONFIG_DISTRO_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_ARCH_FIXUP_FDT_MEMORY=y
diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig
index 165e166bbd..9b90790f06 100644
--- a/configs/rpi_4_defconfig
+++ b/configs/rpi_4_defconfig
@@ -4,7 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x00080000
CONFIG_TARGET_RPI_4=y
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_ENV_SIZE=0x4000
-CONFIG_NR_DRAM_BANKS=2
+CONFIG_NR_DRAM_BANKS=4
CONFIG_DISTRO_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_ARCH_FIXUP_FDT_MEMORY=y
diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig
index 0cc4efad70..db375eeba7 100644
--- a/configs/rpi_arm64_defconfig
+++ b/configs/rpi_arm64_defconfig
@@ -4,7 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x00080000
CONFIG_TARGET_RPI_ARM64=y
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_ENV_SIZE=0x4000
-CONFIG_NR_DRAM_BANKS=2
+CONFIG_NR_DRAM_BANKS=4
CONFIG_DISTRO_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_USE_PREBOOT=y
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* CONFIG_NR_DRAM_BANKS in configs/rpi_4* deleted
2020-05-29 14:42 [PATCH] configs: rpi: set NR_DRAM_BANKS to four matthias.bgg at kernel.org
@ 2020-07-08 15:21 ` Matthias Brugger
2020-07-08 15:30 ` Tom Rini
0 siblings, 1 reply; 3+ messages in thread
From: Matthias Brugger @ 2020-07-08 15:21 UTC (permalink / raw)
To: u-boot
Hi Tom,
I just realized that
88bd5b1793 ("configs: Resync with savedefconfig")
Delete the CONFIG_NR_DRAM_BANKS entries as added in this patch, which leads to a
regression in RPi4 (only one GB of memory visible to the kernel if you use Grub
for booting).
Is it generally wrong to add CONFIG_NR_DRAM_BANKS to the config files? What is
the correct approach then?
Regards,
Matthias
On 29/05/2020 16:42, matthias.bgg at kernel.org wrote:
> From: Matthias Brugger <mbrugger@suse.com>
>
> With the new RPi4 which has 8 GB of RAM, we can have up to four DRAM
> banks. Bump up the configuration files to detect all the memory in
> U-Boot.
>
> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
> ---
> configs/rpi_4_32b_defconfig | 2 +-
> configs/rpi_4_defconfig | 2 +-
> configs/rpi_arm64_defconfig | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig
> index b22316cbcb..f369bb93bd 100644
> --- a/configs/rpi_4_32b_defconfig
> +++ b/configs/rpi_4_32b_defconfig
> @@ -4,7 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x00008000
> CONFIG_TARGET_RPI_4_32B=y
> CONFIG_SYS_MALLOC_F_LEN=0x2000
> CONFIG_ENV_SIZE=0x4000
> -CONFIG_NR_DRAM_BANKS=2
> +CONFIG_NR_DRAM_BANKS=4
> CONFIG_DISTRO_DEFAULTS=y
> CONFIG_OF_BOARD_SETUP=y
> CONFIG_ARCH_FIXUP_FDT_MEMORY=y
> diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig
> index 165e166bbd..9b90790f06 100644
> --- a/configs/rpi_4_defconfig
> +++ b/configs/rpi_4_defconfig
> @@ -4,7 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x00080000
> CONFIG_TARGET_RPI_4=y
> CONFIG_SYS_MALLOC_F_LEN=0x2000
> CONFIG_ENV_SIZE=0x4000
> -CONFIG_NR_DRAM_BANKS=2
> +CONFIG_NR_DRAM_BANKS=4
> CONFIG_DISTRO_DEFAULTS=y
> CONFIG_OF_BOARD_SETUP=y
> CONFIG_ARCH_FIXUP_FDT_MEMORY=y
> diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig
> index 0cc4efad70..db375eeba7 100644
> --- a/configs/rpi_arm64_defconfig
> +++ b/configs/rpi_arm64_defconfig
> @@ -4,7 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x00080000
> CONFIG_TARGET_RPI_ARM64=y
> CONFIG_SYS_MALLOC_F_LEN=0x2000
> CONFIG_ENV_SIZE=0x4000
> -CONFIG_NR_DRAM_BANKS=2
> +CONFIG_NR_DRAM_BANKS=4
> CONFIG_DISTRO_DEFAULTS=y
> CONFIG_OF_BOARD_SETUP=y
> CONFIG_USE_PREBOOT=y
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* CONFIG_NR_DRAM_BANKS in configs/rpi_4* deleted
2020-07-08 15:21 ` CONFIG_NR_DRAM_BANKS in configs/rpi_4* deleted Matthias Brugger
@ 2020-07-08 15:30 ` Tom Rini
0 siblings, 0 replies; 3+ messages in thread
From: Tom Rini @ 2020-07-08 15:30 UTC (permalink / raw)
To: u-boot
On Wed, Jul 08, 2020 at 05:21:59PM +0200, Matthias Brugger wrote:
> Hi Tom,
>
> I just realized that
> 88bd5b1793 ("configs: Resync with savedefconfig")
>
> Delete the CONFIG_NR_DRAM_BANKS entries as added in this patch, which leads
> to a regression in RPi4 (only one GB of memory visible to the kernel if you
> use Grub for booting).
>
> Is it generally wrong to add CONFIG_NR_DRAM_BANKS to the config files? What
> is the correct approach then?
So, if savedefconfig removes an entry from the file, it's not needed.
In this case we see:
config NR_DRAM_BANKS
int "Number of DRAM banks"
default 1 if ARCH_SUNXI || ARCH_OWL
default 4
help
This defines the number of DRAM banks.
In the top-level Kconfig file. Since you set it as 4 and 4 is the
default, that's what's used:
$ make O=/tmp/rpi_4 rpi_4_config -sj
$ grep NR_D /tmp/rpi_4/.config
CONFIG_NR_DRAM_BANKS=4
$ grep ARCH_FIX /tmp/rpi_4/.config
CONFIG_ARCH_FIXUP_FDT_MEMORY=y
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200708/e93eab07/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-08 15:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29 14:42 [PATCH] configs: rpi: set NR_DRAM_BANKS to four matthias.bgg at kernel.org
2020-07-08 15:21 ` CONFIG_NR_DRAM_BANKS in configs/rpi_4* deleted Matthias Brugger
2020-07-08 15:30 ` Tom Rini
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.