aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2018-10-12 11:55:20 +0530
committerStewart Smith <stewart@linux.ibm.com>2018-10-16 18:26:24 +1100
commitc94b5a9e9c32724cba92e78073f6e3c334a0ad43 (patch)
tree08dbd898e06b08ad05d3f43d2cbde86a111ab58c /hdata
parentf88e3724846346efd66cc423ea7a96972592cd28 (diff)
downloadskiboot-c94b5a9e9c32724cba92e78073f6e3c334a0ad43.zip
skiboot-c94b5a9e9c32724cba92e78073f6e3c334a0ad43.tar.gz
skiboot-c94b5a9e9c32724cba92e78073f6e3c334a0ad43.tar.bz2
hdata/i2c: Skip unknown device type
Do not add unknown I2C devices to device tree. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/i2c.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/hdata/i2c.c b/hdata/i2c.c
index c129d5e..6b797bc 100644
--- a/hdata/i2c.c
+++ b/hdata/i2c.c
@@ -322,14 +322,16 @@ int parse_i2c_devs(const struct HDIF_common_hdr *hdr, int idata_index,
* outdated or the device is marked as unknown (0xFF) in the
* hdat. Log both cases to see what/where/why.
*/
- if (!type || dev->type == 0xFF)
+ if (!type || dev->type == 0xFF) {
prlog(PR_WARNING, "HDAT I2C: found e%dp%d - %s@%x dp:%02x (%#x:%s)\n",
dev->i2cm_engine, dev->i2cm_port, name, dev_addr,
dev->dev_port, purpose, info->label);
- else
- prlog(PR_DEBUG, "HDAT I2C: found e%dp%d - %s@%x dp:%02x (%#x:%s)\n",
- dev->i2cm_engine, dev->i2cm_port, name, dev_addr,
- dev->dev_port, purpose, info->label);
+ continue;
+ }
+
+ prlog(PR_DEBUG, "HDAT I2C: found e%dp%d - %s@%x dp:%02x (%#x:%s)\n",
+ dev->i2cm_engine, dev->i2cm_port, name, dev_addr,
+ dev->dev_port, purpose, info->label);
/*
* Multi-port device require special handling since we need to