summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorHal Feng <[email protected]>2025-10-24 16:59:27 +0800
committerLeo Yu-Chi Liang <[email protected]>2026-03-17 01:36:57 +0800
commit78253aeeecdfea4c71779905ff2b400fa7400b1c (patch)
tree60c02a55e2ccf0f4b97f0381a315cbe18e1bfe81 /board
parent6015c98be50f2fc571c294d2f2b0768212fb7e99 (diff)
eeprom: starfive: Correct get_pcb_revision_from_eeprom()
pcb_revision is stored in the pcb_revision field of ATOM4. Correct it. Move the function description to the header file. Return 0 instead of 0xFF if read_eeprom() fails. Reviewed-by: Heinrich Schuchardt <[email protected]> Fixes: aea1bd95b61e ("eeprom: starfive: Enable ID EEPROM configuration") Signed-off-by: Hal Feng <[email protected]>
Diffstat (limited to 'board')
-rw-r--r--board/starfive/visionfive2/visionfive2-i2c-eeprom.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c
index ca5039ee433..986dcc94992 100644
--- a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c
+++ b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c
@@ -535,19 +535,12 @@ int mac_read_from_eeprom(void)
return 0;
}
-/**
- * get_pcb_revision_from_eeprom - get the PCB revision
- *
- * 1.2A return 'A'/'a', 1.3B return 'B'/'b',other values are illegal
- */
u8 get_pcb_revision_from_eeprom(void)
{
- u8 pv = 0xFF;
-
if (read_eeprom())
- return pv;
+ return 0;
- return pbuf.eeprom.atom1.data.pstr[6];
+ return pbuf.eeprom.atom4.data.pcb_revision;
}
u8 get_ddr_size_from_eeprom(void)