diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2018-04-24 13:24:59 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-04-24 00:11:50 -0500 |
commit | 12514d328159c2cc4215c50d569fb7706d736b09 (patch) | |
tree | 660930123d51909c9afd3ae5f6aa33e3230591fc /hdata | |
parent | b08d198b9ee469cce7aa57245d3136a674ce4784 (diff) | |
download | skiboot-12514d328159c2cc4215c50d569fb7706d736b09.zip skiboot-12514d328159c2cc4215c50d569fb7706d736b09.tar.gz skiboot-12514d328159c2cc4215c50d569fb7706d736b09.tar.bz2 |
hdata/i2c: Ignore CFAM I2C master
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@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r-- | hdata/i2c.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hdata/i2c.c b/hdata/i2c.c index 9acb084..6ea3450 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)); |