[Skiboot] [PATCH] i2c: Do not read the 'ibm, port-name' property

Neelesh Gupta neelegup at linux.vnet.ibm.com
Tue Feb 3 04:40:51 AEDT 2015


On 02/02/2015 05:29 AM, Benjamin Herrenschmidt wrote:
> 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.

Hi Ben,

I am adding these bits in the driver, will provide the changes today for 
review.
One Q. Are we still going to have DT fixups in the PLAT code? Also, we 
decided
that 'ibm,port-name' is going to be added by skiboot and *not* from HB? But,
I still see this property present in the reference DT output, sent by Dan in
the previous mail.

- Neelesh

>
> 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