summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2018-04-24 13:25:27 +1000
committerStewart Smith <stewart@linux.ibm.com>2018-04-24 00:11:50 -0500
commit4158b4a15bea85dd63049675369dc482eac936d1 (patch)
tree1e75df2cf1b6e1b6e2e185598525824d476d5bd4
parent0764893eecb799ec783bd667808fc6436a90ab81 (diff)
downloadtalos-skiboot-4158b4a15bea85dd63049675369dc482eac936d1.tar.gz
talos-skiboot-4158b4a15bea85dd63049675369dc482eac936d1.zip
p9dsu HACK: fix system-vpd eeprom
Signed-off-by: Jim Yuan <jim.yuan@supermicro.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r--platforms/astbmc/p9dsu.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/platforms/astbmc/p9dsu.c b/platforms/astbmc/p9dsu.c
index 834a8307..2a380f3a 100644
--- a/platforms/astbmc/p9dsu.c
+++ b/platforms/astbmc/p9dsu.c
@@ -24,6 +24,24 @@
#include "astbmc.h"
+/*
+ * 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 p9dsu_dt_fixups(void)
+{
+ struct dt_node *n = dt_find_by_path(dt_root,
+ "/xscom@603fc00000000/i2cm@a2000/i2c-bus@0/eeprom@50");
+
+ if (n) {
+ dt_check_del_prop(n, "compatible");
+ dt_add_property_string(n, "compatible", "atmel,24c256");
+
+ dt_check_del_prop(n, "label");
+ dt_add_property_string(n, "label", "system-vpd");
+ }
+}
+
static bool p9dsu_probe(void)
{
if (!dt_node_is_compatible(dt_root, "supermicro,p9dsu"))
@@ -35,6 +53,8 @@ static bool p9dsu_probe(void)
/* Setup UART for use by OPAL (Linux hvc) */
uart_set_console_policy(UART_CONSOLE_OPAL);
+ p9dsu_dt_fixups();
+
return true;
}
OpenPOWER on IntegriCloud