Skip to contentSkip to conversation

clk: tegra: Make sor_safe the parent of dpaux and dpaux1

PATCH In review Thierry Reding 3 participants 6 messages Jun 23, 2016

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

PATCH 1/2 clk: tegra: Make sor_safe the parent of dpaux and dpaux1

From: Thierry Reding <[email protected]>

It turns out that sor_safe, rather than pll_p, is the parent of the dpaux and dpaux1 clocks.

---
 drivers/clk/tegra/clk-tegra210.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/tegra/clk-tegra210.c +2 -2
index aab32af77aa2..fe295b4102ca 100644
@@ -2466,11 +2466,11 @@ static __init void tegra210_periph_clk_init(void __iomem *clk_base,
 					1, 2);
 	clks[TEGRA210_CLK_XUSB_SS_DIV2] = clk;
 
-	clk = tegra_clk_register_periph_fixed("dpaux", "pll_p", 0, clk_base,
+	clk = tegra_clk_register_periph_fixed("dpaux", "sor_safe", 0, clk_base,
 					      1, 17, 181);
 	clks[TEGRA210_CLK_DPAUX] = clk;
 
-	clk = tegra_clk_register_periph_fixed("dpaux1", "pll_p", 0, clk_base,
+	clk = tegra_clk_register_periph_fixed("dpaux1", "sor_safe", 0, clk_base,
 					      1, 17, 207);
 	clks[TEGRA210_CLK_DPAUX1] = clk;
 
Signature · 1 line
2.8.3
#1 lore raw

PATCH 2/2 clk: tegra: Micro-optimize Tegra210 clock setup

From: Thierry Reding <[email protected]>

sor_safe being the parent of the dpaux and dpaux1 clocks, it's not only natural, but also slightly more efficient, to initialize it before its children. This avoids orphaning the dpaux and dpaux1 clocks only to get them reparented when the sor_safe clock is registered.

---
 drivers/clk/tegra/clk-tegra210.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/clk/tegra/clk-tegra210.c +4 -4
index fe295b4102ca..b4df5c46642f 100644
@@ -2466,6 +2466,10 @@ static __init void tegra210_periph_clk_init(void __iomem *clk_base,
 					1, 2);
 	clks[TEGRA210_CLK_XUSB_SS_DIV2] = clk;
 
+	clk = tegra_clk_register_periph_fixed("sor_safe", "pll_p", 0, clk_base,
+					      1, 17, 222);
+	clks[TEGRA210_CLK_SOR_SAFE] = clk;
+
 	clk = tegra_clk_register_periph_fixed("dpaux", "sor_safe", 0, clk_base,
 					      1, 17, 181);
 	clks[TEGRA210_CLK_DPAUX] = clk;
@@ -2474,10 +2478,6 @@ static __init void tegra210_periph_clk_init(void __iomem *clk_base,
 					      1, 17, 207);
 	clks[TEGRA210_CLK_DPAUX1] = clk;
 
-	clk = tegra_clk_register_periph_fixed("sor_safe", "pll_p", 0, clk_base,
-					      1, 17, 222);
-	clks[TEGRA210_CLK_SOR_SAFE] = clk;
-
 	/* pll_d_dsi_out */
 	clk = clk_register_gate(NULL, "pll_d_dsi_out", "pll_d_out0", 0,
 				clk_base + PLLD_MISC0, 21, 0, &pll_d_lock);
Signature · 1 line
2.8.3
maintainer Acked-by Tested-by on v1 1/2
#4 lore raw
In reply to Thierry Reding
Quoted 17 lines · Thierry Reding

From: Thierry Reding <[email protected]>

It turns out that sor_safe, rather than pll_p, is the parent of the dpaux and dpaux1 clocks.

---
 drivers/clk/tegra/clk-tegra210.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/tegra/clk-tegra210.c +0 -0
index aab32af77aa2..fe295b4102ca 100644
@@ -2466,11 +2466,11 @@ static __init void tegra210_periph_clk_init(void __iomem *clk_base,
 					1, 2);
 	clks[TEGRA210_CLK_XUSB_SS_DIV2] = clk;

drivers/clk/tegra/clk-tegra210.c static __init void tegra210_periph_clk_init(void __iomem *clk_base, · line 2475

Quoted 10 lines
drivers/clk/tegra/clk-tegra210.c +2 -2
 
-	clk = tegra_clk_register_periph_fixed("dpaux", "pll_p", 0, clk_base,
+	clk = tegra_clk_register_periph_fixed("dpaux", "sor_safe", 0, clk_base,
 					      1, 17, 181);
 	clks[TEGRA210_CLK_DPAUX] = clk;
 
-	clk = tegra_clk_register_periph_fixed("dpaux1", "pll_p", 0, clk_base,
+	clk = tegra_clk_register_periph_fixed("dpaux1", "sor_safe", 0, clk_base,
 					      1, 17, 207);
 	clks[TEGRA210_CLK_DPAUX1] = clk;

Cheers
Jon

Signature · 1 line
nvpublic
maintainer Acked-by Tested-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] clk: tegra: Micro-optimize Tegra210 clock setup

In reply to Thierry Reding
Quoted 29 lines · Thierry Reding

From: Thierry Reding <[email protected]>

sor_safe being the parent of the dpaux and dpaux1 clocks, it's not only natural, but also slightly more efficient, to initialize it before its children. This avoids orphaning the dpaux and dpaux1 clocks only to get them reparented when the sor_safe clock is registered.

---
 drivers/clk/tegra/clk-tegra210.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/clk/tegra/clk-tegra210.c +4 -0
index fe295b4102ca..b4df5c46642f 100644
@@ -2466,6 +2466,10 @@ static __init void tegra210_periph_clk_init(void __iomem *clk_base,
 					1, 2);
 	clks[TEGRA210_CLK_XUSB_SS_DIV2] = clk;
 
+	clk = tegra_clk_register_periph_fixed("sor_safe", "pll_p", 0, clk_base,
+					      1, 17, 222);
+	clks[TEGRA210_CLK_SOR_SAFE] = clk;
+
 	clk = tegra_clk_register_periph_fixed("dpaux", "sor_safe", 0, clk_base,
 					      1, 17, 181);
 	clks[TEGRA210_CLK_DPAUX] = clk;

drivers/clk/tegra/clk-tegra210.c static __init void tegra210_periph_clk_init(void __iomem *clk_base, · line 2483

Quoted 10 lines
drivers/clk/tegra/clk-tegra210.c +0 -4
@@ -2474,10 +2478,6 @@ static __init void tegra210_periph_clk_init(void __iomem *clk_base,
 					      1, 17, 207);
 	clks[TEGRA210_CLK_DPAUX1] = clk;
 
-	clk = tegra_clk_register_periph_fixed("sor_safe", "pll_p", 0, clk_base,
-					      1, 17, 222);
-	clks[TEGRA210_CLK_SOR_SAFE] = clk;
-
 	/* pll_d_dsi_out */
 	clk = clk_register_gate(NULL, "pll_d_dsi_out", "pll_d_out0", 0,
 				clk_base + PLLD_MISC0, 21, 0, &pll_d_lock);

Cheers
Jon

Signature · 1 line
nvpublic
Acked-by on v1 1/2
#5 lore raw
In reply to Thierry Reding
Quoted 19 lines · Thierry Reding

From: Thierry Reding <[email protected]>

It turns out that sor_safe, rather than pll_p, is the parent of the dpaux and dpaux1 clocks.

---
 drivers/clk/tegra/clk-tegra210.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/tegra/clk-tegra210.c +0 -0
index aab32af77aa2..fe295b4102ca 100644
@@ -2466,11 +2466,11 @@ static __init void tegra210_periph_clk_init(void __iomem *clk_base,
 					1, 2);
 	clks[TEGRA210_CLK_XUSB_SS_DIV2] = clk;
 

drivers/clk/tegra/clk-tegra210.c static __init void tegra210_periph_clk_init(void __iomem *clk_base, · line 2476

Quoted 10 lines
drivers/clk/tegra/clk-tegra210.c +2 -2
-	clk = tegra_clk_register_periph_fixed("dpaux", "pll_p", 0, clk_base,
+	clk = tegra_clk_register_periph_fixed("dpaux", "sor_safe", 0, clk_base,
 					      1, 17, 181);
 	clks[TEGRA210_CLK_DPAUX] = clk;
 
-	clk = tegra_clk_register_periph_fixed("dpaux1", "pll_p", 0, clk_base,
+	clk = tegra_clk_register_periph_fixed("dpaux1", "sor_safe", 0, clk_base,
 					      1, 17, 207);
 	clks[TEGRA210_CLK_DPAUX1] = clk;
 
Signature · 1 line
nvpublic
Acked-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] clk: tegra: Micro-optimize Tegra210 clock setup

In reply to Thierry Reding
Quoted 29 lines · Thierry Reding

From: Thierry Reding <[email protected]>

sor_safe being the parent of the dpaux and dpaux1 clocks, it's not only natural, but also slightly more efficient, to initialize it before its children. This avoids orphaning the dpaux and dpaux1 clocks only to get them reparented when the sor_safe clock is registered.

---
 drivers/clk/tegra/clk-tegra210.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/clk/tegra/clk-tegra210.c +4 -0
index fe295b4102ca..b4df5c46642f 100644
@@ -2466,6 +2466,10 @@ static __init void tegra210_periph_clk_init(void __iomem *clk_base,
 					1, 2);
 	clks[TEGRA210_CLK_XUSB_SS_DIV2] = clk;
 
+	clk = tegra_clk_register_periph_fixed("sor_safe", "pll_p", 0, clk_base,
+					      1, 17, 222);
+	clks[TEGRA210_CLK_SOR_SAFE] = clk;
+
 	clk = tegra_clk_register_periph_fixed("dpaux", "sor_safe", 0, clk_base,
 					      1, 17, 181);
 	clks[TEGRA210_CLK_DPAUX] = clk;

drivers/clk/tegra/clk-tegra210.c static __init void tegra210_periph_clk_init(void __iomem *clk_base, · line 2483

Quoted 10 lines
drivers/clk/tegra/clk-tegra210.c +0 -4
@@ -2474,10 +2478,6 @@ static __init void tegra210_periph_clk_init(void __iomem *clk_base,
 					      1, 17, 207);
 	clks[TEGRA210_CLK_DPAUX1] = clk;
 
-	clk = tegra_clk_register_periph_fixed("sor_safe", "pll_p", 0, clk_base,
-					      1, 17, 222);
-	clks[TEGRA210_CLK_SOR_SAFE] = clk;
-
 	/* pll_d_dsi_out */
 	clk = clk_register_gate(NULL, "pll_d_dsi_out", "pll_d_out0", 0,
 				clk_base + PLLD_MISC0, 21, 0, &pll_d_lock);
Signature · 1 line
nvpublic