diff mbox series

[3/5,v2] mips: octeon: Report full DDR size in dram_init() to gd->ram_size

Message ID 20201028141003.3062021-3-sr@denx.de
State Accepted
Commit 8bab2c893c33b0245c51a71e91effe3547a73524
Delegated to: Daniel Schwierzeck
Headers show
Series [1/5,v2] mips: start.S: Add Octeon boot header compatibility | expand

Commit Message

Stefan Roese Oct. 28, 2020, 2:10 p.m. UTC
With this patch, gd->ram_size now holds to full RAM size detected by the
DDR init code. It introduces the get_effective_memsize() function to
report the maximum usable RAM size in U-Boot to the system instead.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---
v2:
- No change

 arch/mips/mach-octeon/dram.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Daniel Schwierzeck Nov. 27, 2020, 2:54 p.m. UTC | #1
Am Mittwoch, den 28.10.2020, 15:10 +0100 schrieb Stefan Roese:
> With this patch, gd->ram_size now holds to full RAM size detected by the
> DDR init code. It introduces the get_effective_memsize() function to
> report the maximum usable RAM size in U-Boot to the system instead.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Aaron Williams <awilliams@marvell.com>
> Cc: Chandrakala Chavva <cchavva@marvell.com>
> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> ---
> v2:
> - No change
> 
>  arch/mips/mach-octeon/dram.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> 

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
diff mbox series

Patch

diff --git a/arch/mips/mach-octeon/dram.c b/arch/mips/mach-octeon/dram.c
index 6dc08e19da..4679260f17 100644
--- a/arch/mips/mach-octeon/dram.c
+++ b/arch/mips/mach-octeon/dram.c
@@ -33,7 +33,7 @@  int dram_init(void)
 			return ret;
 		}
 
-		gd->ram_size = min_t(size_t, ram.size, UBOOT_RAM_SIZE_MAX);
+		gd->ram_size = ram.size;
 		debug("SDRAM base=%lx, size=%lx\n",
 		      (unsigned long)ram.base, (unsigned long)ram.size);
 	} else {
@@ -72,6 +72,11 @@  void board_add_ram_info(int use_default)
 	}
 }
 
+phys_size_t get_effective_memsize(void)
+{
+	return UBOOT_RAM_SIZE_MAX;
+}
+
 ulong board_get_usable_ram_top(ulong total_size)
 {
 	if (IS_ENABLED(CONFIG_RAM_OCTEON)) {