OMAP1 clock: Add missing clocks for OMAP 7xx
Paul Walmsley
maintainerPATCH 1/1 OMAP1 clock: Add missing clocks for OMAP 7xx
From: Cory Maccarrone <[email protected]>
This change adds in some missing clocks that were needed as a result of 526505... (OMAP1 clock: convert mach-omap1/clock.h to mach-omap1/clock_data.c). Prior to this, it was just assumed that these clocks existed for all devices, and it was used directly instead of calling it out with a clock_get call or similar. So, not having the CK_7XX meant these clocks weren't being used anymore for omap 7xx devices, which broke things badly.
--- arch/arm/mach-omap1/clock_data.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap1/clock_data.c +2 -2
@@ -599,7 +599,7 @@ static struct clk i2c_ick = {static struct omap_clk omap_clks[] = {/* non-ULPD clocks */ CLK (NULL ,"ck_ref" , &ck_ref,CK_16XX |CK_1510 |CK_310 |CK_7XX ), -CLK (NULL ,"ck_dpll1" , &ck_dpll1,CK_16XX |CK_1510 |CK_310 ), +CLK (NULL ,"ck_dpll1" , &ck_dpll1,CK_16XX |CK_1510 |CK_310 |CK_7XX ),/* CK_GEN1 clocks */ CLK (NULL ,"ck_dpll1out" , &ck_dpll1out.clk,CK_16XX ),CLK (NULL ,"ck_sossi" , &sossi_ck,CK_16XX ),
@@ -627,7 +627,7 @@ static struct omap_clk omap_clks[] = {CLK (NULL ,"tc2_ck" , &tc2_ck,CK_16XX ),CLK (NULL ,"dma_ck" , &dma_ck,CK_16XX |CK_1510 |CK_310 ),CLK (NULL ,"dma_lcdfree_ck" , &dma_lcdfree_ck,CK_16XX ), -CLK (NULL ,"api_ck" , &api_ck.clk,CK_16XX |CK_1510 |CK_310 ), +CLK (NULL ,"api_ck" , &api_ck.clk,CK_16XX |CK_1510 |CK_310 |CK_7XX ),CLK (NULL ,"lb_ck" , &lb_ck.clk,CK_1510 |CK_310 ),CLK (NULL ,"rhea1_ck" , &rhea1_ck,CK_16XX ), CLK(NULL, "rhea2_ck", &rhea2_ck, CK_16XX),
Signature · 1 line
1.6.6.rc2.5.g49666
PATCH 1/1 OMAP1 clock: Add missing clocks for OMAP 7xx
Quoted 41 lines · Paul Walmsley
From: Cory Maccarrone <[email protected]>
This change adds in some missing clocks that were needed as a result of 526505... (OMAP1 clock: convert
mach-omap1/clock.htomach-omap1/clock_data.c). ?Prior to this, it was just assumed that these clocks existed for all devices, and it was used directly instead of calling it out with aclock_getcall or similar. ?So, not having theCK_7XXmeant these clocks weren't being used anymore for omap 7xx devices, which broke things badly.Signed-off-by Cory Maccarrone <[email protected]>[paul at pwsan.com: commit message edited]Signed-off-by Paul Walmsley <[email protected]>---
?arch/arm/mach-omap1/clock_data.c | ? ?4 ++--
?1 files changed, 2 insertions(+), 2 deletions(-)arch/arm/mach-omap1/clock_data.c +0
-0@@ -599,7 +599,7 @@ static struct clk i2c_ick = { ?static struct omap_clk omap_clks[] = {? ? ? ?/* non-ULPD clocks */
? ? ? ?CLK(NULL, ? ? ? "ck_ref", ? ? ?&ck_ref, ? ? ? ?CK_16XX |CK_1510|CK_310|CK_7XX),- ? ? ? CLK(NULL, ? ? ? "ck_dpll1", ? ? &ck_dpll1, ? ? ?CK_16XX | CK_1510 | CK_310), + ? ? ? CLK(NULL, ? ? ? "ck_dpll1", ? ? &ck_dpll1, ? ? ?CK_16XX | CK_1510 | CK_310 | CK_7XX),? ? ? ?/*
CK_GEN1clocks */
? ? ? ?CLK(NULL, ? ? ? "ck_dpll1out", ?&ck_dpll1out.clk,CK_16XX), ? ? ? ?CLK(NULL, ? ? ? "ck_sossi", ? ?&sossi_ck, ? ? ?CK_16XX),arch/arm/mach-omap1/clock_data.c +1
-2@@ -627,7 +627,7 @@ static struct omap_clk omap_clks[] = { ? ? ? ?CLK(NULL, ? ? ? "tc2_ck", ? ? ? &tc2_ck, ? ? ? ?CK_16XX), ? ? ? ?CLK(NULL, ? ? ? "dma_ck", ? ? ? &dma_ck, ? ? ? ?CK_16XX | CK_1510 | CK_310), ? ? ? ?CLK(NULL, ? ? ? "dma_lcdfree_ck", &dma_lcdfree_ck, CK_16XX), - ? ? ? CLK(NULL, ? ? ? "api_ck", ? ? ? &api_ck.clk, ? ?CK_16XX | CK_1510 | CK_310), + ? ? ? CLK(NULL, ? ? ? "api_ck", ? ? ? &api_ck.clk, ? ?CK_16XX | CK_1510 | CK_310 | CK_7XX), ? ? ? ?CLK(NULL, ? ? ? "lb_ck", ? ? ? ?&lb_ck.clk, ? ? CK_1510 | CK_310), ? ? ? ?CLK(NULL, ? ? ? "rhea1_ck", ? ? &rhea1_ck, ? ? ?CK_16XX), ? ? ? ?CLK(NULL, ? ? ? "rhea2_ck", ? ? &rhea2_ck, ? ? ?CK_16XX), --
Quoted 2 lines
1.6.6.rc2.5.g49666
I'd like to amend this patch -- there's more wrong in this file than simply missing clocks, as it turns out. I'll submit my new patch for review shortly.
- Cory
PATCH 1/1 Clock fixups for OMAP1 and OMAP7xx
This change adds in some missing clocks that were needed as a result of 526505... (OMAP1 clock: convert mach-omap1/clock.h to mach-omap1/clock_data.c). Prior to this, it was just assumed that these clocks existed for all devices, and it was used directly instead of calling it out with a clk_get call. So, not having the CK_7XX meant these clocks weren't being used anymore for omap 7xx devices, which broke things badly.
Additionally, that change added an __initdata decoration to the structure containing the clk_enable and clk_disable functions. Once init data was freed, these pointers went to null, and the next enable or disable call caused the kernel to crash. This change removes this decoration.
--- arch/arm/mach-omap1/clock_data.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/mach-omap1/clock_data.c +5 -5
@@ -599,15 +599,15 @@ static struct clk i2c_ick = {static struct omap_clk omap_clks[] = {/* non-ULPD clocks */ CLK (NULL ,"ck_ref" , &ck_ref,CK_16XX |CK_1510 |CK_310 |CK_7XX ), -CLK (NULL ,"ck_dpll1" , &ck_dpll1,CK_16XX |CK_1510 |CK_310 ), +CLK (NULL ,"ck_dpll1" , &ck_dpll1,CK_16XX |CK_1510 |CK_310 |CK_7XX ),/* CK_GEN1 clocks */ CLK (NULL ,"ck_dpll1out" , &ck_dpll1out.clk,CK_16XX ),CLK (NULL ,"ck_sossi" , &sossi_ck,CK_16XX ),CLK (NULL ,"arm_ck" , &arm_ck,CK_16XX |CK_1510 |CK_310 ), -CLK (NULL ,"armper_ck" , &armper_ck.clk,CK_16XX |CK_1510 |CK_310 ), +CLK (NULL ,"armper_ck" , &armper_ck.clk,CK_16XX |CK_1510 |CK_310 |CK_7XX ),CLK (NULL ,"arm_gpio_ck" , &arm_gpio_ck,CK_1510 |CK_310 ),CLK (NULL ,"armxor_ck" , &armxor_ck.clk,CK_16XX |CK_1510 |CK_310 |CK_7XX ), -CLK (NULL ,"armtim_ck" , &armtim_ck.clk,CK_16XX |CK_1510 |CK_310 ), +CLK (NULL ,"armtim_ck" , &armtim_ck.clk,CK_16XX |CK_1510 |CK_310 |CK_7XX ),CLK ("omap_wdt" ,"fck" , &armwdt_ck.clk,CK_16XX |CK_1510 |CK_310 ),CLK ("omap_wdt" ,"ick" , &armper_ck.clk,CK_16XX ),CLK ("omap_wdt" ,"ick" , &dummy_ck,CK_1510 |CK_310 ),
@@ -627,7 +627,7 @@ static struct omap_clk omap_clks[] = {CLK (NULL ,"tc2_ck" , &tc2_ck,CK_16XX ),CLK (NULL ,"dma_ck" , &dma_ck,CK_16XX |CK_1510 |CK_310 ),CLK (NULL ,"dma_lcdfree_ck" , &dma_lcdfree_ck,CK_16XX ), -CLK (NULL ,"api_ck" , &api_ck.clk,CK_16XX |CK_1510 |CK_310 ), +CLK (NULL ,"api_ck" , &api_ck.clk,CK_16XX |CK_1510 |CK_310 |CK_7XX ),CLK (NULL ,"lb_ck" , &lb_ck.clk,CK_1510 |CK_310 ),CLK (NULL ,"rhea1_ck" , &rhea1_ck,CK_16XX ), CLK(NULL, "rhea2_ck", &rhea2_ck, CK_16XX),
@@ -674,7 +674,7 @@ static struct omap_clk omap_clks[] = {* init */ -static struct clk_functions omap1_clk_functions__initdata = { +static struct clk_functions omap1_clk_functions = { .clk_enable = omap1_clk_enable, .clk_disable = omap1_clk_disable, .clk_round_rate = omap1_clk_round_rate,
Signature · 1 line
1.6.3.3
Paul Walmsley
maintainerPATCH 1/1 Clock fixups for OMAP1 and OMAP7xx
Hi Cory,
Quoted 8 lines · Cory Maccarrone
This change adds in some missing clocks that were needed as a result of 526505... (OMAP1 clock: convert
mach-omap1/clock.htomach-omap1/clock_data.c). Prior to this, it was just assumed that these clocks existed for all devices, and it was used directly instead of calling it out with aclk_getcall. So, not having theCK_7XXmeant these clocks weren't being used anymore for omap 7xx devices, which broke things badly.
Quoted 5 lines
Additionally, that change added an
__initdatadecoration to the structure containing theclk_enableandclk_disablefunctions. Once init data was freed, these pointers went to null, and the next enable or disable call caused the kernel to crash. This change removes this decoration.
Could you please split these two patches, since they fix different problems? Also the first patch is pertinent only to OMAP7xx-family chips and the second is OMAP1-wide. I've already got your first patch, so no need to resend that.
thanks,
- Paul
PATCH 1/1 Clock fixups for OMAP1 and OMAP7xx
Quoted 9 lines · Paul Walmsley
Hi Cory,
On Tue, 22 Dec 2009, Cory Maccarrone wrote:
Could you please split these two patches, since they fix different problems? ?Also the first patch is pertinent only to OMAP7xx-family chips and the second is OMAP1-wide. ?I've already got your first patch, so no need to resend that.
Looks like you got to it before I did. Thanks for taking care of that :)
- Cory