Message ID | 20180424032502.17619-1-oohall@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/4] hdata/i2c: Ignore CFAM I2C master | expand |
On 24/04/18 13:24, Oliver O'Halloran wrote: > 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> Tested-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Oliver O'Halloran <oohall@gmail.com> writes: > 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> > --- > hdata/i2c.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) CHeers, series merged to master as of 0953e9014d27537709c14d7fbb9829823198fb17
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));
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> --- hdata/i2c.c | 10 ++++++++++ 1 file changed, 10 insertions(+)