* [U-Boot] [PATCH] ARM: socfpga: Pull DRAM size from DT
@ 2018-05-29 16:37 Marek Vasut
2018-05-31 9:53 ` See, Chin Liang
0 siblings, 1 reply; 2+ messages in thread
From: Marek Vasut @ 2018-05-29 16:37 UTC (permalink / raw)
To: u-boot
Pull the DRAM size from DT instead of hardcoding it into U-Boot.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
---
arch/arm/mach-socfpga/misc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
index fca86507f1..bc6097cb1f 100644
--- a/arch/arm/mach-socfpga/misc.c
+++ b/arch/arm/mach-socfpga/misc.c
@@ -40,7 +40,9 @@ struct bsel bsel_str[] = {
int dram_init(void)
{
- gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
+ if (fdtdec_setup_memory_size() != 0)
+ return -EINVAL;
+
return 0;
}
--
2.17.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] ARM: socfpga: Pull DRAM size from DT
2018-05-29 16:37 [U-Boot] [PATCH] ARM: socfpga: Pull DRAM size from DT Marek Vasut
@ 2018-05-31 9:53 ` See, Chin Liang
0 siblings, 0 replies; 2+ messages in thread
From: See, Chin Liang @ 2018-05-31 9:53 UTC (permalink / raw)
To: u-boot
On Tue, 2018-05-29 at 18:37 +0200, Marek Vasut wrote:
> Pull the DRAM size from DT instead of hardcoding it into U-Boot.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Chin Liang See <chin.liang.see@intel.com>
> Cc: Dinh Nguyen <dinguyen@kernel.org>
> ---
> arch/arm/mach-socfpga/misc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-
> socfpga/misc.c
> index fca86507f1..bc6097cb1f 100644
> --- a/arch/arm/mach-socfpga/misc.c
> +++ b/arch/arm/mach-socfpga/misc.c
> @@ -40,7 +40,9 @@ struct bsel bsel_str[] = {
>
> int dram_init(void)
> {
> - gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1,
> PHYS_SDRAM_1_SIZE);
> + if (fdtdec_setup_memory_size() != 0)
> + return -EINVAL;
> +
> return 0;
> }
>
Reviewed-by: Chin Liang See <chin.liang.see@intel.com>
Thanks
Chin Liang
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-31 9:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-29 16:37 [U-Boot] [PATCH] ARM: socfpga: Pull DRAM size from DT Marek Vasut
2018-05-31 9:53 ` See, Chin Liang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox