[Skiboot] [PATCH] Modify: modify mihawk for VPD EEPROM fix
joy_chu at wistron.com
joy_chu at wistron.com
Tue Nov 19 13:17:31 AEDT 2019
From: Joy Chu <joy_chu at wistron.com>
Add VPD EEPROM type fix for planar VPD update.
Signed-off-by: Joy Chu <joy_chu at wistron.com>
---
platforms/astbmc/mihawk.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/platforms/astbmc/mihawk.c b/platforms/astbmc/mihawk.c
index feae205f..82f5f290 100644
--- a/platforms/astbmc/mihawk.c
+++ b/platforms/astbmc/mihawk.c
@@ -229,6 +229,24 @@ static void mihawk_create_ocapi_i2c_bus(void)
}
}
+/*
+ * HACK: Hostboot doesn't export the correct data for the system VPD EEPROM
+ * for this system. So we need to work around it here.
+ */
+static void vpd_dt_fixup(void)
+{
+ struct dt_node *n = dt_find_by_path(dt_root,
+ "/xscom at 603fc00000000/i2cm at a2000/i2c-bus at 0/eeprom at 50");
+
+ if (n) {
+ dt_check_del_prop(n, "compatible");
+ dt_add_property_string(n, "compatible", "atmel,24c512");
+
+ dt_check_del_prop(n, "label");
+ dt_add_property_string(n, "label", "system-vpd");
+ }
+}
+
static bool mihawk_probe(void)
{
if (!dt_node_is_compatible(dt_root, "ibm,mihawk"))
@@ -240,6 +258,8 @@ static bool mihawk_probe(void)
/* Setup UART for use by OPAL (Linux hvc) */
uart_set_console_policy(UART_CONSOLE_OPAL);
+ vpd_dt_fixup();
+
mihawk_create_npu();
mihawk_create_ocapi_i2c_bus();
--
2.17.1
More information about the Skiboot
mailing list