[Skiboot] [PATCH v2 2/5] hdata/i2c: ignore i2c devs marked as unknown in the hdat

Oliver oohall at gmail.com
Fri Sep 1 14:03:09 AEST 2017


On Thu, Aug 31, 2017 at 5:12 PM, Claudio Carvalho
<cclaudio at linux.vnet.ibm.com> wrote:
> 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;
> +               }
> +

I kept these in the device-tree since I figured that we would want to
know about them even if we don't know what they are. I don't have any
strong opinions about it though so just logging it is fine with me.

>                 prlog(PR_TRACE, "HDAT I2C: found e%dp%d - %x\n",
>                         dev->i2cm_engine, dev->i2cm_port, i2c_addr);
>
> --
> 2.7.4
>

Reviewed-by: Oliver O'Halloran <oohall at gmail.com>


More information about the Skiboot mailing list