diff mbox

[1/2] net: davinci_mdio: reuse for keystone2 arch

Message ID 1404911451-9921-2-git-send-email-grygorii.strashko@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Grygorii Strashko July 9, 2014, 1:10 p.m. UTC
The similar MDIO HW blocks is used by keystone 2 SoCs as
in Davinci SoCs:
- one in Gigabit Ethernet (GbE) Switch Subsystem
  See http://www.ti.com/lit/ug/sprugv9d/sprugv9d.pdf
- one in 10 Gigabit Ethernet Subsystem
  See http://www.ti.com/lit/ug/spruhj5/spruhj5.pdf

Hence, reuse Davinci MDIO driver for Keystone 2 and
enable TI networking for Keystone 2 devices

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 .../devicetree/bindings/net/davinci-mdio.txt       |    8 ++++----
 drivers/net/ethernet/ti/Kconfig                    |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Santosh Shilimkar July 9, 2014, 2:20 p.m. UTC | #1
On Wednesday 09 July 2014 09:10 AM, Grygorii Strashko wrote:
> The similar MDIO HW blocks is used by keystone 2 SoCs as
> in Davinci SoCs:
> - one in Gigabit Ethernet (GbE) Switch Subsystem
>   See http://www.ti.com/lit/ug/sprugv9d/sprugv9d.pdf
> - one in 10 Gigabit Ethernet Subsystem
>   See http://www.ti.com/lit/ug/spruhj5/spruhj5.pdf
> 
> Hence, reuse Davinci MDIO driver for Keystone 2 and
> enable TI networking for Keystone 2 devices
> 
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> ---
Looks good to me.
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

>  .../devicetree/bindings/net/davinci-mdio.txt       |    8 ++++----
>  drivers/net/ethernet/ti/Kconfig                    |    4 ++--
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/davinci-mdio.txt b/Documentation/devicetree/bindings/net/davinci-mdio.txt
> index 72efaaf..d2e68e7 100644
> --- a/Documentation/devicetree/bindings/net/davinci-mdio.txt
> +++ b/Documentation/devicetree/bindings/net/davinci-mdio.txt
> @@ -1,8 +1,8 @@
> -TI SoC Davinci MDIO Controller Device Tree Bindings
> +TI SoC Davinci/Keystone2 MDIO Controller Device Tree Bindings
>  ---------------------------------------------------
>  
>  Required properties:
> -- compatible		: Should be "ti,davinci_mdio"
> +- compatible		: Should be "ti,davinci_mdio" or "ti,keystone-mdio"
>  - reg			: physical base address and size of the davinci mdio
>  			  registers map
>  - bus_freq		: Mdio Bus frequency
> @@ -19,7 +19,7 @@ file.
>  Examples:
>  
>  	mdio: davinci_mdio@4A101000 {
> -		compatible = "ti,cpsw";
> +		compatible = "ti,davinci_mdio";
>  		reg = <0x4A101000 0x1000>;
>  		bus_freq = <1000000>;
>  	};
> @@ -27,7 +27,7 @@ Examples:
>  (or)
>  
>  	mdio: davinci_mdio@4A101000 {
> -		compatible = "ti,cpsw";
> +		compatible = "ti,davinci_mdio";
>  		ti,hwmods = "davinci_mdio";
>  		bus_freq = <1000000>;
>  	};
> diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
> index 53150c2..1769700 100644
> --- a/drivers/net/ethernet/ti/Kconfig
> +++ b/drivers/net/ethernet/ti/Kconfig
> @@ -5,7 +5,7 @@
>  config NET_VENDOR_TI
>  	bool "Texas Instruments (TI) devices"
>  	default y
> -	depends on PCI || EISA || AR7 || (ARM && (ARCH_DAVINCI || ARCH_OMAP3 || SOC_AM33XX))
> +	depends on PCI || EISA || AR7 || (ARM && (ARCH_DAVINCI || ARCH_OMAP3 || SOC_AM33XX || ARCH_KEYSTONE))
>  	---help---
>  	  If you have a network (Ethernet) card belonging to this class, say Y
>  	  and read the Ethernet-HOWTO, available from
> @@ -32,7 +32,7 @@ config TI_DAVINCI_EMAC
>  
>  config TI_DAVINCI_MDIO
>  	tristate "TI DaVinci MDIO Support"
> -	depends on ARM && ( ARCH_DAVINCI || ARCH_OMAP3 || SOC_AM33XX )
> +	depends on ARM && ( ARCH_DAVINCI || ARCH_OMAP3 || SOC_AM33XX || ARCH_KEYSTONE )
>  	select PHYLIB
>  	---help---
>  	  This driver supports TI's DaVinci MDIO module.
>
David Miller July 9, 2014, 11:52 p.m. UTC | #2
From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Wed, 9 Jul 2014 16:10:50 +0300

>  Required properties:
> -- compatible		: Should be "ti,davinci_mdio"
> +- compatible		: Should be "ti,davinci_mdio" or "ti,keystone-mdio"

Why the inconsistency in naming schemes?  I don't see any reason
to be different wrt. "_" vs. "-" in the name string.
Grygorii Strashko July 10, 2014, 12:58 p.m. UTC | #3
Hi David,

On 07/10/2014 02:52 AM, David Miller wrote:
> From: Grygorii Strashko <grygorii.strashko@ti.com>
> Date: Wed, 9 Jul 2014 16:10:50 +0300
> 
>>   Required properties:
>> -- compatible		: Should be "ti,davinci_mdio"
>> +- compatible		: Should be "ti,davinci_mdio" or "ti,keystone-mdio"
> 
> Why the inconsistency in naming schemes?  I don't see any reason
> to be different wrt. "_" vs. "-" in the name string.
> 

Hm. Looks like the common way is to use "-", but I can rename it if you insist.

Regards,
-grygorii
David Miller July 10, 2014, 7:39 p.m. UTC | #4
From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Thu, 10 Jul 2014 15:58:31 +0300

> Hi David,
> 
> On 07/10/2014 02:52 AM, David Miller wrote:
>> From: Grygorii Strashko <grygorii.strashko@ti.com>
>> Date: Wed, 9 Jul 2014 16:10:50 +0300
>> 
>>>   Required properties:
>>> -- compatible		: Should be "ti,davinci_mdio"
>>> +- compatible		: Should be "ti,davinci_mdio" or "ti,keystone-mdio"
>> 
>> Why the inconsistency in naming schemes?  I don't see any reason
>> to be different wrt. "_" vs. "-" in the name string.
>> 
> 
> Hm. Looks like the common way is to use "-", but I can rename it if you insist.

I'm just saying, is there a strong reason to be inconsistent?
Mugunthan V N July 11, 2014, 5:03 a.m. UTC | #5
On Wednesday 09 July 2014 06:40 PM, Grygorii Strashko wrote:
> The similar MDIO HW blocks is used by keystone 2 SoCs as
> in Davinci SoCs:
> - one in Gigabit Ethernet (GbE) Switch Subsystem
>   See http://www.ti.com/lit/ug/sprugv9d/sprugv9d.pdf
> - one in 10 Gigabit Ethernet Subsystem
>   See http://www.ti.com/lit/ug/spruhj5/spruhj5.pdf
>
> Hence, reuse Davinci MDIO driver for Keystone 2 and
> enable TI networking for Keystone 2 devices
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

Acked-by: Mugunthan V N <mugunthanvnm@ti.com>

Regards
Mugunthan V N
Grygorii Strashko July 11, 2014, 10:24 a.m. UTC | #6
On 07/10/2014 10:39 PM, David Miller wrote:
> From: Grygorii Strashko <grygorii.strashko@ti.com>
> Date: Thu, 10 Jul 2014 15:58:31 +0300
>
>> Hi David,
>>
>> On 07/10/2014 02:52 AM, David Miller wrote:
>>> From: Grygorii Strashko <grygorii.strashko@ti.com>
>>> Date: Wed, 9 Jul 2014 16:10:50 +0300
>>>
>>>>    Required properties:
>>>> -- compatible		: Should be "ti,davinci_mdio"
>>>> +- compatible		: Should be "ti,davinci_mdio" or "ti,keystone-mdio"
>>>
>>> Why the inconsistency in naming schemes?  I don't see any reason
>>> to be different wrt. "_" vs. "-" in the name string.
>>>
>>
>> Hm. Looks like the common way is to use "-", but I can rename it if you insist.
>
> I'm just saying, is there a strong reason to be inconsistent?
>

I've followed the same format as for all latest compatibility strings in 
Kernel. Also I've checked ePAPR and dash is used for all examples there.

"ti,davinci_mdio" was added 2 years ago, so possibly no strict 
convention or review were done then. Now, I can't change 
"ti,davinci_mdio" -> "ti,davinci-mdio" to be consistent with Kernel due 
to compatibility issues.

May be DT Gurus can say more?


Regards,
-grygorii
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/net/davinci-mdio.txt b/Documentation/devicetree/bindings/net/davinci-mdio.txt
index 72efaaf..d2e68e7 100644
--- a/Documentation/devicetree/bindings/net/davinci-mdio.txt
+++ b/Documentation/devicetree/bindings/net/davinci-mdio.txt
@@ -1,8 +1,8 @@ 
-TI SoC Davinci MDIO Controller Device Tree Bindings
+TI SoC Davinci/Keystone2 MDIO Controller Device Tree Bindings
 ---------------------------------------------------
 
 Required properties:
-- compatible		: Should be "ti,davinci_mdio"
+- compatible		: Should be "ti,davinci_mdio" or "ti,keystone-mdio"
 - reg			: physical base address and size of the davinci mdio
 			  registers map
 - bus_freq		: Mdio Bus frequency
@@ -19,7 +19,7 @@  file.
 Examples:
 
 	mdio: davinci_mdio@4A101000 {
-		compatible = "ti,cpsw";
+		compatible = "ti,davinci_mdio";
 		reg = <0x4A101000 0x1000>;
 		bus_freq = <1000000>;
 	};
@@ -27,7 +27,7 @@  Examples:
 (or)
 
 	mdio: davinci_mdio@4A101000 {
-		compatible = "ti,cpsw";
+		compatible = "ti,davinci_mdio";
 		ti,hwmods = "davinci_mdio";
 		bus_freq = <1000000>;
 	};
diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
index 53150c2..1769700 100644
--- a/drivers/net/ethernet/ti/Kconfig
+++ b/drivers/net/ethernet/ti/Kconfig
@@ -5,7 +5,7 @@ 
 config NET_VENDOR_TI
 	bool "Texas Instruments (TI) devices"
 	default y
-	depends on PCI || EISA || AR7 || (ARM && (ARCH_DAVINCI || ARCH_OMAP3 || SOC_AM33XX))
+	depends on PCI || EISA || AR7 || (ARM && (ARCH_DAVINCI || ARCH_OMAP3 || SOC_AM33XX || ARCH_KEYSTONE))
 	---help---
 	  If you have a network (Ethernet) card belonging to this class, say Y
 	  and read the Ethernet-HOWTO, available from
@@ -32,7 +32,7 @@  config TI_DAVINCI_EMAC
 
 config TI_DAVINCI_MDIO
 	tristate "TI DaVinci MDIO Support"
-	depends on ARM && ( ARCH_DAVINCI || ARCH_OMAP3 || SOC_AM33XX )
+	depends on ARM && ( ARCH_DAVINCI || ARCH_OMAP3 || SOC_AM33XX || ARCH_KEYSTONE )
 	select PHYLIB
 	---help---
 	  This driver supports TI's DaVinci MDIO module.