[Skiboot] [PATCH 1/4] hdata/i2c: ignore i2c devs marked as unknown in the hdat
Claudio Carvalho
cclaudio at linux.vnet.ibm.com
Thu Aug 31 16:20:49 AEST 2017
Some I2C devices are marked as unknown in the hdat. We don't need to add
them to the device tree, so this just log them.
Signed-off-by: Claudio Carvalho <cclaudio at linux.vnet.ibm.com>
---
hdata/i2c.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hdata/i2c.c b/hdata/i2c.c
index cc127d5..bfb5b48 100644
--- a/hdata/i2c.c
+++ b/hdata/i2c.c
@@ -226,6 +226,17 @@ int parse_i2c_devs(const struct HDIF_common_hdr *hdr, int idata_index,
*/
i2c_addr = dev->i2c_addr >> 1;
+ /*
+ * Some i2c devs are marked as unknown in the hdat.
+ * Ignoring them.
+ */
+ if (dev->type == 0xFF) {
+ prlog(PR_INFO, "HDAT I2C: ignoring e%dp%d - unknown@%x "
+ "(port 0x%x)\n", dev->i2cm_engine,
+ dev->i2cm_port, i2c_addr, dev->i2c_port);
+ continue;
+ }
+
prlog(PR_TRACE, "HDAT I2C: found e%dp%d - %x\n",
dev->i2cm_engine, dev->i2cm_port, i2c_addr);
--
2.7.4
More information about the Skiboot
mailing list