[Skiboot] [PATCH] i2c: Do not read the 'ibm, port-name' property
Benjamin Herrenschmidt
benh at au1.ibm.com
Mon Feb 2 10:59:46 AEDT 2015
On Fri, 2015-01-30 at 14:39 +0530, Neelesh Gupta wrote:
> The skiboot does not rely on the i2c bus property 'ibm,port-name'
> and is useful for the Linux. Currently, the i2c driver reads this
> property for logging purpose, but leads to skiboot crash if the
> property is not present, so just don't read it.
I would read it if it exists and print a default "unnamed" if not...
We need to add code that will pickup the i2cm's from HB and give
them names, possibly in the driver itself.
Ben.
> Signed-off-by: Neelesh Gupta <neelegup at linux.vnet.ibm.com>
> ---
> hw/p8-i2c.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hw/p8-i2c.c b/hw/p8-i2c.c
> index 3e5334c..1717182 100644
> --- a/hw/p8-i2c.c
> +++ b/hw/p8-i2c.c
> @@ -1201,10 +1201,10 @@ void p8_i2c_init(void)
> port->bus.alloc_req = p8_i2c_alloc_request;
> port->bus.free_req = p8_i2c_free_request;
> i2c_add_bus(&port->bus);
> - prlog(PR_INFO, " P%d: <%s> %d kHz\n",
> - port->port_num,
> - (char *)dt_prop_get(i2cm_port, "ibm,port-name"),
> - speed/1000);
> + prlog(PR_INFO, "I2C: chip(0x%02x)-engine(%d)-port(%d) "
> + "@ %d kHz\n", master->chip_id,
> + master->engine_id,
> + port->port_num, speed/1000);
> port++;
> }
>
>
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot
More information about the Skiboot
mailing list