Skip to contentSkip to conversation

clk: tegra: fix blink clock rate

PATCH New Stephen Warren 3 participants 10 messages Nov 20, 2013 – Dec 2, 2013

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

PATCH 1/5 clk: tegra: fix blink clock rate

From: Stephen Warren <[email protected]>

The blink clock rate needs to be configured, or it will run at ~1Hz rather than the desired 32KHz. If it runs at the wrong rate, e.g. the SDIO WiFi on Seaboard and Cardhu will fail to be detected.

---
This probably needs to be squashed into commit 32721a734a3d "clk: tegra:
move PMC, fixed clocks to common files".

---
 drivers/clk/tegra/clk-tegra-pmc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/tegra/clk-tegra-pmc.c +1 -0
index 00e8275a7178..08b21c1ee867 100644
@@ -114,6 +114,7 @@ void __init tegra_pmc_clk_init(void __iomem *pmc_base,
 	}
 
 	/* blink */
+	writel_relaxed(0, pmc_base + PMC_BLINK_TIMER);
 	clk = clk_register_gate(NULL, "blink_override", "clk_32k", 0,
 				pmc_base + PMC_DPD_PADS_ORIDE,
 				PMC_DPD_PADS_ORIDE_BLINK_ENB, 0, NULL);
Signature · 1 line
1.8.1.5
#1 lore raw

PATCH 2/5 clk: tegra: remove some redundant defines from Tegra114

From: Stephen Warren <[email protected]>

These #defines aren't used. Delete them.

---
This probably should be squashed into commit 32721a734a3d "clk: tegra:
move PMC, fixed clocks to common files".

---
 drivers/clk/tegra/clk-tegra114.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/clk/tegra/clk-tegra114.c +0 -7
index 9036a22ee5aa..70bfefebcca5 100644
@@ -107,13 +107,6 @@
 #define PLLC_OUT 0x84
 #define PLLM_OUT 0x94
 
-#define PMC_CLK_OUT_CNTRL 0x1a8
-#define PMC_DPD_PADS_ORIDE 0x1c
-#define PMC_DPD_PADS_ORIDE_BLINK_ENB 20
-#define PMC_CTRL 0
-#define PMC_CTRL_BLINK_ENB 7
-#define PMC_BLINK_TIMER 0x40
-
 #define OSC_CTRL			0x50
 #define OSC_CTRL_OSC_FREQ_SHIFT		28
 #define OSC_CTRL_PLL_REF_DIV_SHIFT	26
Signature · 1 line
1.8.1.5
#2 lore raw

PATCH 3/5 clk: tegra: remove some redundant defines from Tegra30

In reply to Stephen Warren

From: Stephen Warren <[email protected]>

These #defines aren't used. Delete them.

---
This probably should be squashed into commit ba2e2e8f2c55 "clk: tegra:
move tegra30 to common infra".

---
 drivers/clk/tegra/clk-tegra30.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/clk/tegra/clk-tegra30.c +0 -7
index 51c093c96657..92c46f1fb5d1 100644
@@ -118,13 +118,6 @@
 
 #define AUDIO_SYNC_DOUBLER 0x49c
 
-#define PMC_CTRL 0
-#define PMC_CTRL_BLINK_ENB 7
-
-#define PMC_DPD_PADS_ORIDE 0x1c
-#define PMC_DPD_PADS_ORIDE_BLINK_ENB 20
-#define PMC_BLINK_TIMER 0x40
-
 #define UTMIP_PLL_CFG2 0x488
 #define UTMIP_PLL_CFG2_STABLE_COUNT(x) (((x) & 0xffff) << 6)
 #define UTMIP_PLL_CFG2_ACTIVE_DLY_COUNT(x) (((x) & 0x3f) << 18)
Signature · 1 line
1.8.1.5
#3 lore raw

PATCH 4/5 clk: tegra: remove some redunant defines from Tegra20

In reply to Stephen Warren

From: Stephen Warren <[email protected]>

These #defines aren't used. Delete them.

---
This probably should be squashed into commit 776b2c0ba0dd "clk: tegra:
move tegra20 to common infra".

---
 drivers/clk/tegra/clk-tegra20.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/clk/tegra/clk-tegra20.c +0 -6
index 58faac5f509e..be5bdbab78a6 100644
@@ -118,12 +118,6 @@
 
 #define AUDIO_SYNC_CLK 0x38
 
-#define PMC_CTRL 0x0
-#define PMC_CTRL_BLINK_ENB 7
-#define PMC_DPD_PADS_ORIDE 0x1c
-#define PMC_DPD_PADS_ORIDE_BLINK_ENB 20
-#define PMC_BLINK_TIMER 0x40
-
 /* Tegra CPU clock and reset control regs */
 #define TEGRA_CLK_RST_CONTROLLER_CLK_CPU_CMPLX		0x4c
 #define TEGRA_CLK_RST_CONTROLLER_RST_CPU_CMPLX_SET	0x340
Signature · 1 line
1.8.1.5
#4 lore raw

PATCH 5/5 clk: tegra: remove some redundant defines from Tegra124

In reply to Stephen Warren

From: Stephen Warren <[email protected]>

These #defines aren't used. Delete them.

---
This probably should be squashed into commit 8a0fc8917eef "clk: tegra124:
Add support for Tegra124 clocks".

---
 drivers/clk/tegra/clk-tegra124.c | 2 --
 1 file changed, 2 deletions(-)
drivers/clk/tegra/clk-tegra124.c +0 -2
index 266e80b51d38..623fbf35ee08 100644
@@ -84,8 +84,6 @@
 
 #define PLLXC_SW_MAX_P 6
 
-#define PMC_BLINK_TIMER 0x40
-
 #define PMC_PLLM_WB0_OVERRIDE 0x1dc
 #define PMC_PLLM_WB0_OVERRIDE_2 0x2b0
 
Signature · 1 line
1.8.1.5
#5 lore raw

PATCH 1/5 clk: tegra: fix blink clock rate

In reply to Stephen Warren
Quoted 11 lines · Stephen Warren

From: Stephen Warren <[email protected]>

The blink clock rate needs to be configured, or it will run at ~1Hz rather than the desired 32KHz. If it runs at the wrong rate, e.g. the SDIO WiFi on Seaboard and Cardhu will fail to be detected.

---
This probably needs to be squashed into commit 32721a734a3d "clk: tegra:
move PMC, fixed clocks to common files".
---

I will squash this into the mentioned commit.

Cheers,

Peter.

#6 lore raw

PATCH 1/5 clk: tegra: fix blink clock rate

In reply to Stephen Warren
Quoted 5 lines · Stephen Warren

From: Stephen Warren <[email protected]>

The blink clock rate needs to be configured, or it will run at ~1Hz rather than the desired 32KHz. If it runs at the wrong rate, e.g. the SDIO WiFi on Seaboard and Cardhu will fail to be detected.

How is this related to WiFi?

Quoted 14 lines

---
This probably needs to be squashed into commit 32721a734a3d "clk: tegra:
move PMC, fixed clocks to common files".

---
 drivers/clk/tegra/clk-tegra-pmc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/tegra/clk-tegra-pmc.c +0 -0
index 00e8275a7178..08b21c1ee867 100644

drivers/clk/tegra/clk-tegra-pmc.c void __init tegra_pmc_clk_init(void __iomem *pmc_base, · line 120

Quoted 7 lines
drivers/clk/tegra/clk-tegra-pmc.c +1 -0
@@ -114,6 +114,7 @@ void __init tegra_pmc_clk_init(void __iomem *pmc_base,
 	}
 
 	/* blink */
+	writel_relaxed(0, pmc_base + PMC_BLINK_TIMER);
 	clk = clk_register_gate(NULL, "blink_override", "clk_32k", 0,
 				pmc_base + PMC_DPD_PADS_ORIDE,
 				PMC_DPD_PADS_ORIDE_BLINK_ENB, 0, NULL);

Perhaps a better location would be a few lines below, where the "blink" clock is registered, since this actually controls the "blink" clock rather than "blink_override". But either way:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131129/98f2f3f7/attachment.sig>

#7 lore raw

PATCH 1/5 clk: tegra: fix blink clock rate

Quoted 25 lines · Thierry Reding
Quoted 5 lines · Stephen Warren

From: Stephen Warren <[email protected]>

The blink clock rate needs to be configured, or it will run at ~1Hz rather than the desired 32KHz. If it runs at the wrong rate, e.g. the SDIO WiFi on Seaboard and Cardhu will fail to be detected.

How is this related to WiFi?

Quoted 16 lines

---
This probably needs to be squashed into commit 32721a734a3d "clk: tegra:
move PMC, fixed clocks to common files".

---
 drivers/clk/tegra/clk-tegra-pmc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/tegra/clk-tegra-pmc.c +0 -0
index 00e8275a7178..08b21c1ee867 100644
@@ -114,6 +114,7 @@ void __init tegra_pmc_clk_init(void __iomem *pmc_base,
 	}
 
Quoted 9 lines

drivers/clk/tegra/clk-tegra-pmc.c void __init tegra_pmc_clk_init(void __iomem *pmc_base, · line 120

Quoted 5 lines
drivers/clk/tegra/clk-tegra-pmc.c +1 -0
 	/* blink */
+	writel_relaxed(0, pmc_base + PMC_BLINK_TIMER);
 	clk = clk_register_gate(NULL, "blink_override", "clk_32k", 0,
 				pmc_base + PMC_DPD_PADS_ORIDE,
 				PMC_DPD_PADS_ORIDE_BLINK_ENB, 0, NULL);

Perhaps a better location would be a few lines below, where the "blink" clock is registered, since this actually controls the "blink" clock rather than "blink_override". But either way:

Just realized that Peter already squashed all of these into his -next branch, so nevermind.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131129/81f676eb/attachment.sig>

#8 lore raw

PATCH 1/5 clk: tegra: fix blink clock rate

In reply to Thierry Reding
Quoted 9 lines · Thierry Reding
Quoted 6 lines · Stephen Warren

From: Stephen Warren <[email protected]>

The blink clock rate needs to be configured, or it will run at ~1Hz rather than the desired 32KHz. If it runs at the wrong rate, e.g. the SDIO WiFi on Seaboard and Cardhu will fail to be detected.

How is this related to WiFi?

The "blink" clock output from Tegra is connected to the WiFi module, which then uses it for something; it probably has a PLL connected to it that drives all the internal circuitry.

#9 lore raw

PATCH 1/5 clk: tegra: fix blink clock rate

Quoted 9 lines · Stephen Warren
Quoted 8 lines · Thierry Reding
Quoted 6 lines · Stephen Warren

From: Stephen Warren <[email protected]>

The blink clock rate needs to be configured, or it will run at ~1Hz rather than the desired 32KHz. If it runs at the wrong rate, e.g. the SDIO WiFi on Seaboard and Cardhu will fail to be detected.

Quoted 5 lines
Quoted 1 line

How is this related to WiFi?

The "blink" clock output from Tegra is connected to the WiFi module, which then uses it for something; it probably has a PLL connected to it that drives all the internal circuitry.

Okay, thanks for explaining.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131202/cfb91343/attachment.sig>