[Skiboot] [PATCH 1/4] hdata/i2c: Ignore CFAM I2C master

Oliver O'Halloran oohall at gmail.com
Tue Apr 24 13:24:59 AEST 2018


Recent FSP firmware builds put in information about the CFAM I2C master
in addition the to host I2C masters accessible via XSCOM. Odds are this
information should not be there since there's no handshaking between the
FSP/BMC and the host over who controls that I2C master, but it is so
we need to deal with it.

This patch adds filtering to the HDAT parser so it ignores the CFAM I2C
master. Without this it will create a bogus i2cm@<addr> which migh cause
issues.

Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 hdata/i2c.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/hdata/i2c.c b/hdata/i2c.c
index 9acb08419bb3..6ea34507345c 100644
--- a/hdata/i2c.c
+++ b/hdata/i2c.c
@@ -261,6 +261,16 @@ int parse_i2c_devs(const struct HDIF_common_hdr *hdr, int idata_index,
 			continue;
 		}
 
+		/*
+		 * On some systems the CFAM I2C master is represented in the
+		 * host I2C table as engine 6. There are only 4 (0, 1, 2, 3)
+		 * engines accessible to the host via XSCOM so filter out
+		 * engines outside this range so we don't create bogus
+		 * i2cm@<addr> nodes.
+		 */
+		if (dev->i2cm_engine >= 4 && proc_gen == proc_gen_p9)
+			continue;
+
 		i2cm = get_i2cm_node(xscom, dev->i2cm_engine);
 		bus = get_bus_node(i2cm, dev->i2cm_port,
 			be16_to_cpu(dev->i2c_bus_freq));
-- 
2.9.5



More information about the Skiboot mailing list