[Skiboot] [PATCH 3/4] hdata/i2c: ignore the secure window and physical presence i2c devs

Claudio Carvalho cclaudio at linux.vnet.ibm.com
Thu Aug 31 16:20:51 AEST 2017


This ignores the secure window and physical presence i2c devices since
they are failing the HDAT parsing and they won't be used for now.

In P9, the secure window and physical presence are gpio pins in an i2c
gpio expander. In the HDAT the secure window and physical presence are
duplicates of the associated i2c gpio expander device, however
distinguished by the gpio port. That causes a failure when dt_new_addr()
is called because skiboot is not able to distinguish nodes by port.

Signed-off-by: Claudio Carvalho <cclaudio at linux.vnet.ibm.com>
---
 hdata/i2c.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/hdata/i2c.c b/hdata/i2c.c
index 14650b6..8a2e392 100644
--- a/hdata/i2c.c
+++ b/hdata/i2c.c
@@ -259,6 +259,20 @@ int parse_i2c_devs(const struct HDIF_common_hdr *hdr, int idata_index,
 			compat = NULL;
 		}
 
+		/*
+		 * TODO: Create devtree entries for the secure window and
+		 * physical presence. In the hdat they are i2c gpio-expander
+		 * devices distinguished only by the port property.
+		 */
+		if (be32_to_cpu(dev->purpose) == 0xd ||
+		    be32_to_cpu(dev->purpose) == 0xe) {
+			prlog(PR_INFO, "HDAT I2C: ignoring e%dp%d - %s@%x "
+			      "(port 0x%x) - %s\n", dev->i2cm_engine,
+			      dev->i2cm_port, name, i2c_addr, dev->i2c_port,
+			      label);
+			continue;
+		}
+
 		node = dt_new_addr(bus, name, i2c_addr);
 		if (!node)
 			continue;
-- 
2.7.4



More information about the Skiboot mailing list