All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Add CPTS support for AM437x
@ 2014-05-02  6:31 ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:31 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: davem, richardcochran, jeffrey.t.kirsher, dborkman, ast,
	tklauser, mpa, bhutchings, zonque, balbi, mugunthanvnm,
	george.cherian, t-kristo, mturquette, linux, galak,
	ijc+devicetree, mark.rutland, pawel.moll, robh+dt, tony,
	bcousson

The series adds CPTS support for AM4372.

Patch 1 - DT changes w.r.t clock changes for AM33xx.
Patch 2 - CPTS clock name harcoding in the driver is removed. 
	  Easier to pass the clock name from dt rather than hardcoding in driver.
	  Also in prepration for DRA7x CPTS support.
Patch 3 - Enable the CPTS support for both DRA7x and AM4372 in the driver.
Patch 4 - Enable the Annexe F for L2 PTP for AM437x and DRA7x.
Patch 5 - Change the default clocksource to dpll_core_m5 
Patch 6 - DT changes for AM4372.


v1 -> v2
	Patch 1 and 2 Re-ordering.
	Seperate TS_BITS define for Hw version V2 and V3

George Cherian (6):
  ARM: dts: am33xx: Add clock names for cpsw and cpts
  drivers: net: cpts: Remove hardcoded clock name for CPTS
  drivers: net: cpsw: Enable CPTS for DRA7xx and AM4372
  drivers: net: cpsw: Enable Annexe F Time sync
  ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk
  ARM: dts: am4372: Add clock names for cpsw and cpts

 arch/arm/boot/dts/am33xx.dtsi  |  2 ++
 arch/arm/boot/dts/am4372.dtsi  |  2 ++
 drivers/clk/ti/clk-43xx.c      | 16 ++++++++++++
 drivers/net/ethernet/ti/cpsw.c | 56 +++++++++++++++++++++++++++++++-----------
 drivers/net/ethernet/ti/cpts.c | 11 +++------
 5 files changed, 66 insertions(+), 21 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH v2 0/6] Add CPTS support for AM437x
@ 2014-05-02  6:31 ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:31 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA
  Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	richardcochran-Re5JQEeQqe8AvxtiuMwx3w,
	jeffrey.t.kirsher-ral2JQCrhuEAvxtiuMwx3w,
	dborkman-H+wXaHxf7aLQT0dZR+AlfA, ast-uqk4Ao+rVK5Wk0Htik3J/w,
	tklauser-93Khv+1bN0NyDzI6CaY1VQ, mpa-bIcnvbaLZ9MEGnE8C9+IrQ,
	bhutchings-s/n/eUQHGBpZroRs9YW3xA, zonque-Re5JQEeQqe8AvxtiuMwx3w,
	balbi-l0cyMroinI0, mugunthanvnm-l0cyMroinI0,
	george.cherian-l0cyMroinI0, t-kristo-l0cyMroinI0,
	mturquette-QSEj5FYQhm4dnm+yROfE0A, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	galak-sgV2jX0FEOL9JmXXK+q4OQ,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, mark.rutland-5wv7dgnIgG8,
	pawel.moll-5wv7dgnIgG8, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	tony-4v6yS6AI5VpBDgjK7y7TUQ, bcousson-rdvid1DuHRBWk0Htik3J/w

The series adds CPTS support for AM4372.

Patch 1 - DT changes w.r.t clock changes for AM33xx.
Patch 2 - CPTS clock name harcoding in the driver is removed. 
	  Easier to pass the clock name from dt rather than hardcoding in driver.
	  Also in prepration for DRA7x CPTS support.
Patch 3 - Enable the CPTS support for both DRA7x and AM4372 in the driver.
Patch 4 - Enable the Annexe F for L2 PTP for AM437x and DRA7x.
Patch 5 - Change the default clocksource to dpll_core_m5 
Patch 6 - DT changes for AM4372.


v1 -> v2
	Patch 1 and 2 Re-ordering.
	Seperate TS_BITS define for Hw version V2 and V3

George Cherian (6):
  ARM: dts: am33xx: Add clock names for cpsw and cpts
  drivers: net: cpts: Remove hardcoded clock name for CPTS
  drivers: net: cpsw: Enable CPTS for DRA7xx and AM4372
  drivers: net: cpsw: Enable Annexe F Time sync
  ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk
  ARM: dts: am4372: Add clock names for cpsw and cpts

 arch/arm/boot/dts/am33xx.dtsi  |  2 ++
 arch/arm/boot/dts/am4372.dtsi  |  2 ++
 drivers/clk/ti/clk-43xx.c      | 16 ++++++++++++
 drivers/net/ethernet/ti/cpsw.c | 56 +++++++++++++++++++++++++++++++-----------
 drivers/net/ethernet/ti/cpts.c | 11 +++------
 5 files changed, 66 insertions(+), 21 deletions(-)

-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH v2 0/6] Add CPTS support for AM437x
@ 2014-05-02  6:31 ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:31 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA
  Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	richardcochran-Re5JQEeQqe8AvxtiuMwx3w,
	jeffrey.t.kirsher-ral2JQCrhuEAvxtiuMwx3w,
	dborkman-H+wXaHxf7aLQT0dZR+AlfA, ast-uqk4Ao+rVK5Wk0Htik3J/w,
	tklauser-93Khv+1bN0NyDzI6CaY1VQ, mpa-bIcnvbaLZ9MEGnE8C9+IrQ,
	bhutchings-s/n/eUQHGBpZroRs9YW3xA, zonque-Re5JQEeQqe8AvxtiuMwx3w,
	balbi-l0cyMroinI0, mugunthanvnm-l0cyMroinI0,
	george.cherian-l0cyMroinI0, t-kristo-l0cyMroinI0,
	mturquette-QSEj5FYQhm4dnm+yROfE0A, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	galak-sgV2jX0FEOL9JmXXK+q4OQ,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, mark.rutland-5wv7dgnIgG8,
	pawel.moll-5wv7dgnIgG8, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	tony-4v6yS6AI5VpBDgjK7y7TUQ, bcousson-rdvid1DuHRBWk0Htik3J/w

The series adds CPTS support for AM4372.

Patch 1 - DT changes w.r.t clock changes for AM33xx.
Patch 2 - CPTS clock name harcoding in the driver is removed. 
	  Easier to pass the clock name from dt rather than hardcoding in driver.
	  Also in prepration for DRA7x CPTS support.
Patch 3 - Enable the CPTS support for both DRA7x and AM4372 in the driver.
Patch 4 - Enable the Annexe F for L2 PTP for AM437x and DRA7x.
Patch 5 - Change the default clocksource to dpll_core_m5 
Patch 6 - DT changes for AM4372.


v1 -> v2
	Patch 1 and 2 Re-ordering.
	Seperate TS_BITS define for Hw version V2 and V3

George Cherian (6):
  ARM: dts: am33xx: Add clock names for cpsw and cpts
  drivers: net: cpts: Remove hardcoded clock name for CPTS
  drivers: net: cpsw: Enable CPTS for DRA7xx and AM4372
  drivers: net: cpsw: Enable Annexe F Time sync
  ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk
  ARM: dts: am4372: Add clock names for cpsw and cpts

 arch/arm/boot/dts/am33xx.dtsi  |  2 ++
 arch/arm/boot/dts/am4372.dtsi  |  2 ++
 drivers/clk/ti/clk-43xx.c      | 16 ++++++++++++
 drivers/net/ethernet/ti/cpsw.c | 56 +++++++++++++++++++++++++++++++-----------
 drivers/net/ethernet/ti/cpts.c | 11 +++------
 5 files changed, 66 insertions(+), 21 deletions(-)

-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH v2 0/6] Add CPTS support for AM437x
@ 2014-05-02  6:31 ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:31 UTC (permalink / raw)
  To: linux-arm-kernel

The series adds CPTS support for AM4372.

Patch 1 - DT changes w.r.t clock changes for AM33xx.
Patch 2 - CPTS clock name harcoding in the driver is removed. 
	  Easier to pass the clock name from dt rather than hardcoding in driver.
	  Also in prepration for DRA7x CPTS support.
Patch 3 - Enable the CPTS support for both DRA7x and AM4372 in the driver.
Patch 4 - Enable the Annexe F for L2 PTP for AM437x and DRA7x.
Patch 5 - Change the default clocksource to dpll_core_m5 
Patch 6 - DT changes for AM4372.


v1 -> v2
	Patch 1 and 2 Re-ordering.
	Seperate TS_BITS define for Hw version V2 and V3

George Cherian (6):
  ARM: dts: am33xx: Add clock names for cpsw and cpts
  drivers: net: cpts: Remove hardcoded clock name for CPTS
  drivers: net: cpsw: Enable CPTS for DRA7xx and AM4372
  drivers: net: cpsw: Enable Annexe F Time sync
  ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk
  ARM: dts: am4372: Add clock names for cpsw and cpts

 arch/arm/boot/dts/am33xx.dtsi  |  2 ++
 arch/arm/boot/dts/am4372.dtsi  |  2 ++
 drivers/clk/ti/clk-43xx.c      | 16 ++++++++++++
 drivers/net/ethernet/ti/cpsw.c | 56 +++++++++++++++++++++++++++++++-----------
 drivers/net/ethernet/ti/cpts.c | 11 +++------
 5 files changed, 66 insertions(+), 21 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH v2 1/6] ARM: dts: am33xx: Add clock names for cpsw and cpts
  2014-05-02  6:31 ` George Cherian
  (?)
  (?)
@ 2014-05-02  6:31   ` George Cherian
  -1 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:31 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: davem, richardcochran, jeffrey.t.kirsher, dborkman, ast,
	tklauser, mpa, bhutchings, zonque, balbi, mugunthanvnm,
	george.cherian, t-kristo, mturquette, linux, galak,
	ijc+devicetree, mark.rutland, pawel.moll, robh+dt, tony,
	bcousson

Add CPSW fck and CPTS clock and clock names

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 arch/arm/boot/dts/am33xx.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 9770e35..d1e2b36 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -665,6 +665,8 @@
 		mac: ethernet@4a100000 {
 			compatible = "ti,cpsw";
 			ti,hwmods = "cpgmac0";
+			clocks = <&cpsw_125mhz_gclk>, <&cpsw_cpts_rft_clk>;
+			clock-names = "fck", "cpts";
 			cpdma_channels = <8>;
 			ale_entries = <1024>;
 			bd_ram_size = <0x2000>;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 1/6] ARM: dts: am33xx: Add clock names for cpsw and cpts
@ 2014-05-02  6:31   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:31 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: mark.rutland, tony, ast, mturquette, jeffrey.t.kirsher, tklauser,
	mugunthanvnm, george.cherian, pawel.moll, ijc+devicetree,
	richardcochran, robh+dt, bhutchings, linux, balbi, zonque,
	t-kristo, dborkman, bcousson, galak, mpa, davem

Add CPSW fck and CPTS clock and clock names

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 arch/arm/boot/dts/am33xx.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 9770e35..d1e2b36 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -665,6 +665,8 @@
 		mac: ethernet@4a100000 {
 			compatible = "ti,cpsw";
 			ti,hwmods = "cpgmac0";
+			clocks = <&cpsw_125mhz_gclk>, <&cpsw_cpts_rft_clk>;
+			clock-names = "fck", "cpts";
 			cpdma_channels = <8>;
 			ale_entries = <1024>;
 			bd_ram_size = <0x2000>;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 1/6] ARM: dts: am33xx: Add clock names for cpsw and cpts
@ 2014-05-02  6:31   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:31 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: mark.rutland, tony, ast, mturquette, jeffrey.t.kirsher, tklauser,
	mugunthanvnm, george.cherian, pawel.moll, ijc+devicetree,
	richardcochran, robh+dt, bhutchings, linux, balbi, zonque,
	t-kristo, dborkman, bcousson, galak, mpa, davem

Add CPSW fck and CPTS clock and clock names

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 arch/arm/boot/dts/am33xx.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 9770e35..d1e2b36 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -665,6 +665,8 @@
 		mac: ethernet@4a100000 {
 			compatible = "ti,cpsw";
 			ti,hwmods = "cpgmac0";
+			clocks = <&cpsw_125mhz_gclk>, <&cpsw_cpts_rft_clk>;
+			clock-names = "fck", "cpts";
 			cpdma_channels = <8>;
 			ale_entries = <1024>;
 			bd_ram_size = <0x2000>;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 1/6] ARM: dts: am33xx: Add clock names for cpsw and cpts
@ 2014-05-02  6:31   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:31 UTC (permalink / raw)
  To: linux-arm-kernel

Add CPSW fck and CPTS clock and clock names

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 arch/arm/boot/dts/am33xx.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 9770e35..d1e2b36 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -665,6 +665,8 @@
 		mac: ethernet at 4a100000 {
 			compatible = "ti,cpsw";
 			ti,hwmods = "cpgmac0";
+			clocks = <&cpsw_125mhz_gclk>, <&cpsw_cpts_rft_clk>;
+			clock-names = "fck", "cpts";
 			cpdma_channels = <8>;
 			ale_entries = <1024>;
 			bd_ram_size = <0x2000>;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 2/6] drivers: net: cpts: Remove hardcoded clock name for CPTS
  2014-05-02  6:31 ` George Cherian
  (?)
@ 2014-05-02  6:32   ` George Cherian
  -1 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: davem, richardcochran, jeffrey.t.kirsher, dborkman, ast,
	tklauser, mpa, bhutchings, zonque, balbi, mugunthanvnm,
	george.cherian, t-kristo, mturquette, linux, galak,
	ijc+devicetree, mark.rutland, pawel.moll, robh+dt, tony,
	bcousson

CPTS refclk name is hardcoded, which makes it fail in case of DRA7x
Remove the hardcoded clock name for CPTS refclk and get the same from DT.

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 drivers/net/ethernet/ti/cpts.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 2435139..6b56f85 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -236,13 +236,11 @@ static void cpts_overflow_check(struct work_struct *work)
 	schedule_delayed_work(&cpts->overflow_work, CPTS_OVERFLOW_PERIOD);
 }
 
-#define CPTS_REF_CLOCK_NAME "cpsw_cpts_rft_clk"
-
-static void cpts_clk_init(struct cpts *cpts)
+static void cpts_clk_init(struct device *dev, struct cpts *cpts)
 {
-	cpts->refclk = clk_get(NULL, CPTS_REF_CLOCK_NAME);
+	cpts->refclk = devm_clk_get(dev, "cpts");
 	if (IS_ERR(cpts->refclk)) {
-		pr_err("Failed to clk_get %s\n", CPTS_REF_CLOCK_NAME);
+		dev_err(dev, "Failed to get cpts refclk\n");
 		cpts->refclk = NULL;
 		return;
 	}
@@ -252,7 +250,6 @@ static void cpts_clk_init(struct cpts *cpts)
 static void cpts_clk_release(struct cpts *cpts)
 {
 	clk_disable(cpts->refclk);
-	clk_put(cpts->refclk);
 }
 
 static int cpts_match(struct sk_buff *skb, unsigned int ptp_class,
@@ -390,7 +387,7 @@ int cpts_register(struct device *dev, struct cpts *cpts,
 	for (i = 0; i < CPTS_MAX_EVENTS; i++)
 		list_add(&cpts->pool_data[i].list, &cpts->pool);
 
-	cpts_clk_init(cpts);
+	cpts_clk_init(dev, cpts);
 	cpts_write32(cpts, CPTS_EN, control);
 	cpts_write32(cpts, TS_PEND_EN, int_enable);
 
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 2/6] drivers: net: cpts: Remove hardcoded clock name for CPTS
@ 2014-05-02  6:32   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: davem, richardcochran, jeffrey.t.kirsher, dborkman, ast,
	tklauser, mpa, bhutchings, zonque, balbi, mugunthanvnm,
	george.cherian, t-kristo, mturquette, linux, galak,
	ijc+devicetree, mark.rutland, pawel.moll, robh+dt, tony,
	bcousson

CPTS refclk name is hardcoded, which makes it fail in case of DRA7x
Remove the hardcoded clock name for CPTS refclk and get the same from DT.

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 drivers/net/ethernet/ti/cpts.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 2435139..6b56f85 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -236,13 +236,11 @@ static void cpts_overflow_check(struct work_struct *work)
 	schedule_delayed_work(&cpts->overflow_work, CPTS_OVERFLOW_PERIOD);
 }
 
-#define CPTS_REF_CLOCK_NAME "cpsw_cpts_rft_clk"
-
-static void cpts_clk_init(struct cpts *cpts)
+static void cpts_clk_init(struct device *dev, struct cpts *cpts)
 {
-	cpts->refclk = clk_get(NULL, CPTS_REF_CLOCK_NAME);
+	cpts->refclk = devm_clk_get(dev, "cpts");
 	if (IS_ERR(cpts->refclk)) {
-		pr_err("Failed to clk_get %s\n", CPTS_REF_CLOCK_NAME);
+		dev_err(dev, "Failed to get cpts refclk\n");
 		cpts->refclk = NULL;
 		return;
 	}
@@ -252,7 +250,6 @@ static void cpts_clk_init(struct cpts *cpts)
 static void cpts_clk_release(struct cpts *cpts)
 {
 	clk_disable(cpts->refclk);
-	clk_put(cpts->refclk);
 }
 
 static int cpts_match(struct sk_buff *skb, unsigned int ptp_class,
@@ -390,7 +387,7 @@ int cpts_register(struct device *dev, struct cpts *cpts,
 	for (i = 0; i < CPTS_MAX_EVENTS; i++)
 		list_add(&cpts->pool_data[i].list, &cpts->pool);
 
-	cpts_clk_init(cpts);
+	cpts_clk_init(dev, cpts);
 	cpts_write32(cpts, CPTS_EN, control);
 	cpts_write32(cpts, TS_PEND_EN, int_enable);
 
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 2/6] drivers: net: cpts: Remove hardcoded clock name for CPTS
@ 2014-05-02  6:32   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: linux-arm-kernel

CPTS refclk name is hardcoded, which makes it fail in case of DRA7x
Remove the hardcoded clock name for CPTS refclk and get the same from DT.

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 drivers/net/ethernet/ti/cpts.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 2435139..6b56f85 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -236,13 +236,11 @@ static void cpts_overflow_check(struct work_struct *work)
 	schedule_delayed_work(&cpts->overflow_work, CPTS_OVERFLOW_PERIOD);
 }
 
-#define CPTS_REF_CLOCK_NAME "cpsw_cpts_rft_clk"
-
-static void cpts_clk_init(struct cpts *cpts)
+static void cpts_clk_init(struct device *dev, struct cpts *cpts)
 {
-	cpts->refclk = clk_get(NULL, CPTS_REF_CLOCK_NAME);
+	cpts->refclk = devm_clk_get(dev, "cpts");
 	if (IS_ERR(cpts->refclk)) {
-		pr_err("Failed to clk_get %s\n", CPTS_REF_CLOCK_NAME);
+		dev_err(dev, "Failed to get cpts refclk\n");
 		cpts->refclk = NULL;
 		return;
 	}
@@ -252,7 +250,6 @@ static void cpts_clk_init(struct cpts *cpts)
 static void cpts_clk_release(struct cpts *cpts)
 {
 	clk_disable(cpts->refclk);
-	clk_put(cpts->refclk);
 }
 
 static int cpts_match(struct sk_buff *skb, unsigned int ptp_class,
@@ -390,7 +387,7 @@ int cpts_register(struct device *dev, struct cpts *cpts,
 	for (i = 0; i < CPTS_MAX_EVENTS; i++)
 		list_add(&cpts->pool_data[i].list, &cpts->pool);
 
-	cpts_clk_init(cpts);
+	cpts_clk_init(dev, cpts);
 	cpts_write32(cpts, CPTS_EN, control);
 	cpts_write32(cpts, TS_PEND_EN, int_enable);
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 3/6] drivers: net: cpsw: Enable CPTS for DRA7xx and AM4372
  2014-05-02  6:31 ` George Cherian
  (?)
@ 2014-05-02  6:32   ` George Cherian
  -1 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: davem, richardcochran, jeffrey.t.kirsher, dborkman, ast,
	tklauser, mpa, bhutchings, zonque, balbi, mugunthanvnm,
	george.cherian, t-kristo, mturquette, linux, galak,
	ijc+devicetree, mark.rutland, pawel.moll, robh+dt, tony,
	bcousson

Enable cpts hardware time stamping for Dra7xx and AM4372.
This enables PTPv2 for DRA7xx and AM4372.

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 drivers/net/ethernet/ti/cpsw.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 36aa109..085ffb5 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1398,7 +1398,8 @@ static int cpsw_hwtstamp_set(struct net_device *dev, struct ifreq *ifr)
 	struct hwtstamp_config cfg;
 
 	if (priv->version != CPSW_VERSION_1 &&
-	    priv->version != CPSW_VERSION_2)
+	    priv->version != CPSW_VERSION_2 &&
+	    priv->version != CPSW_VERSION_3)
 		return -EOPNOTSUPP;
 
 	if (copy_from_user(&cfg, ifr->ifr_data, sizeof(cfg)))
@@ -1443,6 +1444,7 @@ static int cpsw_hwtstamp_set(struct net_device *dev, struct ifreq *ifr)
 		cpsw_hwtstamp_v1(priv);
 		break;
 	case CPSW_VERSION_2:
+	case CPSW_VERSION_3:
 		cpsw_hwtstamp_v2(priv);
 		break;
 	default:
@@ -1459,7 +1461,8 @@ static int cpsw_hwtstamp_get(struct net_device *dev, struct ifreq *ifr)
 	struct hwtstamp_config cfg;
 
 	if (priv->version != CPSW_VERSION_1 &&
-	    priv->version != CPSW_VERSION_2)
+	    priv->version != CPSW_VERSION_2 &&
+	    priv->version != CPSW_VERSION_3)
 		return -EOPNOTSUPP;
 
 	cfg.flags = 0;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 3/6] drivers: net: cpsw: Enable CPTS for DRA7xx and AM4372
@ 2014-05-02  6:32   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: davem, richardcochran, jeffrey.t.kirsher, dborkman, ast,
	tklauser, mpa, bhutchings, zonque, balbi, mugunthanvnm,
	george.cherian, t-kristo, mturquette, linux, galak,
	ijc+devicetree, mark.rutland, pawel.moll, robh+dt, tony,
	bcousson

Enable cpts hardware time stamping for Dra7xx and AM4372.
This enables PTPv2 for DRA7xx and AM4372.

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 drivers/net/ethernet/ti/cpsw.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 36aa109..085ffb5 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1398,7 +1398,8 @@ static int cpsw_hwtstamp_set(struct net_device *dev, struct ifreq *ifr)
 	struct hwtstamp_config cfg;
 
 	if (priv->version != CPSW_VERSION_1 &&
-	    priv->version != CPSW_VERSION_2)
+	    priv->version != CPSW_VERSION_2 &&
+	    priv->version != CPSW_VERSION_3)
 		return -EOPNOTSUPP;
 
 	if (copy_from_user(&cfg, ifr->ifr_data, sizeof(cfg)))
@@ -1443,6 +1444,7 @@ static int cpsw_hwtstamp_set(struct net_device *dev, struct ifreq *ifr)
 		cpsw_hwtstamp_v1(priv);
 		break;
 	case CPSW_VERSION_2:
+	case CPSW_VERSION_3:
 		cpsw_hwtstamp_v2(priv);
 		break;
 	default:
@@ -1459,7 +1461,8 @@ static int cpsw_hwtstamp_get(struct net_device *dev, struct ifreq *ifr)
 	struct hwtstamp_config cfg;
 
 	if (priv->version != CPSW_VERSION_1 &&
-	    priv->version != CPSW_VERSION_2)
+	    priv->version != CPSW_VERSION_2 &&
+	    priv->version != CPSW_VERSION_3)
 		return -EOPNOTSUPP;
 
 	cfg.flags = 0;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 3/6] drivers: net: cpsw: Enable CPTS for DRA7xx and AM4372
@ 2014-05-02  6:32   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: linux-arm-kernel

Enable cpts hardware time stamping for Dra7xx and AM4372.
This enables PTPv2 for DRA7xx and AM4372.

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 drivers/net/ethernet/ti/cpsw.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 36aa109..085ffb5 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1398,7 +1398,8 @@ static int cpsw_hwtstamp_set(struct net_device *dev, struct ifreq *ifr)
 	struct hwtstamp_config cfg;
 
 	if (priv->version != CPSW_VERSION_1 &&
-	    priv->version != CPSW_VERSION_2)
+	    priv->version != CPSW_VERSION_2 &&
+	    priv->version != CPSW_VERSION_3)
 		return -EOPNOTSUPP;
 
 	if (copy_from_user(&cfg, ifr->ifr_data, sizeof(cfg)))
@@ -1443,6 +1444,7 @@ static int cpsw_hwtstamp_set(struct net_device *dev, struct ifreq *ifr)
 		cpsw_hwtstamp_v1(priv);
 		break;
 	case CPSW_VERSION_2:
+	case CPSW_VERSION_3:
 		cpsw_hwtstamp_v2(priv);
 		break;
 	default:
@@ -1459,7 +1461,8 @@ static int cpsw_hwtstamp_get(struct net_device *dev, struct ifreq *ifr)
 	struct hwtstamp_config cfg;
 
 	if (priv->version != CPSW_VERSION_1 &&
-	    priv->version != CPSW_VERSION_2)
+	    priv->version != CPSW_VERSION_2 &&
+	    priv->version != CPSW_VERSION_3)
 		return -EOPNOTSUPP;
 
 	cfg.flags = 0;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 4/6] drivers: net: cpsw: Enable Annexe F Time sync
  2014-05-02  6:31 ` George Cherian
  (?)
  (?)
@ 2014-05-02  6:32   ` George Cherian
  -1 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: davem, richardcochran, jeffrey.t.kirsher, dborkman, ast,
	tklauser, mpa, bhutchings, zonque, balbi, mugunthanvnm,
	george.cherian, t-kristo, mturquette, linux, galak,
	ijc+devicetree, mark.rutland, pawel.moll, robh+dt, tony,
	bcousson

Enable the Annex F Time Sync explicitly for DRA7x and AM4372.
With this enabled the L2 PTP is working.

while at that rename TS_BIT8 to TS_TTL_NONZERO

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 drivers/net/ethernet/ti/cpsw.c | 49 +++++++++++++++++++++++++++++++-----------
 1 file changed, 37 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 085ffb5..d14c8da 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -248,20 +248,31 @@ struct cpsw_ss_regs {
 #define TS_131              (1<<11) /* Time Sync Dest IP Addr 131 enable */
 #define TS_130              (1<<10) /* Time Sync Dest IP Addr 130 enable */
 #define TS_129              (1<<9)  /* Time Sync Dest IP Addr 129 enable */
-#define TS_BIT8             (1<<8)  /* ts_ttl_nonzero? */
+#define TS_TTL_NONZERO      (1<<8)  /* Time Sync Time To Live Non-zero enable */
+#define TS_ANNEX_F_EN       (1<<6)  /* Time Sync Annex F enable */
 #define TS_ANNEX_D_EN       (1<<4)  /* Time Sync Annex D enable */
 #define TS_LTYPE2_EN        (1<<3)  /* Time Sync LTYPE 2 enable */
 #define TS_LTYPE1_EN        (1<<2)  /* Time Sync LTYPE 1 enable */
 #define TS_TX_EN            (1<<1)  /* Time Sync Transmit Enable */
 #define TS_RX_EN            (1<<0)  /* Time Sync Receive Enable */
 
-#define CTRL_TS_BITS \
-	(TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 | TS_BIT8 | \
-	 TS_ANNEX_D_EN | TS_LTYPE1_EN)
+#define CTRL_V2_TS_BITS \
+	(TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 |\
+	 TS_TTL_NONZERO  | TS_ANNEX_D_EN | TS_LTYPE1_EN)
 
-#define CTRL_ALL_TS_MASK (CTRL_TS_BITS | TS_TX_EN | TS_RX_EN)
-#define CTRL_TX_TS_BITS  (CTRL_TS_BITS | TS_TX_EN)
-#define CTRL_RX_TS_BITS  (CTRL_TS_BITS | TS_RX_EN)
+#define CTRL_V2_ALL_TS_MASK (CTRL_V2_TS_BITS | TS_TX_EN | TS_RX_EN)
+#define CTRL_V2_TX_TS_BITS  (CTRL_V2_TS_BITS | TS_TX_EN)
+#define CTRL_V2_RX_TS_BITS  (CTRL_V2_TS_BITS | TS_RX_EN)
+
+
+#define CTRL_V3_TS_BITS \
+	(TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 |\
+	 TS_TTL_NONZERO | TS_ANNEX_F_EN | TS_ANNEX_D_EN |\
+	 TS_LTYPE1_EN)
+
+#define CTRL_V3_ALL_TS_MASK (CTRL_V3_TS_BITS | TS_TX_EN | TS_RX_EN)
+#define CTRL_V3_TX_TS_BITS  (CTRL_V3_TS_BITS | TS_TX_EN)
+#define CTRL_V3_RX_TS_BITS  (CTRL_V3_TS_BITS | TS_RX_EN)
 
 /* Bit definitions for the CPSW2_TS_SEQ_MTYPE register */
 #define TS_SEQ_ID_OFFSET_SHIFT   (16)    /* Time Sync Sequence ID Offset */
@@ -1376,13 +1387,27 @@ static void cpsw_hwtstamp_v2(struct cpsw_priv *priv)
 		slave = &priv->slaves[priv->data.active_slave];
 
 	ctrl = slave_read(slave, CPSW2_CONTROL);
-	ctrl &= ~CTRL_ALL_TS_MASK;
+	switch (priv->version) {
+	case CPSW_VERSION_2:
+		ctrl &= ~CTRL_V2_ALL_TS_MASK;
 
-	if (priv->cpts->tx_enable)
-		ctrl |= CTRL_TX_TS_BITS;
+		if (priv->cpts->tx_enable)
+			ctrl |= CTRL_V2_TX_TS_BITS;
 
-	if (priv->cpts->rx_enable)
-		ctrl |= CTRL_RX_TS_BITS;
+		if (priv->cpts->rx_enable)
+			ctrl |= CTRL_V2_RX_TS_BITS;
+	break;
+	case CPSW_VERSION_3:
+	default:
+		ctrl &= ~CTRL_V3_ALL_TS_MASK;
+
+		if (priv->cpts->tx_enable)
+			ctrl |= CTRL_V3_TX_TS_BITS;
+
+		if (priv->cpts->rx_enable)
+			ctrl |= CTRL_V3_RX_TS_BITS;
+	break;
+	}
 
 	mtype = (30 << TS_SEQ_ID_OFFSET_SHIFT) | EVENT_MSG_BITS;
 
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 4/6] drivers: net: cpsw: Enable Annexe F Time sync
@ 2014-05-02  6:32   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: mark.rutland, tony, ast, mturquette, jeffrey.t.kirsher, tklauser,
	mugunthanvnm, george.cherian, pawel.moll, ijc+devicetree,
	richardcochran, robh+dt, bhutchings, linux, balbi, zonque,
	t-kristo, dborkman, bcousson, galak, mpa, davem

Enable the Annex F Time Sync explicitly for DRA7x and AM4372.
With this enabled the L2 PTP is working.

while at that rename TS_BIT8 to TS_TTL_NONZERO

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 drivers/net/ethernet/ti/cpsw.c | 49 +++++++++++++++++++++++++++++++-----------
 1 file changed, 37 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 085ffb5..d14c8da 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -248,20 +248,31 @@ struct cpsw_ss_regs {
 #define TS_131              (1<<11) /* Time Sync Dest IP Addr 131 enable */
 #define TS_130              (1<<10) /* Time Sync Dest IP Addr 130 enable */
 #define TS_129              (1<<9)  /* Time Sync Dest IP Addr 129 enable */
-#define TS_BIT8             (1<<8)  /* ts_ttl_nonzero? */
+#define TS_TTL_NONZERO      (1<<8)  /* Time Sync Time To Live Non-zero enable */
+#define TS_ANNEX_F_EN       (1<<6)  /* Time Sync Annex F enable */
 #define TS_ANNEX_D_EN       (1<<4)  /* Time Sync Annex D enable */
 #define TS_LTYPE2_EN        (1<<3)  /* Time Sync LTYPE 2 enable */
 #define TS_LTYPE1_EN        (1<<2)  /* Time Sync LTYPE 1 enable */
 #define TS_TX_EN            (1<<1)  /* Time Sync Transmit Enable */
 #define TS_RX_EN            (1<<0)  /* Time Sync Receive Enable */
 
-#define CTRL_TS_BITS \
-	(TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 | TS_BIT8 | \
-	 TS_ANNEX_D_EN | TS_LTYPE1_EN)
+#define CTRL_V2_TS_BITS \
+	(TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 |\
+	 TS_TTL_NONZERO  | TS_ANNEX_D_EN | TS_LTYPE1_EN)
 
-#define CTRL_ALL_TS_MASK (CTRL_TS_BITS | TS_TX_EN | TS_RX_EN)
-#define CTRL_TX_TS_BITS  (CTRL_TS_BITS | TS_TX_EN)
-#define CTRL_RX_TS_BITS  (CTRL_TS_BITS | TS_RX_EN)
+#define CTRL_V2_ALL_TS_MASK (CTRL_V2_TS_BITS | TS_TX_EN | TS_RX_EN)
+#define CTRL_V2_TX_TS_BITS  (CTRL_V2_TS_BITS | TS_TX_EN)
+#define CTRL_V2_RX_TS_BITS  (CTRL_V2_TS_BITS | TS_RX_EN)
+
+
+#define CTRL_V3_TS_BITS \
+	(TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 |\
+	 TS_TTL_NONZERO | TS_ANNEX_F_EN | TS_ANNEX_D_EN |\
+	 TS_LTYPE1_EN)
+
+#define CTRL_V3_ALL_TS_MASK (CTRL_V3_TS_BITS | TS_TX_EN | TS_RX_EN)
+#define CTRL_V3_TX_TS_BITS  (CTRL_V3_TS_BITS | TS_TX_EN)
+#define CTRL_V3_RX_TS_BITS  (CTRL_V3_TS_BITS | TS_RX_EN)
 
 /* Bit definitions for the CPSW2_TS_SEQ_MTYPE register */
 #define TS_SEQ_ID_OFFSET_SHIFT   (16)    /* Time Sync Sequence ID Offset */
@@ -1376,13 +1387,27 @@ static void cpsw_hwtstamp_v2(struct cpsw_priv *priv)
 		slave = &priv->slaves[priv->data.active_slave];
 
 	ctrl = slave_read(slave, CPSW2_CONTROL);
-	ctrl &= ~CTRL_ALL_TS_MASK;
+	switch (priv->version) {
+	case CPSW_VERSION_2:
+		ctrl &= ~CTRL_V2_ALL_TS_MASK;
 
-	if (priv->cpts->tx_enable)
-		ctrl |= CTRL_TX_TS_BITS;
+		if (priv->cpts->tx_enable)
+			ctrl |= CTRL_V2_TX_TS_BITS;
 
-	if (priv->cpts->rx_enable)
-		ctrl |= CTRL_RX_TS_BITS;
+		if (priv->cpts->rx_enable)
+			ctrl |= CTRL_V2_RX_TS_BITS;
+	break;
+	case CPSW_VERSION_3:
+	default:
+		ctrl &= ~CTRL_V3_ALL_TS_MASK;
+
+		if (priv->cpts->tx_enable)
+			ctrl |= CTRL_V3_TX_TS_BITS;
+
+		if (priv->cpts->rx_enable)
+			ctrl |= CTRL_V3_RX_TS_BITS;
+	break;
+	}
 
 	mtype = (30 << TS_SEQ_ID_OFFSET_SHIFT) | EVENT_MSG_BITS;
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 4/6] drivers: net: cpsw: Enable Annexe F Time sync
@ 2014-05-02  6:32   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: mark.rutland, tony, ast, mturquette, jeffrey.t.kirsher, tklauser,
	mugunthanvnm, george.cherian, pawel.moll, ijc+devicetree,
	richardcochran, robh+dt, bhutchings, linux, balbi, zonque,
	t-kristo, dborkman, bcousson, galak, mpa, davem

Enable the Annex F Time Sync explicitly for DRA7x and AM4372.
With this enabled the L2 PTP is working.

while at that rename TS_BIT8 to TS_TTL_NONZERO

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 drivers/net/ethernet/ti/cpsw.c | 49 +++++++++++++++++++++++++++++++-----------
 1 file changed, 37 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 085ffb5..d14c8da 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -248,20 +248,31 @@ struct cpsw_ss_regs {
 #define TS_131              (1<<11) /* Time Sync Dest IP Addr 131 enable */
 #define TS_130              (1<<10) /* Time Sync Dest IP Addr 130 enable */
 #define TS_129              (1<<9)  /* Time Sync Dest IP Addr 129 enable */
-#define TS_BIT8             (1<<8)  /* ts_ttl_nonzero? */
+#define TS_TTL_NONZERO      (1<<8)  /* Time Sync Time To Live Non-zero enable */
+#define TS_ANNEX_F_EN       (1<<6)  /* Time Sync Annex F enable */
 #define TS_ANNEX_D_EN       (1<<4)  /* Time Sync Annex D enable */
 #define TS_LTYPE2_EN        (1<<3)  /* Time Sync LTYPE 2 enable */
 #define TS_LTYPE1_EN        (1<<2)  /* Time Sync LTYPE 1 enable */
 #define TS_TX_EN            (1<<1)  /* Time Sync Transmit Enable */
 #define TS_RX_EN            (1<<0)  /* Time Sync Receive Enable */
 
-#define CTRL_TS_BITS \
-	(TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 | TS_BIT8 | \
-	 TS_ANNEX_D_EN | TS_LTYPE1_EN)
+#define CTRL_V2_TS_BITS \
+	(TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 |\
+	 TS_TTL_NONZERO  | TS_ANNEX_D_EN | TS_LTYPE1_EN)
 
-#define CTRL_ALL_TS_MASK (CTRL_TS_BITS | TS_TX_EN | TS_RX_EN)
-#define CTRL_TX_TS_BITS  (CTRL_TS_BITS | TS_TX_EN)
-#define CTRL_RX_TS_BITS  (CTRL_TS_BITS | TS_RX_EN)
+#define CTRL_V2_ALL_TS_MASK (CTRL_V2_TS_BITS | TS_TX_EN | TS_RX_EN)
+#define CTRL_V2_TX_TS_BITS  (CTRL_V2_TS_BITS | TS_TX_EN)
+#define CTRL_V2_RX_TS_BITS  (CTRL_V2_TS_BITS | TS_RX_EN)
+
+
+#define CTRL_V3_TS_BITS \
+	(TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 |\
+	 TS_TTL_NONZERO | TS_ANNEX_F_EN | TS_ANNEX_D_EN |\
+	 TS_LTYPE1_EN)
+
+#define CTRL_V3_ALL_TS_MASK (CTRL_V3_TS_BITS | TS_TX_EN | TS_RX_EN)
+#define CTRL_V3_TX_TS_BITS  (CTRL_V3_TS_BITS | TS_TX_EN)
+#define CTRL_V3_RX_TS_BITS  (CTRL_V3_TS_BITS | TS_RX_EN)
 
 /* Bit definitions for the CPSW2_TS_SEQ_MTYPE register */
 #define TS_SEQ_ID_OFFSET_SHIFT   (16)    /* Time Sync Sequence ID Offset */
@@ -1376,13 +1387,27 @@ static void cpsw_hwtstamp_v2(struct cpsw_priv *priv)
 		slave = &priv->slaves[priv->data.active_slave];
 
 	ctrl = slave_read(slave, CPSW2_CONTROL);
-	ctrl &= ~CTRL_ALL_TS_MASK;
+	switch (priv->version) {
+	case CPSW_VERSION_2:
+		ctrl &= ~CTRL_V2_ALL_TS_MASK;
 
-	if (priv->cpts->tx_enable)
-		ctrl |= CTRL_TX_TS_BITS;
+		if (priv->cpts->tx_enable)
+			ctrl |= CTRL_V2_TX_TS_BITS;
 
-	if (priv->cpts->rx_enable)
-		ctrl |= CTRL_RX_TS_BITS;
+		if (priv->cpts->rx_enable)
+			ctrl |= CTRL_V2_RX_TS_BITS;
+	break;
+	case CPSW_VERSION_3:
+	default:
+		ctrl &= ~CTRL_V3_ALL_TS_MASK;
+
+		if (priv->cpts->tx_enable)
+			ctrl |= CTRL_V3_TX_TS_BITS;
+
+		if (priv->cpts->rx_enable)
+			ctrl |= CTRL_V3_RX_TS_BITS;
+	break;
+	}
 
 	mtype = (30 << TS_SEQ_ID_OFFSET_SHIFT) | EVENT_MSG_BITS;
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 4/6] drivers: net: cpsw: Enable Annexe F Time sync
@ 2014-05-02  6:32   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the Annex F Time Sync explicitly for DRA7x and AM4372.
With this enabled the L2 PTP is working.

while at that rename TS_BIT8 to TS_TTL_NONZERO

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 drivers/net/ethernet/ti/cpsw.c | 49 +++++++++++++++++++++++++++++++-----------
 1 file changed, 37 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 085ffb5..d14c8da 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -248,20 +248,31 @@ struct cpsw_ss_regs {
 #define TS_131              (1<<11) /* Time Sync Dest IP Addr 131 enable */
 #define TS_130              (1<<10) /* Time Sync Dest IP Addr 130 enable */
 #define TS_129              (1<<9)  /* Time Sync Dest IP Addr 129 enable */
-#define TS_BIT8             (1<<8)  /* ts_ttl_nonzero? */
+#define TS_TTL_NONZERO      (1<<8)  /* Time Sync Time To Live Non-zero enable */
+#define TS_ANNEX_F_EN       (1<<6)  /* Time Sync Annex F enable */
 #define TS_ANNEX_D_EN       (1<<4)  /* Time Sync Annex D enable */
 #define TS_LTYPE2_EN        (1<<3)  /* Time Sync LTYPE 2 enable */
 #define TS_LTYPE1_EN        (1<<2)  /* Time Sync LTYPE 1 enable */
 #define TS_TX_EN            (1<<1)  /* Time Sync Transmit Enable */
 #define TS_RX_EN            (1<<0)  /* Time Sync Receive Enable */
 
-#define CTRL_TS_BITS \
-	(TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 | TS_BIT8 | \
-	 TS_ANNEX_D_EN | TS_LTYPE1_EN)
+#define CTRL_V2_TS_BITS \
+	(TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 |\
+	 TS_TTL_NONZERO  | TS_ANNEX_D_EN | TS_LTYPE1_EN)
 
-#define CTRL_ALL_TS_MASK (CTRL_TS_BITS | TS_TX_EN | TS_RX_EN)
-#define CTRL_TX_TS_BITS  (CTRL_TS_BITS | TS_TX_EN)
-#define CTRL_RX_TS_BITS  (CTRL_TS_BITS | TS_RX_EN)
+#define CTRL_V2_ALL_TS_MASK (CTRL_V2_TS_BITS | TS_TX_EN | TS_RX_EN)
+#define CTRL_V2_TX_TS_BITS  (CTRL_V2_TS_BITS | TS_TX_EN)
+#define CTRL_V2_RX_TS_BITS  (CTRL_V2_TS_BITS | TS_RX_EN)
+
+
+#define CTRL_V3_TS_BITS \
+	(TS_320 | TS_319 | TS_132 | TS_131 | TS_130 | TS_129 |\
+	 TS_TTL_NONZERO | TS_ANNEX_F_EN | TS_ANNEX_D_EN |\
+	 TS_LTYPE1_EN)
+
+#define CTRL_V3_ALL_TS_MASK (CTRL_V3_TS_BITS | TS_TX_EN | TS_RX_EN)
+#define CTRL_V3_TX_TS_BITS  (CTRL_V3_TS_BITS | TS_TX_EN)
+#define CTRL_V3_RX_TS_BITS  (CTRL_V3_TS_BITS | TS_RX_EN)
 
 /* Bit definitions for the CPSW2_TS_SEQ_MTYPE register */
 #define TS_SEQ_ID_OFFSET_SHIFT   (16)    /* Time Sync Sequence ID Offset */
@@ -1376,13 +1387,27 @@ static void cpsw_hwtstamp_v2(struct cpsw_priv *priv)
 		slave = &priv->slaves[priv->data.active_slave];
 
 	ctrl = slave_read(slave, CPSW2_CONTROL);
-	ctrl &= ~CTRL_ALL_TS_MASK;
+	switch (priv->version) {
+	case CPSW_VERSION_2:
+		ctrl &= ~CTRL_V2_ALL_TS_MASK;
 
-	if (priv->cpts->tx_enable)
-		ctrl |= CTRL_TX_TS_BITS;
+		if (priv->cpts->tx_enable)
+			ctrl |= CTRL_V2_TX_TS_BITS;
 
-	if (priv->cpts->rx_enable)
-		ctrl |= CTRL_RX_TS_BITS;
+		if (priv->cpts->rx_enable)
+			ctrl |= CTRL_V2_RX_TS_BITS;
+	break;
+	case CPSW_VERSION_3:
+	default:
+		ctrl &= ~CTRL_V3_ALL_TS_MASK;
+
+		if (priv->cpts->tx_enable)
+			ctrl |= CTRL_V3_TX_TS_BITS;
+
+		if (priv->cpts->rx_enable)
+			ctrl |= CTRL_V3_RX_TS_BITS;
+	break;
+	}
 
 	mtype = (30 << TS_SEQ_ID_OFFSET_SHIFT) | EVENT_MSG_BITS;
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 5/6] ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk
  2014-05-02  6:31 ` George Cherian
  (?)
  (?)
@ 2014-05-02  6:32   ` George Cherian
  -1 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: davem, richardcochran, jeffrey.t.kirsher, dborkman, ast,
	tklauser, mpa, bhutchings, zonque, balbi, mugunthanvnm,
	george.cherian, t-kristo, mturquette, linux, galak,
	ijc+devicetree, mark.rutland, pawel.moll, robh+dt, tony,
	bcousson

cpsw_cpts_rft_clk has got the choice of 3 clocksources
 -dpll_core_m4_ck
 -dpll_core_m5_ck
 -dpll_disp_m2_ck

By default dpll_core_m4_ck is selected, witn this as clock
source the CPTS doesnot work properly. It gives clockcheck errors
while running PTP.

 clockcheck: clock jumped backward or running slower than expected!

By selecting dpll_core_m5_ck as the clocksource fixes this issue.
In AM335x dpll_core_m5_ck is the default clocksource.

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 drivers/clk/ti/clk-43xx.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c
index 67c8de5..b4877e0 100644
--- a/drivers/clk/ti/clk-43xx.c
+++ b/drivers/clk/ti/clk-43xx.c
@@ -110,9 +110,25 @@ static struct ti_dt_clk am43xx_clks[] = {
 
 int __init am43xx_dt_clk_init(void)
 {
+	struct clk *clk1, *clk2;
+
 	ti_dt_clocks_register(am43xx_clks);
 
 	omap2_clk_disable_autoidle_all();
 
+	/*
+	 * cpsw_cpts_rft_clk  has got the choice of 3 clocksources
+	 * dpll_core_m4_ck, dpll_core_m5_ck and dpll_disp_m2_ck.
+	 * By default dpll_core_m4_ck is selected, witn this as clock
+	 * source the CPTS doesnot work properly. It gives clockcheck errors
+	 * while running PTP.
+	 * clockcheck: clock jumped backward or running slower than expected!
+	 * By selecting dpll_core_m5_ck as the clocksource fixes this issue.
+	 * In AM335x dpll_core_m5_ck is the default clocksource.
+	 */
+	clk1 = clk_get_sys(NULL, "cpsw_cpts_rft_clk");
+	clk2 = clk_get_sys(NULL, "dpll_core_m5_ck");
+	clk_set_parent(clk1, clk2);
+
 	return 0;
 }
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 5/6] ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk
@ 2014-05-02  6:32   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: mark.rutland, tony, ast, mturquette, jeffrey.t.kirsher, tklauser,
	mugunthanvnm, george.cherian, pawel.moll, ijc+devicetree,
	richardcochran, robh+dt, bhutchings, linux, balbi, zonque,
	t-kristo, dborkman, bcousson, galak, mpa, davem

cpsw_cpts_rft_clk has got the choice of 3 clocksources
 -dpll_core_m4_ck
 -dpll_core_m5_ck
 -dpll_disp_m2_ck

By default dpll_core_m4_ck is selected, witn this as clock
source the CPTS doesnot work properly. It gives clockcheck errors
while running PTP.

 clockcheck: clock jumped backward or running slower than expected!

By selecting dpll_core_m5_ck as the clocksource fixes this issue.
In AM335x dpll_core_m5_ck is the default clocksource.

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 drivers/clk/ti/clk-43xx.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c
index 67c8de5..b4877e0 100644
--- a/drivers/clk/ti/clk-43xx.c
+++ b/drivers/clk/ti/clk-43xx.c
@@ -110,9 +110,25 @@ static struct ti_dt_clk am43xx_clks[] = {
 
 int __init am43xx_dt_clk_init(void)
 {
+	struct clk *clk1, *clk2;
+
 	ti_dt_clocks_register(am43xx_clks);
 
 	omap2_clk_disable_autoidle_all();
 
+	/*
+	 * cpsw_cpts_rft_clk  has got the choice of 3 clocksources
+	 * dpll_core_m4_ck, dpll_core_m5_ck and dpll_disp_m2_ck.
+	 * By default dpll_core_m4_ck is selected, witn this as clock
+	 * source the CPTS doesnot work properly. It gives clockcheck errors
+	 * while running PTP.
+	 * clockcheck: clock jumped backward or running slower than expected!
+	 * By selecting dpll_core_m5_ck as the clocksource fixes this issue.
+	 * In AM335x dpll_core_m5_ck is the default clocksource.
+	 */
+	clk1 = clk_get_sys(NULL, "cpsw_cpts_rft_clk");
+	clk2 = clk_get_sys(NULL, "dpll_core_m5_ck");
+	clk_set_parent(clk1, clk2);
+
 	return 0;
 }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 5/6] ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk
@ 2014-05-02  6:32   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: mark.rutland, tony, ast, mturquette, jeffrey.t.kirsher, tklauser,
	mugunthanvnm, george.cherian, pawel.moll, ijc+devicetree,
	richardcochran, robh+dt, bhutchings, linux, balbi, zonque,
	t-kristo, dborkman, bcousson, galak, mpa, davem

cpsw_cpts_rft_clk has got the choice of 3 clocksources
 -dpll_core_m4_ck
 -dpll_core_m5_ck
 -dpll_disp_m2_ck

By default dpll_core_m4_ck is selected, witn this as clock
source the CPTS doesnot work properly. It gives clockcheck errors
while running PTP.

 clockcheck: clock jumped backward or running slower than expected!

By selecting dpll_core_m5_ck as the clocksource fixes this issue.
In AM335x dpll_core_m5_ck is the default clocksource.

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 drivers/clk/ti/clk-43xx.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c
index 67c8de5..b4877e0 100644
--- a/drivers/clk/ti/clk-43xx.c
+++ b/drivers/clk/ti/clk-43xx.c
@@ -110,9 +110,25 @@ static struct ti_dt_clk am43xx_clks[] = {
 
 int __init am43xx_dt_clk_init(void)
 {
+	struct clk *clk1, *clk2;
+
 	ti_dt_clocks_register(am43xx_clks);
 
 	omap2_clk_disable_autoidle_all();
 
+	/*
+	 * cpsw_cpts_rft_clk  has got the choice of 3 clocksources
+	 * dpll_core_m4_ck, dpll_core_m5_ck and dpll_disp_m2_ck.
+	 * By default dpll_core_m4_ck is selected, witn this as clock
+	 * source the CPTS doesnot work properly. It gives clockcheck errors
+	 * while running PTP.
+	 * clockcheck: clock jumped backward or running slower than expected!
+	 * By selecting dpll_core_m5_ck as the clocksource fixes this issue.
+	 * In AM335x dpll_core_m5_ck is the default clocksource.
+	 */
+	clk1 = clk_get_sys(NULL, "cpsw_cpts_rft_clk");
+	clk2 = clk_get_sys(NULL, "dpll_core_m5_ck");
+	clk_set_parent(clk1, clk2);
+
 	return 0;
 }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 5/6] ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk
@ 2014-05-02  6:32   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: linux-arm-kernel

cpsw_cpts_rft_clk has got the choice of 3 clocksources
 -dpll_core_m4_ck
 -dpll_core_m5_ck
 -dpll_disp_m2_ck

By default dpll_core_m4_ck is selected, witn this as clock
source the CPTS doesnot work properly. It gives clockcheck errors
while running PTP.

 clockcheck: clock jumped backward or running slower than expected!

By selecting dpll_core_m5_ck as the clocksource fixes this issue.
In AM335x dpll_core_m5_ck is the default clocksource.

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 drivers/clk/ti/clk-43xx.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c
index 67c8de5..b4877e0 100644
--- a/drivers/clk/ti/clk-43xx.c
+++ b/drivers/clk/ti/clk-43xx.c
@@ -110,9 +110,25 @@ static struct ti_dt_clk am43xx_clks[] = {
 
 int __init am43xx_dt_clk_init(void)
 {
+	struct clk *clk1, *clk2;
+
 	ti_dt_clocks_register(am43xx_clks);
 
 	omap2_clk_disable_autoidle_all();
 
+	/*
+	 * cpsw_cpts_rft_clk  has got the choice of 3 clocksources
+	 * dpll_core_m4_ck, dpll_core_m5_ck and dpll_disp_m2_ck.
+	 * By default dpll_core_m4_ck is selected, witn this as clock
+	 * source the CPTS doesnot work properly. It gives clockcheck errors
+	 * while running PTP.
+	 * clockcheck: clock jumped backward or running slower than expected!
+	 * By selecting dpll_core_m5_ck as the clocksource fixes this issue.
+	 * In AM335x dpll_core_m5_ck is the default clocksource.
+	 */
+	clk1 = clk_get_sys(NULL, "cpsw_cpts_rft_clk");
+	clk2 = clk_get_sys(NULL, "dpll_core_m5_ck");
+	clk_set_parent(clk1, clk2);
+
 	return 0;
 }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 6/6] ARM: dts: am4372: Add clock names for cpsw and cpts
  2014-05-02  6:31 ` George Cherian
  (?)
  (?)
@ 2014-05-02  6:32   ` George Cherian
  -1 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: davem, richardcochran, jeffrey.t.kirsher, dborkman, ast,
	tklauser, mpa, bhutchings, zonque, balbi, mugunthanvnm,
	george.cherian, t-kristo, mturquette, linux, galak,
	ijc+devicetree, mark.rutland, pawel.moll, robh+dt, tony,
	bcousson

Add CPSW fck and CPTS clock and clock names for AM4372

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 arch/arm/boot/dts/am4372.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 36d523a..c2779f6 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -489,6 +489,8 @@
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ti,hwmods = "cpgmac0";
+			clocks = <&cpsw_125mhz_gclk>, <&cpsw_cpts_rft_clk>;
+			clock-names = "fck", "cpts";
 			status = "disabled";
 			cpdma_channels = <8>;
 			ale_entries = <1024>;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 6/6] ARM: dts: am4372: Add clock names for cpsw and cpts
@ 2014-05-02  6:32   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: mark.rutland, tony, ast, mturquette, jeffrey.t.kirsher, tklauser,
	mugunthanvnm, george.cherian, pawel.moll, ijc+devicetree,
	richardcochran, robh+dt, bhutchings, linux, balbi, zonque,
	t-kristo, dborkman, bcousson, galak, mpa, davem

Add CPSW fck and CPTS clock and clock names for AM4372

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 arch/arm/boot/dts/am4372.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 36d523a..c2779f6 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -489,6 +489,8 @@
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ti,hwmods = "cpgmac0";
+			clocks = <&cpsw_125mhz_gclk>, <&cpsw_cpts_rft_clk>;
+			clock-names = "fck", "cpts";
 			status = "disabled";
 			cpdma_channels = <8>;
 			ale_entries = <1024>;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 6/6] ARM: dts: am4372: Add clock names for cpsw and cpts
@ 2014-05-02  6:32   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap
  Cc: mark.rutland, tony, ast, mturquette, jeffrey.t.kirsher, tklauser,
	mugunthanvnm, george.cherian, pawel.moll, ijc+devicetree,
	richardcochran, robh+dt, bhutchings, linux, balbi, zonque,
	t-kristo, dborkman, bcousson, galak, mpa, davem

Add CPSW fck and CPTS clock and clock names for AM4372

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 arch/arm/boot/dts/am4372.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 36d523a..c2779f6 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -489,6 +489,8 @@
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ti,hwmods = "cpgmac0";
+			clocks = <&cpsw_125mhz_gclk>, <&cpsw_cpts_rft_clk>;
+			clock-names = "fck", "cpts";
 			status = "disabled";
 			cpdma_channels = <8>;
 			ale_entries = <1024>;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH v2 6/6] ARM: dts: am4372: Add clock names for cpsw and cpts
@ 2014-05-02  6:32   ` George Cherian
  0 siblings, 0 replies; 37+ messages in thread
From: George Cherian @ 2014-05-02  6:32 UTC (permalink / raw)
  To: linux-arm-kernel

Add CPSW fck and CPTS clock and clock names for AM4372

Signed-off-by: George Cherian <george.cherian@ti.com>
---
 arch/arm/boot/dts/am4372.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 36d523a..c2779f6 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -489,6 +489,8 @@
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ti,hwmods = "cpgmac0";
+			clocks = <&cpsw_125mhz_gclk>, <&cpsw_cpts_rft_clk>;
+			clock-names = "fck", "cpts";
 			status = "disabled";
 			cpdma_channels = <8>;
 			ale_entries = <1024>;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* Re: [PATCH v2 0/6] Add CPTS support for AM437x
  2014-05-02  6:31 ` George Cherian
@ 2014-05-04 16:24   ` Richard Cochran
  -1 siblings, 0 replies; 37+ messages in thread
From: Richard Cochran @ 2014-05-04 16:24 UTC (permalink / raw)
  To: George Cherian
  Cc: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap,
	davem, jeffrey.t.kirsher, dborkman, ast, tklauser, mpa,
	bhutchings, zonque, balbi, mugunthanvnm, t-kristo, mturquette,
	linux, galak, ijc+devicetree, mark.rutland, pawel.moll, robh+dt,
	tony, bcousson

On Fri, May 02, 2014 at 12:01:58PM +0530, George Cherian wrote:
> The series adds CPTS support for AM4372.
> 
> Patch 1 - DT changes w.r.t clock changes for AM33xx.
> Patch 2 - CPTS clock name harcoding in the driver is removed. 
> 	  Easier to pass the clock name from dt rather than hardcoding in driver.
> 	  Also in prepration for DRA7x CPTS support.
> Patch 3 - Enable the CPTS support for both DRA7x and AM4372 in the driver.
> Patch 4 - Enable the Annexe F for L2 PTP for AM437x and DRA7x.
> Patch 5 - Change the default clocksource to dpll_core_m5 
> Patch 6 - DT changes for AM4372.
> 
> 
> v1 -> v2
> 	Patch 1 and 2 Re-ordering.
> 	Seperate TS_BITS define for Hw version V2 and V3

Acked-by: Richard Cochran <richardcochran@gmail.com>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH v2 0/6] Add CPTS support for AM437x
@ 2014-05-04 16:24   ` Richard Cochran
  0 siblings, 0 replies; 37+ messages in thread
From: Richard Cochran @ 2014-05-04 16:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 02, 2014 at 12:01:58PM +0530, George Cherian wrote:
> The series adds CPTS support for AM4372.
> 
> Patch 1 - DT changes w.r.t clock changes for AM33xx.
> Patch 2 - CPTS clock name harcoding in the driver is removed. 
> 	  Easier to pass the clock name from dt rather than hardcoding in driver.
> 	  Also in prepration for DRA7x CPTS support.
> Patch 3 - Enable the CPTS support for both DRA7x and AM4372 in the driver.
> Patch 4 - Enable the Annexe F for L2 PTP for AM437x and DRA7x.
> Patch 5 - Change the default clocksource to dpll_core_m5 
> Patch 6 - DT changes for AM4372.
> 
> 
> v1 -> v2
> 	Patch 1 and 2 Re-ordering.
> 	Seperate TS_BITS define for Hw version V2 and V3

Acked-by: Richard Cochran <richardcochran@gmail.com>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH v2 5/6] ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk
@ 2014-05-05 12:22     ` Tero Kristo
  0 siblings, 0 replies; 37+ messages in thread
From: Tero Kristo @ 2014-05-05 12:22 UTC (permalink / raw)
  To: George Cherian, netdev, linux-kernel, linux-arm-kernel,
	devicetree, linux-omap
  Cc: davem, richardcochran, jeffrey.t.kirsher, dborkman, ast,
	tklauser, mpa, bhutchings, zonque, balbi, mugunthanvnm,
	mturquette, linux, galak, ijc+devicetree, mark.rutland,
	pawel.moll, robh+dt, tony, bcousson

On 05/02/2014 09:32 AM, George Cherian wrote:
> cpsw_cpts_rft_clk has got the choice of 3 clocksources
>   -dpll_core_m4_ck
>   -dpll_core_m5_ck
>   -dpll_disp_m2_ck
>
> By default dpll_core_m4_ck is selected, witn this as clock
> source the CPTS doesnot work properly. It gives clockcheck errors
> while running PTP.
>
>   clockcheck: clock jumped backward or running slower than expected!
>
> By selecting dpll_core_m5_ck as the clocksource fixes this issue.
> In AM335x dpll_core_m5_ck is the default clocksource.
>
> Signed-off-by: George Cherian <george.cherian@ti.com>

Acked-by: Tero Kristo <t-kristo@ti.com>

> ---
>   drivers/clk/ti/clk-43xx.c | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
>
> diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c
> index 67c8de5..b4877e0 100644
> --- a/drivers/clk/ti/clk-43xx.c
> +++ b/drivers/clk/ti/clk-43xx.c
> @@ -110,9 +110,25 @@ static struct ti_dt_clk am43xx_clks[] = {
>
>   int __init am43xx_dt_clk_init(void)
>   {
> +	struct clk *clk1, *clk2;
> +
>   	ti_dt_clocks_register(am43xx_clks);
>
>   	omap2_clk_disable_autoidle_all();
>
> +	/*
> +	 * cpsw_cpts_rft_clk  has got the choice of 3 clocksources
> +	 * dpll_core_m4_ck, dpll_core_m5_ck and dpll_disp_m2_ck.
> +	 * By default dpll_core_m4_ck is selected, witn this as clock
> +	 * source the CPTS doesnot work properly. It gives clockcheck errors
> +	 * while running PTP.
> +	 * clockcheck: clock jumped backward or running slower than expected!
> +	 * By selecting dpll_core_m5_ck as the clocksource fixes this issue.
> +	 * In AM335x dpll_core_m5_ck is the default clocksource.
> +	 */
> +	clk1 = clk_get_sys(NULL, "cpsw_cpts_rft_clk");
> +	clk2 = clk_get_sys(NULL, "dpll_core_m5_ck");
> +	clk_set_parent(clk1, clk2);
> +
>   	return 0;
>   }
>


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH v2 5/6] ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk
@ 2014-05-05 12:22     ` Tero Kristo
  0 siblings, 0 replies; 37+ messages in thread
From: Tero Kristo @ 2014-05-05 12:22 UTC (permalink / raw)
  To: George Cherian, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA
  Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	richardcochran-Re5JQEeQqe8AvxtiuMwx3w,
	jeffrey.t.kirsher-ral2JQCrhuEAvxtiuMwx3w,
	dborkman-H+wXaHxf7aLQT0dZR+AlfA, ast-uqk4Ao+rVK5Wk0Htik3J/w,
	tklauser-93Khv+1bN0NyDzI6CaY1VQ, mpa-bIcnvbaLZ9MEGnE8C9+IrQ,
	bhutchings-s/n/eUQHGBpZroRs9YW3xA, zonque-Re5JQEeQqe8AvxtiuMwx3w,
	balbi-l0cyMroinI0, mugunthanvnm-l0cyMroinI0,
	mturquette-QSEj5FYQhm4dnm+yROfE0A, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	galak-sgV2jX0FEOL9JmXXK+q4OQ,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, mark.rutland-5wv7dgnIgG8,
	pawel.moll-5wv7dgnIgG8, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	tony-4v6yS6AI5VpBDgjK7y7TUQ, bcousson-rdvid1DuHRBWk0Htik3J/w

On 05/02/2014 09:32 AM, George Cherian wrote:
> cpsw_cpts_rft_clk has got the choice of 3 clocksources
>   -dpll_core_m4_ck
>   -dpll_core_m5_ck
>   -dpll_disp_m2_ck
>
> By default dpll_core_m4_ck is selected, witn this as clock
> source the CPTS doesnot work properly. It gives clockcheck errors
> while running PTP.
>
>   clockcheck: clock jumped backward or running slower than expected!
>
> By selecting dpll_core_m5_ck as the clocksource fixes this issue.
> In AM335x dpll_core_m5_ck is the default clocksource.
>
> Signed-off-by: George Cherian <george.cherian-l0cyMroinI0@public.gmane.org>

Acked-by: Tero Kristo <t-kristo-l0cyMroinI0@public.gmane.org>

> ---
>   drivers/clk/ti/clk-43xx.c | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
>
> diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c
> index 67c8de5..b4877e0 100644
> --- a/drivers/clk/ti/clk-43xx.c
> +++ b/drivers/clk/ti/clk-43xx.c
> @@ -110,9 +110,25 @@ static struct ti_dt_clk am43xx_clks[] = {
>
>   int __init am43xx_dt_clk_init(void)
>   {
> +	struct clk *clk1, *clk2;
> +
>   	ti_dt_clocks_register(am43xx_clks);
>
>   	omap2_clk_disable_autoidle_all();
>
> +	/*
> +	 * cpsw_cpts_rft_clk  has got the choice of 3 clocksources
> +	 * dpll_core_m4_ck, dpll_core_m5_ck and dpll_disp_m2_ck.
> +	 * By default dpll_core_m4_ck is selected, witn this as clock
> +	 * source the CPTS doesnot work properly. It gives clockcheck errors
> +	 * while running PTP.
> +	 * clockcheck: clock jumped backward or running slower than expected!
> +	 * By selecting dpll_core_m5_ck as the clocksource fixes this issue.
> +	 * In AM335x dpll_core_m5_ck is the default clocksource.
> +	 */
> +	clk1 = clk_get_sys(NULL, "cpsw_cpts_rft_clk");
> +	clk2 = clk_get_sys(NULL, "dpll_core_m5_ck");
> +	clk_set_parent(clk1, clk2);
> +
>   	return 0;
>   }
>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH v2 5/6] ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk
@ 2014-05-05 12:22     ` Tero Kristo
  0 siblings, 0 replies; 37+ messages in thread
From: Tero Kristo @ 2014-05-05 12:22 UTC (permalink / raw)
  To: George Cherian, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA
  Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	richardcochran-Re5JQEeQqe8AvxtiuMwx3w,
	jeffrey.t.kirsher-ral2JQCrhuEAvxtiuMwx3w,
	dborkman-H+wXaHxf7aLQT0dZR+AlfA, ast-uqk4Ao+rVK5Wk0Htik3J/w,
	tklauser-93Khv+1bN0NyDzI6CaY1VQ, mpa-bIcnvbaLZ9MEGnE8C9+IrQ,
	bhutchings-s/n/eUQHGBpZroRs9YW3xA, zonque-Re5JQEeQqe8AvxtiuMwx3w,
	balbi-l0cyMroinI0, mugunthanvnm-l0cyMroinI0,
	mturquette-QSEj5FYQhm4dnm+yROfE0A, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	galak-sgV2jX0FEOL9JmXXK+q4OQ,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, mark.rutland-5wv7dgnIgG8,
	pawel.moll-5wv7dgnIgG8, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	tony-4v6yS6AI5VpBDgjK7y7TUQ, bcousson-rdvid1DuHRBWk0Htik3J/w

On 05/02/2014 09:32 AM, George Cherian wrote:
> cpsw_cpts_rft_clk has got the choice of 3 clocksources
>   -dpll_core_m4_ck
>   -dpll_core_m5_ck
>   -dpll_disp_m2_ck
>
> By default dpll_core_m4_ck is selected, witn this as clock
> source the CPTS doesnot work properly. It gives clockcheck errors
> while running PTP.
>
>   clockcheck: clock jumped backward or running slower than expected!
>
> By selecting dpll_core_m5_ck as the clocksource fixes this issue.
> In AM335x dpll_core_m5_ck is the default clocksource.
>
> Signed-off-by: George Cherian <george.cherian-l0cyMroinI0@public.gmane.org>

Acked-by: Tero Kristo <t-kristo-l0cyMroinI0@public.gmane.org>

> ---
>   drivers/clk/ti/clk-43xx.c | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
>
> diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c
> index 67c8de5..b4877e0 100644
> --- a/drivers/clk/ti/clk-43xx.c
> +++ b/drivers/clk/ti/clk-43xx.c
> @@ -110,9 +110,25 @@ static struct ti_dt_clk am43xx_clks[] = {
>
>   int __init am43xx_dt_clk_init(void)
>   {
> +	struct clk *clk1, *clk2;
> +
>   	ti_dt_clocks_register(am43xx_clks);
>
>   	omap2_clk_disable_autoidle_all();
>
> +	/*
> +	 * cpsw_cpts_rft_clk  has got the choice of 3 clocksources
> +	 * dpll_core_m4_ck, dpll_core_m5_ck and dpll_disp_m2_ck.
> +	 * By default dpll_core_m4_ck is selected, witn this as clock
> +	 * source the CPTS doesnot work properly. It gives clockcheck errors
> +	 * while running PTP.
> +	 * clockcheck: clock jumped backward or running slower than expected!
> +	 * By selecting dpll_core_m5_ck as the clocksource fixes this issue.
> +	 * In AM335x dpll_core_m5_ck is the default clocksource.
> +	 */
> +	clk1 = clk_get_sys(NULL, "cpsw_cpts_rft_clk");
> +	clk2 = clk_get_sys(NULL, "dpll_core_m5_ck");
> +	clk_set_parent(clk1, clk2);
> +
>   	return 0;
>   }
>

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH v2 5/6] ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk
@ 2014-05-05 12:22     ` Tero Kristo
  0 siblings, 0 replies; 37+ messages in thread
From: Tero Kristo @ 2014-05-05 12:22 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/02/2014 09:32 AM, George Cherian wrote:
> cpsw_cpts_rft_clk has got the choice of 3 clocksources
>   -dpll_core_m4_ck
>   -dpll_core_m5_ck
>   -dpll_disp_m2_ck
>
> By default dpll_core_m4_ck is selected, witn this as clock
> source the CPTS doesnot work properly. It gives clockcheck errors
> while running PTP.
>
>   clockcheck: clock jumped backward or running slower than expected!
>
> By selecting dpll_core_m5_ck as the clocksource fixes this issue.
> In AM335x dpll_core_m5_ck is the default clocksource.
>
> Signed-off-by: George Cherian <george.cherian@ti.com>

Acked-by: Tero Kristo <t-kristo@ti.com>

> ---
>   drivers/clk/ti/clk-43xx.c | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
>
> diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c
> index 67c8de5..b4877e0 100644
> --- a/drivers/clk/ti/clk-43xx.c
> +++ b/drivers/clk/ti/clk-43xx.c
> @@ -110,9 +110,25 @@ static struct ti_dt_clk am43xx_clks[] = {
>
>   int __init am43xx_dt_clk_init(void)
>   {
> +	struct clk *clk1, *clk2;
> +
>   	ti_dt_clocks_register(am43xx_clks);
>
>   	omap2_clk_disable_autoidle_all();
>
> +	/*
> +	 * cpsw_cpts_rft_clk  has got the choice of 3 clocksources
> +	 * dpll_core_m4_ck, dpll_core_m5_ck and dpll_disp_m2_ck.
> +	 * By default dpll_core_m4_ck is selected, witn this as clock
> +	 * source the CPTS doesnot work properly. It gives clockcheck errors
> +	 * while running PTP.
> +	 * clockcheck: clock jumped backward or running slower than expected!
> +	 * By selecting dpll_core_m5_ck as the clocksource fixes this issue.
> +	 * In AM335x dpll_core_m5_ck is the default clocksource.
> +	 */
> +	clk1 = clk_get_sys(NULL, "cpsw_cpts_rft_clk");
> +	clk2 = clk_get_sys(NULL, "dpll_core_m5_ck");
> +	clk_set_parent(clk1, clk2);
> +
>   	return 0;
>   }
>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH v2 0/6] Add CPTS support for AM437x
  2014-05-02  6:31 ` George Cherian
  (?)
@ 2014-05-05 14:22   ` Mugunthan V N
  -1 siblings, 0 replies; 37+ messages in thread
From: Mugunthan V N @ 2014-05-05 14:22 UTC (permalink / raw)
  To: George Cherian, netdev, linux-kernel, linux-arm-kernel,
	devicetree, linux-omap
  Cc: davem, richardcochran, jeffrey.t.kirsher, dborkman, ast,
	tklauser, mpa, bhutchings, zonque, balbi, t-kristo, mturquette,
	linux, galak, ijc+devicetree, mark.rutland, pawel.moll, robh+dt,
	tony, bcousson

On Friday 02 May 2014 12:01 PM, George Cherian wrote:
> The series adds CPTS support for AM4372.
>
> Patch 1 - DT changes w.r.t clock changes for AM33xx.
> Patch 2 - CPTS clock name harcoding in the driver is removed. 
> 	  Easier to pass the clock name from dt rather than hardcoding in driver.
> 	  Also in prepration for DRA7x CPTS support.
> Patch 3 - Enable the CPTS support for both DRA7x and AM4372 in the driver.
> Patch 4 - Enable the Annexe F for L2 PTP for AM437x and DRA7x.
> Patch 5 - Change the default clocksource to dpll_core_m5 
> Patch 6 - DT changes for AM4372.
>
>
> v1 -> v2
> 	Patch 1 and 2 Re-ordering.
> 	Seperate TS_BITS define for Hw version V2 and V3
>
> George Cherian (6):
>   ARM: dts: am33xx: Add clock names for cpsw and cpts
>   drivers: net: cpts: Remove hardcoded clock name for CPTS
>   drivers: net: cpsw: Enable CPTS for DRA7xx and AM4372
>   drivers: net: cpsw: Enable Annexe F Time sync
>   ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk
>   ARM: dts: am4372: Add clock names for cpsw and cpts
>
>  arch/arm/boot/dts/am33xx.dtsi  |  2 ++
>  arch/arm/boot/dts/am4372.dtsi  |  2 ++
>  drivers/clk/ti/clk-43xx.c      | 16 ++++++++++++
>  drivers/net/ethernet/ti/cpsw.c | 56 +++++++++++++++++++++++++++++++-----------
>  drivers/net/ethernet/ti/cpts.c | 11 +++------
>  5 files changed, 66 insertions(+), 21 deletions(-)
>

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

Regards
Mugunthan V N

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH v2 0/6] Add CPTS support for AM437x
@ 2014-05-05 14:22   ` Mugunthan V N
  0 siblings, 0 replies; 37+ messages in thread
From: Mugunthan V N @ 2014-05-05 14:22 UTC (permalink / raw)
  To: George Cherian, netdev, linux-kernel, linux-arm-kernel,
	devicetree, linux-omap
  Cc: davem, richardcochran, jeffrey.t.kirsher, dborkman, ast,
	tklauser, mpa, bhutchings, zonque, balbi, t-kristo, mturquette,
	linux, galak, ijc+devicetree, mark.rutland, pawel.moll, robh+dt,
	tony, bcousson

On Friday 02 May 2014 12:01 PM, George Cherian wrote:
> The series adds CPTS support for AM4372.
>
> Patch 1 - DT changes w.r.t clock changes for AM33xx.
> Patch 2 - CPTS clock name harcoding in the driver is removed. 
> 	  Easier to pass the clock name from dt rather than hardcoding in driver.
> 	  Also in prepration for DRA7x CPTS support.
> Patch 3 - Enable the CPTS support for both DRA7x and AM4372 in the driver.
> Patch 4 - Enable the Annexe F for L2 PTP for AM437x and DRA7x.
> Patch 5 - Change the default clocksource to dpll_core_m5 
> Patch 6 - DT changes for AM4372.
>
>
> v1 -> v2
> 	Patch 1 and 2 Re-ordering.
> 	Seperate TS_BITS define for Hw version V2 and V3
>
> George Cherian (6):
>   ARM: dts: am33xx: Add clock names for cpsw and cpts
>   drivers: net: cpts: Remove hardcoded clock name for CPTS
>   drivers: net: cpsw: Enable CPTS for DRA7xx and AM4372
>   drivers: net: cpsw: Enable Annexe F Time sync
>   ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk
>   ARM: dts: am4372: Add clock names for cpsw and cpts
>
>  arch/arm/boot/dts/am33xx.dtsi  |  2 ++
>  arch/arm/boot/dts/am4372.dtsi  |  2 ++
>  drivers/clk/ti/clk-43xx.c      | 16 ++++++++++++
>  drivers/net/ethernet/ti/cpsw.c | 56 +++++++++++++++++++++++++++++++-----------
>  drivers/net/ethernet/ti/cpts.c | 11 +++------
>  5 files changed, 66 insertions(+), 21 deletions(-)
>

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

Regards
Mugunthan V N

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH v2 0/6] Add CPTS support for AM437x
@ 2014-05-05 14:22   ` Mugunthan V N
  0 siblings, 0 replies; 37+ messages in thread
From: Mugunthan V N @ 2014-05-05 14:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 02 May 2014 12:01 PM, George Cherian wrote:
> The series adds CPTS support for AM4372.
>
> Patch 1 - DT changes w.r.t clock changes for AM33xx.
> Patch 2 - CPTS clock name harcoding in the driver is removed. 
> 	  Easier to pass the clock name from dt rather than hardcoding in driver.
> 	  Also in prepration for DRA7x CPTS support.
> Patch 3 - Enable the CPTS support for both DRA7x and AM4372 in the driver.
> Patch 4 - Enable the Annexe F for L2 PTP for AM437x and DRA7x.
> Patch 5 - Change the default clocksource to dpll_core_m5 
> Patch 6 - DT changes for AM4372.
>
>
> v1 -> v2
> 	Patch 1 and 2 Re-ordering.
> 	Seperate TS_BITS define for Hw version V2 and V3
>
> George Cherian (6):
>   ARM: dts: am33xx: Add clock names for cpsw and cpts
>   drivers: net: cpts: Remove hardcoded clock name for CPTS
>   drivers: net: cpsw: Enable CPTS for DRA7xx and AM4372
>   drivers: net: cpsw: Enable Annexe F Time sync
>   ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk
>   ARM: dts: am4372: Add clock names for cpsw and cpts
>
>  arch/arm/boot/dts/am33xx.dtsi  |  2 ++
>  arch/arm/boot/dts/am4372.dtsi  |  2 ++
>  drivers/clk/ti/clk-43xx.c      | 16 ++++++++++++
>  drivers/net/ethernet/ti/cpsw.c | 56 +++++++++++++++++++++++++++++++-----------
>  drivers/net/ethernet/ti/cpts.c | 11 +++------
>  5 files changed, 66 insertions(+), 21 deletions(-)
>

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

Regards
Mugunthan V N

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH v2 0/6] Add CPTS support for AM437x
  2014-05-02  6:31 ` George Cherian
@ 2014-05-05 17:19   ` David Miller
  -1 siblings, 0 replies; 37+ messages in thread
From: David Miller @ 2014-05-05 17:19 UTC (permalink / raw)
  To: george.cherian
  Cc: netdev, linux-kernel, linux-arm-kernel, devicetree, linux-omap,
	richardcochran, jeffrey.t.kirsher, dborkman, ast, tklauser, mpa,
	bhutchings, zonque, balbi, mugunthanvnm, t-kristo, mturquette,
	linux, galak, ijc+devicetree, mark.rutland, pawel.moll, robh+dt,
	tony, bcousson

From: George Cherian <george.cherian@ti.com>
Date: Fri, 2 May 2014 12:01:58 +0530

> The series adds CPTS support for AM4372.
> 
> Patch 1 - DT changes w.r.t clock changes for AM33xx.
> Patch 2 - CPTS clock name harcoding in the driver is removed. 
> 	  Easier to pass the clock name from dt rather than hardcoding in driver.
> 	  Also in prepration for DRA7x CPTS support.
> Patch 3 - Enable the CPTS support for both DRA7x and AM4372 in the driver.
> Patch 4 - Enable the Annexe F for L2 PTP for AM437x and DRA7x.
> Patch 5 - Change the default clocksource to dpll_core_m5 
> Patch 6 - DT changes for AM4372.
> 
> v1 -> v2
> 	Patch 1 and 2 Re-ordering.
> 	Seperate TS_BITS define for Hw version V2 and V3

Series applied, thanks.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH v2 0/6] Add CPTS support for AM437x
@ 2014-05-05 17:19   ` David Miller
  0 siblings, 0 replies; 37+ messages in thread
From: David Miller @ 2014-05-05 17:19 UTC (permalink / raw)
  To: linux-arm-kernel

From: George Cherian <george.cherian@ti.com>
Date: Fri, 2 May 2014 12:01:58 +0530

> The series adds CPTS support for AM4372.
> 
> Patch 1 - DT changes w.r.t clock changes for AM33xx.
> Patch 2 - CPTS clock name harcoding in the driver is removed. 
> 	  Easier to pass the clock name from dt rather than hardcoding in driver.
> 	  Also in prepration for DRA7x CPTS support.
> Patch 3 - Enable the CPTS support for both DRA7x and AM4372 in the driver.
> Patch 4 - Enable the Annexe F for L2 PTP for AM437x and DRA7x.
> Patch 5 - Change the default clocksource to dpll_core_m5 
> Patch 6 - DT changes for AM4372.
> 
> v1 -> v2
> 	Patch 1 and 2 Re-ordering.
> 	Seperate TS_BITS define for Hw version V2 and V3

Series applied, thanks.

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2014-05-05 17:19 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-02  6:31 [PATCH v2 0/6] Add CPTS support for AM437x George Cherian
2014-05-02  6:31 ` George Cherian
2014-05-02  6:31 ` George Cherian
2014-05-02  6:31 ` George Cherian
2014-05-02  6:31 ` [PATCH v2 1/6] ARM: dts: am33xx: Add clock names for cpsw and cpts George Cherian
2014-05-02  6:31   ` George Cherian
2014-05-02  6:31   ` George Cherian
2014-05-02  6:31   ` George Cherian
2014-05-02  6:32 ` [PATCH v2 2/6] drivers: net: cpts: Remove hardcoded clock name for CPTS George Cherian
2014-05-02  6:32   ` George Cherian
2014-05-02  6:32   ` George Cherian
2014-05-02  6:32 ` [PATCH v2 3/6] drivers: net: cpsw: Enable CPTS for DRA7xx and AM4372 George Cherian
2014-05-02  6:32   ` George Cherian
2014-05-02  6:32   ` George Cherian
2014-05-02  6:32 ` [PATCH v2 4/6] drivers: net: cpsw: Enable Annexe F Time sync George Cherian
2014-05-02  6:32   ` George Cherian
2014-05-02  6:32   ` George Cherian
2014-05-02  6:32   ` George Cherian
2014-05-02  6:32 ` [PATCH v2 5/6] ARM: AM43xx: clk: Change the cpts ref clock source to dpll_core_m5 clk George Cherian
2014-05-02  6:32   ` George Cherian
2014-05-02  6:32   ` George Cherian
2014-05-02  6:32   ` George Cherian
2014-05-05 12:22   ` Tero Kristo
2014-05-05 12:22     ` Tero Kristo
2014-05-05 12:22     ` Tero Kristo
2014-05-05 12:22     ` Tero Kristo
2014-05-02  6:32 ` [PATCH v2 6/6] ARM: dts: am4372: Add clock names for cpsw and cpts George Cherian
2014-05-02  6:32   ` George Cherian
2014-05-02  6:32   ` George Cherian
2014-05-02  6:32   ` George Cherian
2014-05-04 16:24 ` [PATCH v2 0/6] Add CPTS support for AM437x Richard Cochran
2014-05-04 16:24   ` Richard Cochran
2014-05-05 14:22 ` Mugunthan V N
2014-05-05 14:22   ` Mugunthan V N
2014-05-05 14:22   ` Mugunthan V N
2014-05-05 17:19 ` David Miller
2014-05-05 17:19   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.