Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1552357 > unrolled thread

Re: [PATCH net-next 01/10] net: netcp: ethss: add support of subsystem register region regmap

Started byMurali Karicheri <m-karicheri2@ti.com>
First post2017-01-05 23:00 +0100
Last post2017-01-05 23:50 +0100
Articles 2 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH net-next 01/10] net: netcp: ethss: add support of  subsystem register region regmap Murali Karicheri <m-karicheri2@ti.com> - 2017-01-05 23:00 +0100
    Re: [PATCH net-next 01/10] net: netcp: ethss: add support of  subsystem register region regmap Murali Karicheri <m-karicheri2@ti.com> - 2017-01-05 23:50 +0100

#1552357 — Re: [PATCH net-next 01/10] net: netcp: ethss: add support of subsystem register region regmap

FromMurali Karicheri <m-karicheri2@ti.com>
Date2017-01-05 23:00 +0100
SubjectRe: [PATCH net-next 01/10] net: netcp: ethss: add support of subsystem register region regmap
Message-ID<sWoeJ-ic-5@gated-at.bofh.it>
Rob,

On 12/22/2016 04:24 PM, Rob Herring wrote:
> On Tue, Dec 20, 2016 at 05:09:44PM -0500, Murali Karicheri wrote:
>> From: WingMan Kwok <w-kwok2@ti.com>
>>
>> 10gbe phy driver needs to access the 10gbe subsystem control
>> register during phy initialization. To facilitate the shared
>> access of the subsystem register region between the 10gbe Ethernet
>> driver and the phy driver, this patch adds support of the
>> subsystem register region defined by a syscon node in the dts.
>>
>> Although there is no shared access to the gbe subsystem register
>> region, using syscon for that is for the sake of consistency.
>>
>> This change is backward compatible with previously released gbe
>> devicetree bindings.
>>
>> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
>> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
>> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
>> ---
>>  .../devicetree/bindings/net/keystone-netcp.txt     |  16 ++-
>>  drivers/net/ethernet/ti/netcp_ethss.c              | 140 +++++++++++++++++----
>>  2 files changed, 127 insertions(+), 29 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/net/keystone-netcp.txt b/Documentation/devicetree/bindings/net/keystone-netcp.txt
>> index 04ba1dc..0854a73 100644
>> --- a/Documentation/devicetree/bindings/net/keystone-netcp.txt
>> +++ b/Documentation/devicetree/bindings/net/keystone-netcp.txt
>> @@ -72,20 +72,24 @@ Required properties:
>>  		"ti,netcp-gbe-2" for 1GbE N NetCP 1.5 (N=2)
>>  		"ti,netcp-xgbe" for 10 GbE
>>  
>> +- syscon-subsys:	phandle to syscon node of the switch
>> +			subsystem registers.
>> +
>>  - reg:		register location and the size for the following register
>>  		regions in the specified order.
>>  		- switch subsystem registers
>> +		- sgmii module registers
> 
> This needs to go on the end of the list. Otherwise, it is not backwards 
> compatible.

Thanks for your review! I assumed backward compatibility means new kernel
should work with old DTB. The driver code is adjusted to work with both
DTBs. Isn't that enough?

Murali

> 
>>  		- sgmii port3/4 module registers (only for NetCP 1.4)
>>  		- switch module registers
>>  		- serdes registers (only for 10G)
>>  
>>  		NetCP 1.4 ethss, here is the order
>> -			index #0 - switch subsystem registers
>> +			index #0 - sgmii module registers
>>  			index #1 - sgmii port3/4 module registers
>>  			index #2 - switch module registers
>>  
>>  		NetCP 1.5 ethss 9 port, 5 port and 2 port
>> -			index #0 - switch subsystem registers
>> +			index #0 - sgmii module registers
>>  			index #1 - switch module registers
>>  			index #2 - serdes registers
>>  
>> @@ -145,6 +149,11 @@ Optional properties:
>>  
>>  Example binding:
>>  
>> +gbe_subsys: subsys@2090000 {
>> +	compatible = "syscon";
>> +	reg = <0x02090000 0x100>;
>> +};
>> +
>>  netcp: netcp@2000000 {
>>  	reg = <0x2620110 0x8>;
>>  	reg-names = "efuse";
>> @@ -163,7 +172,8 @@ netcp: netcp@2000000 {
>>  		ranges;
>>  		gbe@90000 {
>>  			label = "netcp-gbe";
>> -			reg = <0x90000 0x300>, <0x90400 0x400>, <0x90800 0x700>;
>> +			syscon-subsys = <&gbe_subsys>;
>> +			reg = <0x90100 0x200>, <0x90400 0x200>, <0x90800 0x700>;
>>  			/* enable-ale; */
>>  			tx-queue = <648>;
>>  			tx-channel = <8>;
> 


-- 
Murali Karicheri
Linux Kernel, Keystone

[toc] | [next] | [standalone]


#1552385

FromMurali Karicheri <m-karicheri2@ti.com>
Date2017-01-05 23:50 +0100
Message-ID<sWp18-PJ-9@gated-at.bofh.it>
In reply to#1552357
On 01/05/2017 03:42 PM, Murali Karicheri wrote:
> Rob,
> 
> On 12/22/2016 04:24 PM, Rob Herring wrote:
>> On Tue, Dec 20, 2016 at 05:09:44PM -0500, Murali Karicheri wrote:
>>> From: WingMan Kwok <w-kwok2@ti.com>
>>>
>>> 10gbe phy driver needs to access the 10gbe subsystem control
>>> register during phy initialization. To facilitate the shared
>>> access of the subsystem register region between the 10gbe Ethernet
>>> driver and the phy driver, this patch adds support of the
>>> subsystem register region defined by a syscon node in the dts.
>>>
>>> Although there is no shared access to the gbe subsystem register
>>> region, using syscon for that is for the sake of consistency.
>>>
>>> This change is backward compatible with previously released gbe
>>> devicetree bindings.
>>>
>>> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
>>> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
>>> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
>>> ---
>>>  .../devicetree/bindings/net/keystone-netcp.txt     |  16 ++-
>>>  drivers/net/ethernet/ti/netcp_ethss.c              | 140 +++++++++++++++++----
>>>  2 files changed, 127 insertions(+), 29 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/net/keystone-netcp.txt b/Documentation/devicetree/bindings/net/keystone-netcp.txt
>>> index 04ba1dc..0854a73 100644
>>> --- a/Documentation/devicetree/bindings/net/keystone-netcp.txt
>>> +++ b/Documentation/devicetree/bindings/net/keystone-netcp.txt
>>> @@ -72,20 +72,24 @@ Required properties:
>>>  		"ti,netcp-gbe-2" for 1GbE N NetCP 1.5 (N=2)
>>>  		"ti,netcp-xgbe" for 10 GbE
>>>  
>>> +- syscon-subsys:	phandle to syscon node of the switch
>>> +			subsystem registers.
>>> +
>>>  - reg:		register location and the size for the following register
>>>  		regions in the specified order.
>>>  		- switch subsystem registers
>>> +		- sgmii module registers
>>
>> This needs to go on the end of the list. Otherwise, it is not backwards 
>> compatible.
> 
> Thanks for your review! I assumed backward compatibility means new kernel
> should work with old DTB. The driver code is adjusted to work with both
> DTBs. Isn't that enough?
Rob,

I will pull out 1/10 and 2/10 from the series as it needs more work and
re-submit rest of the patches in my v1 spin. However please reply to my
above backward compatibility question.

Thanks and Regards,

Murali
> 
> Murali
> 
>>
>>>  		- sgmii port3/4 module registers (only for NetCP 1.4)
>>>  		- switch module registers
>>>  		- serdes registers (only for 10G)
>>>  
>>>  		NetCP 1.4 ethss, here is the order
>>> -			index #0 - switch subsystem registers
>>> +			index #0 - sgmii module registers
>>>  			index #1 - sgmii port3/4 module registers
>>>  			index #2 - switch module registers
>>>  
>>>  		NetCP 1.5 ethss 9 port, 5 port and 2 port
>>> -			index #0 - switch subsystem registers
>>> +			index #0 - sgmii module registers
>>>  			index #1 - switch module registers
>>>  			index #2 - serdes registers
>>>  
>>> @@ -145,6 +149,11 @@ Optional properties:
>>>  
>>>  Example binding:
>>>  
>>> +gbe_subsys: subsys@2090000 {
>>> +	compatible = "syscon";
>>> +	reg = <0x02090000 0x100>;
>>> +};
>>> +
>>>  netcp: netcp@2000000 {
>>>  	reg = <0x2620110 0x8>;
>>>  	reg-names = "efuse";
>>> @@ -163,7 +172,8 @@ netcp: netcp@2000000 {
>>>  		ranges;
>>>  		gbe@90000 {
>>>  			label = "netcp-gbe";
>>> -			reg = <0x90000 0x300>, <0x90400 0x400>, <0x90800 0x700>;
>>> +			syscon-subsys = <&gbe_subsys>;
>>> +			reg = <0x90100 0x200>, <0x90400 0x200>, <0x90800 0x700>;
>>>  			/* enable-ale; */
>>>  			tx-queue = <648>;
>>>  			tx-channel = <8>;
>>
> 
> 


-- 
Murali Karicheri
Linux Kernel, Keystone

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web