Skip to contentSkip to conversation

clk: mediatek: add missing ethernet reset definition

PATCH New John Crispin 2 participants 8 messages Jan 23, 2017 – Apr 22, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover clk: mediatek: add missing ethernet reset definition

When the clk code for mt2701 was merged, we forgot to add the reset controller of the ethernet subsystem. This series adds the missing code and header files required to reference the bits from within a devicetree file.

John Crispin (2):
clk: mediatek: add mt2701 ethernet reset
reset: mediatek: Add MT2701 ethsys reset controller include file

 drivers/clk/mediatek/clk-mt2701-eth.c     |    2 ++
 include/dt-bindings/reset/mt2701-resets.h |    7 +++++++
 2 files changed, 9 insertions(+)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/2 clk: mediatek: add mt2701 ethernet reset

The ethernet clock core has a reset register that is currently not exposed to the user. Fix this by adding the missing registration code.

---
 drivers/clk/mediatek/clk-mt2701-eth.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/clk/mediatek/clk-mt2701-eth.c +2 -0
index 877be87..9251a65 100644
@@ -66,6 +66,8 @@ static int clk_mt2701_eth_probe(struct platform_device *pdev)
 			"could not register clock provider: %s: %d\n",
 			pdev->name, r);
 
+	mtk_register_reset_controller(node, 1, 0x34);
+
 	return r;
 }
 
Signature · 1 line
1.7.10.4
Applied
#2 lore raw

PATCH 1/2 clk: mediatek: add mt2701 ethernet reset

Quoted 5 lines · John Crispin

The ethernet clock core has a reset register that is currently not exposed to the user. Fix this by adding the missing registration code.

---

Applied to clk-next

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
#3 lore raw

PATCH 2/2 reset: mediatek: Add MT2701 ethsys reset controller include file

In reply to John Crispin

Add the missing reset bits of the ethsys core to the mt2701-reset include file, so that we can reference them from within a devicetree file.

---
 include/dt-bindings/reset/mt2701-resets.h |    7 +++++++
 1 file changed, 7 insertions(+)
include/dt-bindings/reset/mt2701-resets.h +7 -0
index aaf0305..21deb54 100644
@@ -80,4 +80,11 @@
 #define MT2701_HIFSYS_PCIE1_RST			25
 #define MT2701_HIFSYS_PCIE2_RST			26
 
+/* ETHSYS resets */
+#define MT2701_ETHSYS_SYS_RST			0
+#define MT2701_ETHSYS_MCM_RST			2
+#define MT2701_ETHSYS_FE_RST			6
+#define MT2701_ETHSYS_GMAC_RST			23
+#define MT2701_ETHSYS_PPE_RST			31
+
 #endif  /* _DT_BINDINGS_RESET_CONTROLLER_MT2701 */
Signature · 1 line
1.7.10.4
#4 lore raw

cover clk: mediatek: add missing ethernet reset definition

In reply to John Crispin
Quoted 11 lines · John Crispin

When the clk code for mt2701 was merged, we forgot to add the reset controller of the ethernet subsystem. This series adds the missing code and header files required to reference the bits from within a devicetree file.

John Crispin (2):
clk: mediatek: add mt2701 ethernet reset
reset: mediatek: Add MT2701 ethsys reset controller include file

 drivers/clk/mediatek/clk-mt2701-eth.c     |    2 ++
 include/dt-bindings/reset/mt2701-resets.h |    7 +++++++

Any planned DT users in the next merge window? Should I put this into a topic branch? Do you want a clk maintainer ack? At the least we need someone like James to ack this first.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
#5 lore raw

cover clk: mediatek: add missing ethernet reset definition

Quoted 10 lines · Stephen Boyd
Quoted 9 lines · John Crispin

When the clk code for mt2701 was merged, we forgot to add the reset controller of the ethernet subsystem. This series adds the missing code and header files required to reference the bits from within a devicetree file.

John Crispin (2):
clk: mediatek: add mt2701 ethernet reset
reset: mediatek: Add MT2701 ethsys reset controller include file

Quoted 7 lines
Quoted 2 lines
 drivers/clk/mediatek/clk-mt2701-eth.c     |    2 ++
 include/dt-bindings/reset/mt2701-resets.h |    7 +++++++

Any planned DT users in the next merge window? Should I put this into a topic branch? Do you want a clk maintainer ack? At the least we need someone like James to ack this first.

Hi Stephen,

the addition of the dtsi snippets for the ethernet core is pending due to this patch. getting it into v4.11 would be geat so that i can sent dtsi changes during the next merge window.

John

#6 lore raw

cover clk: mediatek: add missing ethernet reset definition

Quoted 21 lines · John Crispin
Quoted 10 lines · Stephen Boyd
Quoted 9 lines · John Crispin

When the clk code for mt2701 was merged, we forgot to add the reset controller of the ethernet subsystem. This series adds the missing code and header files required to reference the bits from within a devicetree file.

John Crispin (2):
clk: mediatek: add mt2701 ethernet reset
reset: mediatek: Add MT2701 ethsys reset controller include file

Quoted 7 lines
Quoted 2 lines
 drivers/clk/mediatek/clk-mt2701-eth.c     |    2 ++
 include/dt-bindings/reset/mt2701-resets.h |    7 +++++++

Any planned DT users in the next merge window? Should I put this into a topic branch? Do you want a clk maintainer ack? At the least we need someone like James to ack this first.

Quoted 6 lines

Hi Stephen,

the addition of the dtsi snippets for the ethernet core is pending due to this patch. getting it into v4.11 would be geat so that i can sent dtsi changes during the next merge window.

Sorry, I never saw anything from anyone @mediatek so I never did anything here. I suppose I'll just go and apply this to clk-next now and then v4.13 can get the ethernet patches?

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
#7 lore raw

cover clk: mediatek: add missing ethernet reset definition

Quoted 21 lines · Stephen Boyd
Quoted 20 lines · John Crispin
Quoted 10 lines · Stephen Boyd
Quoted 9 lines · John Crispin

When the clk code for mt2701 was merged, we forgot to add the reset controller of the ethernet subsystem. This series adds the missing code and header files required to reference the bits from within a devicetree file.

John Crispin (2):
clk: mediatek: add mt2701 ethernet reset
reset: mediatek: Add MT2701 ethsys reset controller include file

Quoted 6 lines
Quoted 2 lines
  drivers/clk/mediatek/clk-mt2701-eth.c     |    2 ++
  include/dt-bindings/reset/mt2701-resets.h |    7 +++++++

Any planned DT users in the next merge window? Should I put this into a topic branch? Do you want a clk maintainer ack? At the least we need someone like James to ack this first.

Hi Stephen,

Quoted 8 lines
Quoted 4 lines

the addition of the dtsi snippets for the ethernet core is pending due to this patch. getting it into v4.11 would be geat so that i can sent dtsi changes during the next merge window.

Sorry, I never saw anything from anyone @mediatek so I never did anything here. I suppose I'll just go and apply this to clk-next now and then v4.13 can get the ethernet patches?

Hi Stephen,

sounds like a plan. i'll add the series to my local pending tree and resend stuff during the next merge window if it was not merged by then.

John