Re: [PATCH 00/11] ARM: OMAP3: legacy clock data move under clk driver
On Thursday 08 January 2015, Tony Lindgren wrote: Great, hopefully this will finally allow Mike to make the generic struct clk private to drivers/clk :) Seems to boot just fine based on a quick legacy booting test on n900. Mike, assuming no other issues, can you please apply these into a immutable branch against v3.19-rc1 that Paul and I can also merge in as needed? Please also feel free to add: Acked-by: Tony Lindgren t...@atomide.com The series has arrived in linux-next and promptly triggered a few randconfig build errors. Here is a patch that fixes it. Feel free to replace it with a different patch if you don't like this version. 8 Subject: clk: omap: compile legacy omap3 clocks conditionally The 'ARM: OMAP3: legacy clock data move under clk driver' patch series causes build errors when CONFIG_OMAP3 is not set: drivers/clk/ti/dpll.c: In function 'ti_clk_register_dpll': drivers/clk/ti/dpll.c:199:31: error: 'omap3_dpll_ck_ops' undeclared (first use in this function) const struct clk_ops *ops = omap3_dpll_ck_ops; ^ drivers/clk/ti/dpll.c:199:31: note: each undeclared identifier is reported only once for each function it appears in drivers/clk/ti/dpll.c:259:10: error: 'omap3_dpll_per_ck_ops' undeclared (first use in this function) ops = omap3_dpll_per_ck_ops; ^ drivers/built-in.o: In function `ti_clk_register_gate': drivers/clk/ti/gate.c:179: undefined reference to `clkhwops_omap3430es2_dss_usbhost_wait' drivers/clk/ti/gate.c:179: undefined reference to `clkhwops_am35xx_ipss_module_wait' -in.o: In function `ti_clk_register_interface': drivers/clk/ti/interface.c:100: undefined reference to `clkhwops_omap3430es2_iclk_hsotgusb_wait' drivers/clk/ti/interface.c:100: undefined reference to `clkhwops_omap3430es2_iclk_dss_usbhost_wait' drivers/clk/ti/interface.c:100: undefined reference to `clkhwops_omap3430es2_iclk_ssi_wait' drivers/clk/ti/interface.c:100: undefined reference to `clkhwops_am35xx_ipss_wait' drivers/built-in.o: In function `ti_clk_register_composite': :(.text+0x3da768): undefined reference to `ti_clk_build_component_gate' In order to fix that problem, this patch makes the omap3 legacy code compiled only when both CONFIG_OMAP3 and CONFIG_ATAGS are set. Signed-off-by: Arnd Bergmann a...@arndb.de diff --git a/drivers/clk/ti/Makefile b/drivers/clk/ti/Makefile index 14e6686a5eea..105ffd0f5e79 100644 --- a/drivers/clk/ti/Makefile +++ b/drivers/clk/ti/Makefile @@ -1,4 +1,3 @@ -ifneq ($(CONFIG_OF),) obj-y += clk.o autoidle.o clockdomain.o clk-common = dpll.o composite.o divider.o gate.o \ fixed-factor.o mux.o apll.o @@ -6,10 +5,13 @@ obj-$(CONFIG_SOC_AM33XX) += $(clk-common) clk-33xx.o obj-$(CONFIG_SOC_TI81XX) += $(clk-common) fapll.o clk-816x.o obj-$(CONFIG_ARCH_OMAP2) += $(clk-common) interface.o clk-2xxx.o obj-$(CONFIG_ARCH_OMAP3) += $(clk-common) interface.o \ - clk-3xxx.o clk-3xxx-legacy.o + clk-3xxx.o obj-$(CONFIG_ARCH_OMAP4) += $(clk-common) clk-44xx.o obj-$(CONFIG_SOC_OMAP5)+= $(clk-common) clk-54xx.o obj-$(CONFIG_SOC_DRA7XX) += $(clk-common) clk-7xx.o \ clk-dra7-atl.o obj-$(CONFIG_SOC_AM43XX) += $(clk-common) clk-43xx.o + +ifdef CONFIG_ATAGS +obj-$(CONFIG_ARCH_OMAP3)+= clk-3xxx-legacy.o endif diff --git a/drivers/clk/ti/clk.c b/drivers/clk/ti/clk.c index 546dae405402..e22b95646e09 100644 --- a/drivers/clk/ti/clk.c +++ b/drivers/clk/ti/clk.c @@ -186,6 +186,7 @@ void ti_dt_clk_init_retry_clks(void) } } +#if defined(CONFIG_ARCH_OMAP3) defined(CONFIG_ATAGS) void __init ti_clk_patch_legacy_clks(struct ti_clk **patch) { while (*patch) { @@ -308,3 +309,4 @@ int __init ti_clk_register_legacy_clks(struct ti_clk_alias *clks) return 0; } +#endif diff --git a/drivers/clk/ti/composite.c b/drivers/clk/ti/composite.c index 3a9665fce041..3654f61912eb 100644 --- a/drivers/clk/ti/composite.c +++ b/drivers/clk/ti/composite.c @@ -118,6 +118,7 @@ static inline struct clk_hw *_get_hw(struct clk_hw_omap_comp *clk, int idx) #define to_clk_hw_comp(_hw) container_of(_hw, struct clk_hw_omap_comp, hw) +#if defined(CONFIG_ARCH_OMAP3) defined(CONFIG_ATAGS) struct clk *ti_clk_register_composite(struct ti_clk *setup) { struct ti_clk_composite *comp; @@ -153,6 +154,7 @@ struct clk *ti_clk_register_composite(struct ti_clk *setup) return clk; } +#endif static void __init _register_composite(struct clk_hw *hw, struct device_node *node) diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c index 47ebff772b13..81dc4698dc41 100644 --- a/drivers/clk/ti/dpll.c +++
Re: [PATCH 00/11] ARM: OMAP3: legacy clock data move under clk driver
On Tue, Feb 3, 2015 at 11:04 AM, Tony Lindgren t...@atomide.com wrote: * Arnd Bergmann a...@arndb.de [150203 09:03]: On Thursday 08 January 2015, Tony Lindgren wrote: Great, hopefully this will finally allow Mike to make the generic struct clk private to drivers/clk :) Seems to boot just fine based on a quick legacy booting test on n900. Mike, assuming no other issues, can you please apply these into a immutable branch against v3.19-rc1 that Paul and I can also merge in as needed? Please also feel free to add: Acked-by: Tony Lindgren t...@atomide.com The series has arrived in linux-next and promptly triggered a few randconfig build errors. Here is a patch that fixes it. Feel free to replace it with a different patch if you don't like this version. 8 Subject: clk: omap: compile legacy omap3 clocks conditionally The 'ARM: OMAP3: legacy clock data move under clk driver' patch series causes build errors when CONFIG_OMAP3 is not set: drivers/clk/ti/dpll.c: In function 'ti_clk_register_dpll': drivers/clk/ti/dpll.c:199:31: error: 'omap3_dpll_ck_ops' undeclared (first use in this function) const struct clk_ops *ops = omap3_dpll_ck_ops; ^ drivers/clk/ti/dpll.c:199:31: note: each undeclared identifier is reported only once for each function it appears in drivers/clk/ti/dpll.c:259:10: error: 'omap3_dpll_per_ck_ops' undeclared (first use in this function) ops = omap3_dpll_per_ck_ops; ^ drivers/built-in.o: In function `ti_clk_register_gate': drivers/clk/ti/gate.c:179: undefined reference to `clkhwops_omap3430es2_dss_usbhost_wait' drivers/clk/ti/gate.c:179: undefined reference to `clkhwops_am35xx_ipss_module_wait' -in.o: In function `ti_clk_register_interface': drivers/clk/ti/interface.c:100: undefined reference to `clkhwops_omap3430es2_iclk_hsotgusb_wait' drivers/clk/ti/interface.c:100: undefined reference to `clkhwops_omap3430es2_iclk_dss_usbhost_wait' drivers/clk/ti/interface.c:100: undefined reference to `clkhwops_omap3430es2_iclk_ssi_wait' drivers/clk/ti/interface.c:100: undefined reference to `clkhwops_am35xx_ipss_wait' drivers/built-in.o: In function `ti_clk_register_composite': :(.text+0x3da768): undefined reference to `ti_clk_build_component_gate' In order to fix that problem, this patch makes the omap3 legacy code compiled only when both CONFIG_OMAP3 and CONFIG_ATAGS are set. Looks OK to me: Acked-by: Tony Lindgren t...@atomide.com Thanks for the fix Arnd and for the Ack Tony. I beautified the commitlog a bit. Applied to clk-next. Regards, Mike Signed-off-by: Arnd Bergmann a...@arndb.de diff --git a/drivers/clk/ti/Makefile b/drivers/clk/ti/Makefile index 14e6686a5eea..105ffd0f5e79 100644 --- a/drivers/clk/ti/Makefile +++ b/drivers/clk/ti/Makefile @@ -1,4 +1,3 @@ -ifneq ($(CONFIG_OF),) obj-y+= clk.o autoidle.o clockdomain.o clk-common = dpll.o composite.o divider.o gate.o \ fixed-factor.o mux.o apll.o @@ -6,10 +5,13 @@ obj-$(CONFIG_SOC_AM33XX)+= $(clk-common) clk-33xx.o obj-$(CONFIG_SOC_TI81XX) += $(clk-common) fapll.o clk-816x.o obj-$(CONFIG_ARCH_OMAP2) += $(clk-common) interface.o clk-2xxx.o obj-$(CONFIG_ARCH_OMAP3) += $(clk-common) interface.o \ -clk-3xxx.o clk-3xxx-legacy.o +clk-3xxx.o obj-$(CONFIG_ARCH_OMAP4) += $(clk-common) clk-44xx.o obj-$(CONFIG_SOC_OMAP5) += $(clk-common) clk-54xx.o obj-$(CONFIG_SOC_DRA7XX) += $(clk-common) clk-7xx.o \ clk-dra7-atl.o obj-$(CONFIG_SOC_AM43XX) += $(clk-common) clk-43xx.o + +ifdef CONFIG_ATAGS +obj-$(CONFIG_ARCH_OMAP3)+= clk-3xxx-legacy.o endif diff --git a/drivers/clk/ti/clk.c b/drivers/clk/ti/clk.c index 546dae405402..e22b95646e09 100644 --- a/drivers/clk/ti/clk.c +++ b/drivers/clk/ti/clk.c @@ -186,6 +186,7 @@ void ti_dt_clk_init_retry_clks(void) } } +#if defined(CONFIG_ARCH_OMAP3) defined(CONFIG_ATAGS) void __init ti_clk_patch_legacy_clks(struct ti_clk **patch) { while (*patch) { @@ -308,3 +309,4 @@ int __init ti_clk_register_legacy_clks(struct ti_clk_alias *clks) return 0; } +#endif diff --git a/drivers/clk/ti/composite.c b/drivers/clk/ti/composite.c index 3a9665fce041..3654f61912eb 100644 --- a/drivers/clk/ti/composite.c +++ b/drivers/clk/ti/composite.c @@ -118,6 +118,7 @@ static inline struct clk_hw *_get_hw(struct clk_hw_omap_comp *clk, int idx) #define to_clk_hw_comp(_hw) container_of(_hw, struct clk_hw_omap_comp, hw) +#if defined(CONFIG_ARCH_OMAP3) defined(CONFIG_ATAGS) struct clk *ti_clk_register_composite(struct ti_clk *setup) { struct ti_clk_composite *comp; @@
Re: [PATCH 00/11] ARM: OMAP3: legacy clock data move under clk driver
* Arnd Bergmann a...@arndb.de [150203 09:03]: On Thursday 08 January 2015, Tony Lindgren wrote: Great, hopefully this will finally allow Mike to make the generic struct clk private to drivers/clk :) Seems to boot just fine based on a quick legacy booting test on n900. Mike, assuming no other issues, can you please apply these into a immutable branch against v3.19-rc1 that Paul and I can also merge in as needed? Please also feel free to add: Acked-by: Tony Lindgren t...@atomide.com The series has arrived in linux-next and promptly triggered a few randconfig build errors. Here is a patch that fixes it. Feel free to replace it with a different patch if you don't like this version. 8 Subject: clk: omap: compile legacy omap3 clocks conditionally The 'ARM: OMAP3: legacy clock data move under clk driver' patch series causes build errors when CONFIG_OMAP3 is not set: drivers/clk/ti/dpll.c: In function 'ti_clk_register_dpll': drivers/clk/ti/dpll.c:199:31: error: 'omap3_dpll_ck_ops' undeclared (first use in this function) const struct clk_ops *ops = omap3_dpll_ck_ops; ^ drivers/clk/ti/dpll.c:199:31: note: each undeclared identifier is reported only once for each function it appears in drivers/clk/ti/dpll.c:259:10: error: 'omap3_dpll_per_ck_ops' undeclared (first use in this function) ops = omap3_dpll_per_ck_ops; ^ drivers/built-in.o: In function `ti_clk_register_gate': drivers/clk/ti/gate.c:179: undefined reference to `clkhwops_omap3430es2_dss_usbhost_wait' drivers/clk/ti/gate.c:179: undefined reference to `clkhwops_am35xx_ipss_module_wait' -in.o: In function `ti_clk_register_interface': drivers/clk/ti/interface.c:100: undefined reference to `clkhwops_omap3430es2_iclk_hsotgusb_wait' drivers/clk/ti/interface.c:100: undefined reference to `clkhwops_omap3430es2_iclk_dss_usbhost_wait' drivers/clk/ti/interface.c:100: undefined reference to `clkhwops_omap3430es2_iclk_ssi_wait' drivers/clk/ti/interface.c:100: undefined reference to `clkhwops_am35xx_ipss_wait' drivers/built-in.o: In function `ti_clk_register_composite': :(.text+0x3da768): undefined reference to `ti_clk_build_component_gate' In order to fix that problem, this patch makes the omap3 legacy code compiled only when both CONFIG_OMAP3 and CONFIG_ATAGS are set. Looks OK to me: Acked-by: Tony Lindgren t...@atomide.com Signed-off-by: Arnd Bergmann a...@arndb.de diff --git a/drivers/clk/ti/Makefile b/drivers/clk/ti/Makefile index 14e6686a5eea..105ffd0f5e79 100644 --- a/drivers/clk/ti/Makefile +++ b/drivers/clk/ti/Makefile @@ -1,4 +1,3 @@ -ifneq ($(CONFIG_OF),) obj-y+= clk.o autoidle.o clockdomain.o clk-common = dpll.o composite.o divider.o gate.o \ fixed-factor.o mux.o apll.o @@ -6,10 +5,13 @@ obj-$(CONFIG_SOC_AM33XX)+= $(clk-common) clk-33xx.o obj-$(CONFIG_SOC_TI81XX) += $(clk-common) fapll.o clk-816x.o obj-$(CONFIG_ARCH_OMAP2) += $(clk-common) interface.o clk-2xxx.o obj-$(CONFIG_ARCH_OMAP3) += $(clk-common) interface.o \ -clk-3xxx.o clk-3xxx-legacy.o +clk-3xxx.o obj-$(CONFIG_ARCH_OMAP4) += $(clk-common) clk-44xx.o obj-$(CONFIG_SOC_OMAP5) += $(clk-common) clk-54xx.o obj-$(CONFIG_SOC_DRA7XX) += $(clk-common) clk-7xx.o \ clk-dra7-atl.o obj-$(CONFIG_SOC_AM43XX) += $(clk-common) clk-43xx.o + +ifdef CONFIG_ATAGS +obj-$(CONFIG_ARCH_OMAP3)+= clk-3xxx-legacy.o endif diff --git a/drivers/clk/ti/clk.c b/drivers/clk/ti/clk.c index 546dae405402..e22b95646e09 100644 --- a/drivers/clk/ti/clk.c +++ b/drivers/clk/ti/clk.c @@ -186,6 +186,7 @@ void ti_dt_clk_init_retry_clks(void) } } +#if defined(CONFIG_ARCH_OMAP3) defined(CONFIG_ATAGS) void __init ti_clk_patch_legacy_clks(struct ti_clk **patch) { while (*patch) { @@ -308,3 +309,4 @@ int __init ti_clk_register_legacy_clks(struct ti_clk_alias *clks) return 0; } +#endif diff --git a/drivers/clk/ti/composite.c b/drivers/clk/ti/composite.c index 3a9665fce041..3654f61912eb 100644 --- a/drivers/clk/ti/composite.c +++ b/drivers/clk/ti/composite.c @@ -118,6 +118,7 @@ static inline struct clk_hw *_get_hw(struct clk_hw_omap_comp *clk, int idx) #define to_clk_hw_comp(_hw) container_of(_hw, struct clk_hw_omap_comp, hw) +#if defined(CONFIG_ARCH_OMAP3) defined(CONFIG_ATAGS) struct clk *ti_clk_register_composite(struct ti_clk *setup) { struct ti_clk_composite *comp; @@ -153,6 +154,7 @@ struct clk *ti_clk_register_composite(struct ti_clk *setup) return clk; } +#endif static void __init _register_composite(struct clk_hw *hw,
Re: [PATCH 00/11] ARM: OMAP3: legacy clock data move under clk driver
On 01/30/2015 02:42 AM, Mike Turquette wrote: Quoting Tero Kristo (2015-01-29 12:19:29) On 01/08/2015 01:00 AM, Tony Lindgren wrote: * Tero Kristo t-kri...@ti.com [141216 08:22]: Hi, These patches move the legacy clock data for omap3 under drivers/clk/ti. After these patches are applied, it should be possible to get rid of clk-private.h (long pending project for Mike.) Testing done (on top of 3.18-rc1): omap3-beagle: boot / suspend-resume (ret/off) / cpuidle (ret/off) omap3-beagle-xm: boot upto fs mount (see note below) sdp3430: boot n900: boot Note: beagle-xm failed with FS mount on the board I have access to, but this happens with clean 3.18-rc1 and linux-next also at the moment. The board has probably corrupted filesystem image but I am unable to fix this atm (remote board.) Test branch: tree: https://github.com/t-kristo/linux-pm.git branch: 3.18-rc1-omap3-clk-rework Great, hopefully this will finally allow Mike to make the generic struct clk private to drivers/clk :) Seems to boot just fine based on a quick legacy booting test on n900. Mike, assuming no other issues, can you please apply these into a immutable branch against v3.19-rc1 that Paul and I can also merge in as needed? Please also feel free to add: Acked-by: Tony Lindgren t...@atomide.com I just rebased these patches on top of 3.19-rc1, and noticed a problem with dpll5 on beagle-xm (basically a divide-by-zero error + locking issue during boot.) The extra diff at the end of this email fixes the problems, I will also send the updated two patches as v2. Updated branch available in my tree under name 3.19-rc1-omap3-clk-rework. I've applied these 11 patches on top of v3.19-rc1, including the two V2 patches for #6 and #8 to the clk-omap-legacy branch here: git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-omap-legacy Let me know if I screwed anything up. I've merged this immutable branch into clk-next. In addition I've made some changes to remove clk-private.h permanently. I'll post those later today. Again, please let me know if I screwed anything up. I can't see the clk-omap-legacy merged to clk-next so far, maybe you did not push it yet? The branch itself is identical copy of mine, so can't see any issues there so far. -Tero Regards, Mike - Tero - diff --git a/drivers/clk/ti/clk-3xxx-legacy.c b/drivers/clk/ti/clk-3xxx-legacy.c index 81ad510..e0732a4 100644 --- a/drivers/clk/ti/clk-3xxx-legacy.c +++ b/drivers/clk/ti/clk-3xxx-legacy.c @@ -136,6 +136,7 @@ static struct ti_clk_dpll dpll3_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x5, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -307,6 +308,7 @@ static struct ti_clk_dpll dpll4_ck_data = { .idlest_mask = 0x2, .auto_recal_bit = 0x13, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x6, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -507,6 +509,7 @@ static struct ti_clk_dpll dpll5_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x19, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -1271,6 +1274,7 @@ static struct ti_clk_dpll dpll1_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x7, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -2154,6 +2158,7 @@ static struct ti_clk_dpll dpll2_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x8, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -2513,6 +2518,7 @@ static struct ti_clk_dpll dpll4_ck_omap36xx_data = { .idlest_mask = 0x2, .auto_recal_bit = 0x13, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x6, .max_multiplier = 0xfff, .enable_mask = 0x7, diff --git a/drivers/clk/ti/clock.h b/drivers/clk/ti/clock.h index 8d9c603..404158d 100644 --- a/drivers/clk/ti/clock.h +++ b/drivers/clk/ti/clock.h @@ -148,6 +148,7 @@ struct ti_clk_dpll { u32 sddiv_mask; u16 max_multiplier; u16 max_divider; + u8 min_divider; u8 auto_recal_bit; u8 recal_en_bit; u8 recal_st_bit; diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c index 7d67639..47ebff7 100644 --- a/drivers/clk/ti/dpll.c +++ b/drivers/clk/ti/dpll.c @@ -243,6 +243,7 @@ struct clk *ti_clk_register_dpll(struct ti_clk *setup) dd-sddiv_mask = dpll-sddiv_mask; dd-dco_mask = dpll-dco_mask; dd-max_divider = dpll-max_divider; + dd-min_divider = dpll-min_divider;
Re: [PATCH 00/11] ARM: OMAP3: legacy clock data move under clk driver
Quoting Tero Kristo (2015-01-30 07:20:36) On 01/30/2015 02:42 AM, Mike Turquette wrote: Quoting Tero Kristo (2015-01-29 12:19:29) On 01/08/2015 01:00 AM, Tony Lindgren wrote: * Tero Kristo t-kri...@ti.com [141216 08:22]: Hi, These patches move the legacy clock data for omap3 under drivers/clk/ti. After these patches are applied, it should be possible to get rid of clk-private.h (long pending project for Mike.) Testing done (on top of 3.18-rc1): omap3-beagle: boot / suspend-resume (ret/off) / cpuidle (ret/off) omap3-beagle-xm: boot upto fs mount (see note below) sdp3430: boot n900: boot Note: beagle-xm failed with FS mount on the board I have access to, but this happens with clean 3.18-rc1 and linux-next also at the moment. The board has probably corrupted filesystem image but I am unable to fix this atm (remote board.) Test branch: tree: https://github.com/t-kristo/linux-pm.git branch: 3.18-rc1-omap3-clk-rework Great, hopefully this will finally allow Mike to make the generic struct clk private to drivers/clk :) Seems to boot just fine based on a quick legacy booting test on n900. Mike, assuming no other issues, can you please apply these into a immutable branch against v3.19-rc1 that Paul and I can also merge in as needed? Please also feel free to add: Acked-by: Tony Lindgren t...@atomide.com I just rebased these patches on top of 3.19-rc1, and noticed a problem with dpll5 on beagle-xm (basically a divide-by-zero error + locking issue during boot.) The extra diff at the end of this email fixes the problems, I will also send the updated two patches as v2. Updated branch available in my tree under name 3.19-rc1-omap3-clk-rework. I've applied these 11 patches on top of v3.19-rc1, including the two V2 patches for #6 and #8 to the clk-omap-legacy branch here: git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-omap-legacy Let me know if I screwed anything up. I've merged this immutable branch into clk-next. In addition I've made some changes to remove clk-private.h permanently. I'll post those later today. Again, please let me know if I screwed anything up. I can't see the clk-omap-legacy merged to clk-next so far, maybe you did not push it yet? The branch itself is identical copy of mine, so can't see any issues there so far. That is correct. There are a lot of unrelated changes in clk-next right now so I didn't push this OMAP stuff last night. Turns out to be a good thing since linux-next had some breakage today. Once that is resolved I'll push this out, but clk-omap-legacy IS merged locally in my tree, just not on the public git that linux-next pulls. Regards, Mike -Tero Regards, Mike - Tero - diff --git a/drivers/clk/ti/clk-3xxx-legacy.c b/drivers/clk/ti/clk-3xxx-legacy.c index 81ad510..e0732a4 100644 --- a/drivers/clk/ti/clk-3xxx-legacy.c +++ b/drivers/clk/ti/clk-3xxx-legacy.c @@ -136,6 +136,7 @@ static struct ti_clk_dpll dpll3_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x5, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -307,6 +308,7 @@ static struct ti_clk_dpll dpll4_ck_data = { .idlest_mask = 0x2, .auto_recal_bit = 0x13, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x6, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -507,6 +509,7 @@ static struct ti_clk_dpll dpll5_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x19, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -1271,6 +1274,7 @@ static struct ti_clk_dpll dpll1_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x7, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -2154,6 +2158,7 @@ static struct ti_clk_dpll dpll2_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x8, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -2513,6 +2518,7 @@ static struct ti_clk_dpll dpll4_ck_omap36xx_data = { .idlest_mask = 0x2, .auto_recal_bit = 0x13, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x6, .max_multiplier = 0xfff, .enable_mask = 0x7, diff --git a/drivers/clk/ti/clock.h b/drivers/clk/ti/clock.h index 8d9c603..404158d 100644 --- a/drivers/clk/ti/clock.h +++ b/drivers/clk/ti/clock.h @@ -148,6
Re: [PATCH 00/11] ARM: OMAP3: legacy clock data move under clk driver
On 01/08/2015 01:00 AM, Tony Lindgren wrote: * Tero Kristo t-kri...@ti.com [141216 08:22]: Hi, These patches move the legacy clock data for omap3 under drivers/clk/ti. After these patches are applied, it should be possible to get rid of clk-private.h (long pending project for Mike.) Testing done (on top of 3.18-rc1): omap3-beagle: boot / suspend-resume (ret/off) / cpuidle (ret/off) omap3-beagle-xm: boot upto fs mount (see note below) sdp3430: boot n900: boot Note: beagle-xm failed with FS mount on the board I have access to, but this happens with clean 3.18-rc1 and linux-next also at the moment. The board has probably corrupted filesystem image but I am unable to fix this atm (remote board.) Test branch: tree: https://github.com/t-kristo/linux-pm.git branch: 3.18-rc1-omap3-clk-rework Great, hopefully this will finally allow Mike to make the generic struct clk private to drivers/clk :) Seems to boot just fine based on a quick legacy booting test on n900. Mike, assuming no other issues, can you please apply these into a immutable branch against v3.19-rc1 that Paul and I can also merge in as needed? Please also feel free to add: Acked-by: Tony Lindgren t...@atomide.com I just rebased these patches on top of 3.19-rc1, and noticed a problem with dpll5 on beagle-xm (basically a divide-by-zero error + locking issue during boot.) The extra diff at the end of this email fixes the problems, I will also send the updated two patches as v2. Updated branch available in my tree under name 3.19-rc1-omap3-clk-rework. - Tero - diff --git a/drivers/clk/ti/clk-3xxx-legacy.c b/drivers/clk/ti/clk-3xxx-legacy.c index 81ad510..e0732a4 100644 --- a/drivers/clk/ti/clk-3xxx-legacy.c +++ b/drivers/clk/ti/clk-3xxx-legacy.c @@ -136,6 +136,7 @@ static struct ti_clk_dpll dpll3_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x5, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -307,6 +308,7 @@ static struct ti_clk_dpll dpll4_ck_data = { .idlest_mask = 0x2, .auto_recal_bit = 0x13, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x6, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -507,6 +509,7 @@ static struct ti_clk_dpll dpll5_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x19, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -1271,6 +1274,7 @@ static struct ti_clk_dpll dpll1_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x7, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -2154,6 +2158,7 @@ static struct ti_clk_dpll dpll2_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x8, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -2513,6 +2518,7 @@ static struct ti_clk_dpll dpll4_ck_omap36xx_data = { .idlest_mask = 0x2, .auto_recal_bit = 0x13, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x6, .max_multiplier = 0xfff, .enable_mask = 0x7, diff --git a/drivers/clk/ti/clock.h b/drivers/clk/ti/clock.h index 8d9c603..404158d 100644 --- a/drivers/clk/ti/clock.h +++ b/drivers/clk/ti/clock.h @@ -148,6 +148,7 @@ struct ti_clk_dpll { u32 sddiv_mask; u16 max_multiplier; u16 max_divider; + u8 min_divider; u8 auto_recal_bit; u8 recal_en_bit; u8 recal_st_bit; diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c index 7d67639..47ebff7 100644 --- a/drivers/clk/ti/dpll.c +++ b/drivers/clk/ti/dpll.c @@ -243,6 +243,7 @@ struct clk *ti_clk_register_dpll(struct ti_clk *setup) dd-sddiv_mask = dpll-sddiv_mask; dd-dco_mask = dpll-dco_mask; dd-max_divider = dpll-max_divider; + dd-min_divider = dpll-min_divider; dd-max_multiplier = dpll-max_multiplier; dd-auto_recal_bit = dpll-auto_recal_bit; dd-recal_en_bit = dpll-recal_en_bit; -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/11] ARM: OMAP3: legacy clock data move under clk driver
Quoting Tero Kristo (2015-01-29 12:19:29) On 01/08/2015 01:00 AM, Tony Lindgren wrote: * Tero Kristo t-kri...@ti.com [141216 08:22]: Hi, These patches move the legacy clock data for omap3 under drivers/clk/ti. After these patches are applied, it should be possible to get rid of clk-private.h (long pending project for Mike.) Testing done (on top of 3.18-rc1): omap3-beagle: boot / suspend-resume (ret/off) / cpuidle (ret/off) omap3-beagle-xm: boot upto fs mount (see note below) sdp3430: boot n900: boot Note: beagle-xm failed with FS mount on the board I have access to, but this happens with clean 3.18-rc1 and linux-next also at the moment. The board has probably corrupted filesystem image but I am unable to fix this atm (remote board.) Test branch: tree: https://github.com/t-kristo/linux-pm.git branch: 3.18-rc1-omap3-clk-rework Great, hopefully this will finally allow Mike to make the generic struct clk private to drivers/clk :) Seems to boot just fine based on a quick legacy booting test on n900. Mike, assuming no other issues, can you please apply these into a immutable branch against v3.19-rc1 that Paul and I can also merge in as needed? Please also feel free to add: Acked-by: Tony Lindgren t...@atomide.com I just rebased these patches on top of 3.19-rc1, and noticed a problem with dpll5 on beagle-xm (basically a divide-by-zero error + locking issue during boot.) The extra diff at the end of this email fixes the problems, I will also send the updated two patches as v2. Updated branch available in my tree under name 3.19-rc1-omap3-clk-rework. I've applied these 11 patches on top of v3.19-rc1, including the two V2 patches for #6 and #8 to the clk-omap-legacy branch here: git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-omap-legacy Let me know if I screwed anything up. I've merged this immutable branch into clk-next. In addition I've made some changes to remove clk-private.h permanently. I'll post those later today. Again, please let me know if I screwed anything up. Regards, Mike - Tero - diff --git a/drivers/clk/ti/clk-3xxx-legacy.c b/drivers/clk/ti/clk-3xxx-legacy.c index 81ad510..e0732a4 100644 --- a/drivers/clk/ti/clk-3xxx-legacy.c +++ b/drivers/clk/ti/clk-3xxx-legacy.c @@ -136,6 +136,7 @@ static struct ti_clk_dpll dpll3_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x5, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -307,6 +308,7 @@ static struct ti_clk_dpll dpll4_ck_data = { .idlest_mask = 0x2, .auto_recal_bit = 0x13, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x6, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -507,6 +509,7 @@ static struct ti_clk_dpll dpll5_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x19, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -1271,6 +1274,7 @@ static struct ti_clk_dpll dpll1_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x7, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -2154,6 +2158,7 @@ static struct ti_clk_dpll dpll2_ck_data = { .idlest_mask = 0x1, .auto_recal_bit = 0x3, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x8, .max_multiplier = 0x7ff, .enable_mask = 0x7, @@ -2513,6 +2518,7 @@ static struct ti_clk_dpll dpll4_ck_omap36xx_data = { .idlest_mask = 0x2, .auto_recal_bit = 0x13, .max_divider = 0x80, + .min_divider = 0x1, .recal_en_bit = 0x6, .max_multiplier = 0xfff, .enable_mask = 0x7, diff --git a/drivers/clk/ti/clock.h b/drivers/clk/ti/clock.h index 8d9c603..404158d 100644 --- a/drivers/clk/ti/clock.h +++ b/drivers/clk/ti/clock.h @@ -148,6 +148,7 @@ struct ti_clk_dpll { u32 sddiv_mask; u16 max_multiplier; u16 max_divider; + u8 min_divider; u8 auto_recal_bit; u8 recal_en_bit; u8 recal_st_bit; diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c index 7d67639..47ebff7 100644 --- a/drivers/clk/ti/dpll.c +++ b/drivers/clk/ti/dpll.c @@ -243,6 +243,7 @@ struct clk *ti_clk_register_dpll(struct ti_clk *setup) dd-sddiv_mask = dpll-sddiv_mask; dd-dco_mask = dpll-dco_mask; dd-max_divider = dpll-max_divider; + dd-min_divider = dpll-min_divider; dd-max_multiplier = dpll-max_multiplier; dd-auto_recal_bit = dpll-auto_recal_bit; dd-recal_en_bit = dpll-recal_en_bit; -- To
Re: [PATCH 00/11] ARM: OMAP3: legacy clock data move under clk driver
* Tero Kristo t-kri...@ti.com [141216 08:22]: Hi, These patches move the legacy clock data for omap3 under drivers/clk/ti. After these patches are applied, it should be possible to get rid of clk-private.h (long pending project for Mike.) Testing done (on top of 3.18-rc1): omap3-beagle: boot / suspend-resume (ret/off) / cpuidle (ret/off) omap3-beagle-xm: boot upto fs mount (see note below) sdp3430: boot n900: boot Note: beagle-xm failed with FS mount on the board I have access to, but this happens with clean 3.18-rc1 and linux-next also at the moment. The board has probably corrupted filesystem image but I am unable to fix this atm (remote board.) Test branch: tree: https://github.com/t-kristo/linux-pm.git branch: 3.18-rc1-omap3-clk-rework Great, hopefully this will finally allow Mike to make the generic struct clk private to drivers/clk :) Seems to boot just fine based on a quick legacy booting test on n900. Mike, assuming no other issues, can you please apply these into a immutable branch against v3.19-rc1 that Paul and I can also merge in as needed? Please also feel free to add: Acked-by: Tony Lindgren t...@atomide.com -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 00/11] ARM: OMAP3: legacy clock data move under clk driver
Hi, These patches move the legacy clock data for omap3 under drivers/clk/ti. After these patches are applied, it should be possible to get rid of clk-private.h (long pending project for Mike.) Testing done (on top of 3.18-rc1): omap3-beagle: boot / suspend-resume (ret/off) / cpuidle (ret/off) omap3-beagle-xm: boot upto fs mount (see note below) sdp3430: boot n900: boot Note: beagle-xm failed with FS mount on the board I have access to, but this happens with clean 3.18-rc1 and linux-next also at the moment. The board has probably corrupted filesystem image but I am unable to fix this atm (remote board.) Test branch: tree: https://github.com/t-kristo/linux-pm.git branch: 3.18-rc1-omap3-clk-rework -Tero -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html