summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamin Guo <samin.guo@starfivetech.com>2023-07-07 10:22:36 +0300
committerSamin Guo <samin.guo@starfivetech.com>2023-07-10 06:43:53 +0300
commit543e4e6722dfa42421b9781d3ba2f2f982b3308a (patch)
treee2b53cc88aa7ac2c4f9644edd9bae07b7b3ec43c
parentbeb4642cd8e055e7056d82ecb80263f2da8498fd (diff)
downloadu-boot-543e4e6722dfa42421b9781d3ba2f2f982b3308a.tar.xz
dram: jh7110: Macro definitions STARFIVE_JH7110_EEPROM_DDRINFO_OFFSET
In order to read DDR info from eeprom. Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
-rw-r--r--arch/riscv/cpu/jh7110/dram.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/riscv/cpu/jh7110/dram.c b/arch/riscv/cpu/jh7110/dram.c
index ad8baeba93..ddcb3da64e 100644
--- a/arch/riscv/cpu/jh7110/dram.c
+++ b/arch/riscv/cpu/jh7110/dram.c
@@ -10,6 +10,7 @@
#include <linux/sizes.h>
DECLARE_GLOBAL_DATA_PTR;
+#define STARFIVE_JH7110_EEPROM_DDRINFO_OFFSET 91
static bool check_eeprom_dram_info(phys_size_t size)
{
@@ -34,7 +35,7 @@ int dram_init(void)
data = 0;
len = 1;
- offset = 91; /*offset of memory size stored in eeprom*/
+ offset = STARFIVE_JH7110_EEPROM_DDRINFO_OFFSET; /*offset of memory size stored in eeprom*/
ret = fdtdec_setup_mem_size_base();
if (ret)
goto err;