summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorZong Li <zong.li@sifive.com>2021-06-30 18:23:48 +0300
committerLeo Yu-Chi Liang <ycliang@andestech.com>2021-07-06 15:24:25 +0300
commit05e254862f201ae93fdf1f2e4fc0de203d25d325 (patch)
tree737e407e044b851a3e8d5b751615959b16235d95 /arch
parent564d630e2653901f1f115a933a7390f884b9a24f (diff)
downloadu-boot-05e254862f201ae93fdf1f2e4fc0de203d25d325.tar.xz
board: sifive: Add an interface to get PCB revision
There are different DDR parameter settings for different board revisions. Add a new interface to get the PCB revision to determine which DT should be selected at runtime. Signed-off-by: Zong Li <zong.li@sifive.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/include/asm/arch-fu740/eeprom.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/arch-fu740/eeprom.h b/arch/riscv/include/asm/arch-fu740/eeprom.h
new file mode 100644
index 0000000000..0e1220e558
--- /dev/null
+++ b/arch/riscv/include/asm/arch-fu740/eeprom.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2021 SiFive, Inc.
+ *
+ * Zong Li <zong.li@sifve.com>
+ */
+
+#ifndef _ASM_RISCV_EEPROM_H
+#define _ASM_RISCV_EEPROM_H
+
+#define PCB_REVISION_REV3 0x3
+
+u8 get_pcb_revision_from_eeprom(void);
+
+#endif /* _ASM_RISCV_EEPROM_H */