From d62b5d5f4316be8e0e9c8eff84a9c64fedca963f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Fri, 28 Jul 2017 12:50:19 +0200 Subject: [PATCH] Ka-Ro: tk71: use get_ram_size() to determine the actual SDRAM size automagically --- board/karo/tk71/tk71.c | 7 +++++++ include/configs/tk71.h | 1 + 2 files changed, 8 insertions(+) diff --git a/board/karo/tk71/tk71.c b/board/karo/tk71/tk71.c index 96410d77d6..323b1e6fc3 100644 --- a/board/karo/tk71/tk71.c +++ b/board/karo/tk71/tk71.c @@ -105,6 +105,13 @@ int board_early_init_f(void) return 0; } +int dram_init(void) +{ + gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE, + PHYS_SDRAM_1_SIZE); + return 0; +} + int board_init(void) { /* diff --git a/include/configs/tk71.h b/include/configs/tk71.h index d3965154a9..88f49e7ddc 100644 --- a/include/configs/tk71.h +++ b/include/configs/tk71.h @@ -127,6 +127,7 @@ #define MTDIDS_DEFAULT "nand0=orion_nand" #define MTDPARTS_DEFAULT "mtdparts=orion_nand:"CONFIG_MTDPARTS +#define CONFIG_SYS_BOARD_DRAM_INIT #define PHYS_SDRAM_1 0x00000000 /* Base address */ #define PHYS_SDRAM_1_SIZE 0x20000000 /* Max 512 MB RAM */ -- 2.39.2