summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Leto <[email protected]>2024-11-23 17:53:01 +0100
committerFabio Estevam <[email protected]>2024-11-25 23:07:37 -0300
commiteceaa88ade0c45891d758444bab4e4aee1755932 (patch)
treec3b1c6f0c1f686bece591863899440233c7d3251
parent0cc0f68b7e6ce3865ba2708ffefc44c5117bf676 (diff)
siemens: capricorn: get module name from eeprom
The eeprom contains the information on which module we are running, so read it from the eeprom and print it on the console. Signed-off-by: Enrico Leto <[email protected]> Signed-off-by: Heiko Schocher <[email protected]>
-rw-r--r--board/siemens/capricorn/board.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/board/siemens/capricorn/board.c b/board/siemens/capricorn/board.c
index 484e2707183..390a7b0d841 100644
--- a/board/siemens/capricorn/board.c
+++ b/board/siemens/capricorn/board.c
@@ -314,6 +314,7 @@ int checkboard(void)
int board_init(void)
{
struct chip_data eeprom_data = {};
+ char module_name[16];
int ret;
ret = siemens_ee_setup();
@@ -322,6 +323,11 @@ int board_init(void)
goto skip;
}
+ /* Get module name from EEPROM */
+ siemens_ee_read_data(SIEMENS_EE_ADDR_DDR3, module_name,
+ sizeof(module_name));
+ printf("CPU module: %s\n", module_name);
+
ret = siemens_ee_read_data(SIEMENS_EE_ADDR_CHIP,
(uchar *)&eeprom_data,
sizeof(eeprom_data));