summaryrefslogtreecommitdiff
path: root/arch/riscv/include
diff options
context:
space:
mode:
authorHal Feng <hal.feng@starfivetech.com>2025-10-24 16:59:26 +0800
committerLeo Yu-Chi Liang <ycliang@andestech.com>2026-03-17 01:36:57 +0800
commit6015c98be50f2fc571c294d2f2b0768212fb7e99 (patch)
tree67242f034850be6270c26f3fe169e928e2a609d7 /arch/riscv/include
parent841856ed9675b26ec517fdd00b5cc0aef8db508e (diff)
eeprom: starfive: Simplify get_ddr_size_from_eeprom()
Directly return the DDR size instead of the field of 'DxxxExxx'. Move the function description to the header file. Return 0 instead of 0xFF if read_eeprom() fails. Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Fixes: aea1bd95b61e ("eeprom: starfive: Enable ID EEPROM configuration") Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
Diffstat (limited to 'arch/riscv/include')
-rw-r--r--arch/riscv/include/asm/arch-jh7110/eeprom.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/riscv/include/asm/arch-jh7110/eeprom.h b/arch/riscv/include/asm/arch-jh7110/eeprom.h
index 45ad2a5f7bc..1ae9f2b840a 100644
--- a/arch/riscv/include/asm/arch-jh7110/eeprom.h
+++ b/arch/riscv/include/asm/arch-jh7110/eeprom.h
@@ -10,7 +10,13 @@
#include <linux/types.h>
u8 get_pcb_revision_from_eeprom(void);
-u32 get_ddr_size_from_eeprom(void);
+
+/**
+ * get_ddr_size_from_eeprom() - read DDR size from EEPROM
+ *
+ * @return: size in GiB or 0 on error.
+ */
+u8 get_ddr_size_from_eeprom(void);
/**
* get_mmc_size_from_eeprom() - read eMMC size from EEPROM