: ARM: OMAP2: clock DT conversion
Subsystems (9)
v2 cover : ARM: OMAP2: clock DT conversion
Hi,
Changes compared to v1:
- fixed OMAP2 only build issues
- fixed OMAP2420 boot issues
- added patch #13 and #14 to remove legacy clock data for OMAP2/OMAP3
- fixed smatch + DT bindings documentation problems reported by Nishanth
This set is un-tested on OMAP2 hardware as I don't have access to any. So, any testing feedback welcome.
Test branch available:
tree: https://github.com/t-kristo/linux-pm.git
branch: 3.14-rc4-omap2-dt-clks-v2
-Tero
PATCH v2 1/14 ARM: OMAP2: convert sys_ck and osc_ck to standard clock types
osc_ck can be simply defined as a multiplexer clock, and the sys_ck can be a simple divider.
--- arch/arm/mach-omap2/Makefile | 3 +- arch/arm/mach-omap2/cclock2420_data.c | 52 +++++++++++++------------ arch/arm/mach-omap2/cclock2430_data.c | 60 +++++++++++++++------------- arch/arm/mach-omap2/clkt2xxx_osc.c | 69 --------------------------------- arch/arm/mach-omap2/clkt2xxx_sys.c | 47 ---------------------- arch/arm/mach-omap2/clock2xxx.h | 2 - arch/arm/mach-omap2/cm-regbits-24xx.h | 1 + arch/arm/mach-omap2/pm24xx.c | 4 ++ 8 files changed, 67 insertions(+), 171 deletions(-) delete mode 100644 arch/arm/mach-omap2/clkt2xxx_osc.c delete mode 100644 arch/arm/mach-omap2/clkt2xxx_sys.c
arch/arm/mach-omap2/Makefile +1 -2
@@ -173,10 +173,9 @@ obj-$(CONFIG_SOC_DRA7XX) += clockdomains7xx_data.o # Clock framework obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o -obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_sys.o obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_dpllcore.o obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_virt_prcm_set.o -obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_apll.o clkt2xxx_osc.o +obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_apll.o obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_dpll.o clkt_iclk.o obj-$(CONFIG_SOC_OMAP2420) += cclock2420_data.o obj-$(CONFIG_SOC_OMAP2430) += clock2430.o cclock2430_data.o
arch/arm/mach-omap2/cclock2420_data.c +28 -24
81 lines not on this page · raw message
arch/arm/mach-omap2/cclock2430_data.c +33 -27
95 lines not on this page · raw message
arch/arm/mach-omap2/clkt2xxx_osc.c deleted +0 -69
69 lines not on this page · raw message
arch/arm/mach-omap2/clkt2xxx_sys.c deleted +0 -47
47 lines not on this page · raw message
arch/arm/mach-omap2/clock2xxx.h +0 -2
@@ -49,8 +49,6 @@ int omap2430_clk_init(void);#define omap2430_clk_init () do { } while(0)#endif -extern void __iomem *prcm_clksrc_ctrl; -extern struct clk_hw *dclk_hw;int omap2_enable_osc_ck (struct clk_hw *hw);void omap2_disable_osc_ck (struct clk_hw *hw);
arch/arm/mach-omap2/cm-regbits-24xx.h +1 -0
@@ -107,6 +107,7 @@#define OMAP24XX_AUTO_DPLL_SHIFT 0#define OMAP24XX_AUTO_DPLL_MASK (0x3 << 0)#define OMAP24XX_APLLS_CLKIN_SHIFT 23 +#define OMAP24XX_APLLS_CLKIN_WIDTH 3#define OMAP24XX_APLLS_CLKIN_MASK (0x7 << 23)#define OMAP24XX_DPLL_MULT_MASK (0x3ff << 12)#define OMAP24XX_DPLL_DIV_MASK (0xf << 8)
arch/arm/mach-omap2/pm24xx.c +4 -0
@@ -251,6 +251,10 @@ static void __init prcm_setup_regs(void)/* Enable wake-up events */ omap2_prm_write_mod_reg (OMAP24XX_EN_GPIOS_MASK |OMAP24XX_EN_GPT1_MASK ,WKUP_MOD ,PM_WKEN ); + +/* Enable SYS_CLKEN control when all domains idle */ +omap2_prm_set_mod_reg_bits (OMAP_AUTOEXTCLKMODE_MASK ,OMAP24XX_GR_MOD , +OMAP2_PRCM_CLKSRC_CTRL_OFFSET ); }int __init omap2_pm_init (void )
Signature · 1 line
1.7.9.5
PATCH v2 2/14 ARM: OMAP2420: clock: get rid of fixed-div property use
In reply to Tero KristoCleans up the code a bit and is useful for clock data DT conversion.
--- arch/arm/mach-omap2/cclock2420_data.c | 15 ++++----------- arch/arm/mach-omap2/clock.c | 21 --------------------- arch/arm/mach-omap2/clock.h | 3 --- 3 files changed, 4 insertions(+), 35 deletions(-)
arch/arm/mach-omap2/cclock2420_data.c +4 -11
@@ -1025,18 +1025,12 @@ DEFINE_CLK_OMAP_MUX_GATE(iva1_ifck, "iva1_clkdm", dsp_fck_clksel,OMAP2420_EN_IVA_COP_SHIFT , &clkhwops_wait, dsp_fck_parent_names, dsp_fck_ops); +DEFINE_CLK_FIXED_FACTOR (iva1_ifck_div,"iva1_ifck" , &iva1_ifck,0x0 ,1 ,2 ); +static struct clk iva1_mpu_int_ifck;static const char *iva1_mpu_int_ifck_parent_names[] = { -"iva1_ifck" , -}; - -static const struct clk_ops iva1_mpu_int_ifck_ops = { - .init = &omap2_init_clk_clkdm, - .enable = &omap2_dflt_clk_enable, - .disable = &omap2_dflt_clk_disable, - .is_enabled = &omap2_dflt_clk_is_enabled, - .recalc_rate = &omap_fixed_divisor_recalc, +"iva1_ifck_div" , };static struct clk_hw_omap iva1_mpu_int_ifck_hw = {
@@ -1047,11 +1041,10 @@ static struct clk_hw_omap iva1_mpu_int_ifck_hw = { .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN), .enable_bit = OMAP2420_EN_IVA_MPU_SHIFT, .clkdm_name = "iva1_clkdm", - .fixed_div = 2, };DEFINE_STRUCT_CLK (iva1_mpu_int_ifck, iva1_mpu_int_ifck_parent_names, - iva1_mpu_int_ifck_ops); + aes_ick_ops);static struct clk mailboxes_ick;
arch/arm/mach-omap2/clock.c +0 -21
@@ -82,27 +82,6 @@ u32 omap2_clk_readl(struct clk_hw_omap *clk, void __iomem *reg) }/* -* Used for clocks that have the same value as the parent clock, -* divided by some factor -*/ -unsigned long omap_fixed_divisor_recalc (struct clk_hw *hw, -unsigned long parent_rate) -{ -struct clk_hw_omap *oclk; - -if (!hw) { -pr_warn ("%s: hw is NULL\n" , __func__); -return -EINVAL ; - } - - oclk =to_clk_hw_omap (hw); - -WARN_ON (!oclk->fixed_div); - -return parent_rate / oclk->fixed_div; -} - -/* * OMAP2+ specific clock functions */
arch/arm/mach-omap2/clock.h +0 -3
@@ -189,9 +189,6 @@ struct clk_hw_omap_ops {void (*deny_idle)(struct clk_hw_omap *oclk); }; -unsigned long omap_fixed_divisor_recalc (struct clk_hw *hw, -unsigned long parent_rate); -/* CM_CLKSEL2_PLL.CORE_CLK_SRC bits (2XXX) */ #define CORE_CLK_SRC_32K 0x0#define CORE_CLK_SRC_DPLL 0x1
Signature · 1 line
1.7.9.5
PATCH v2 3/14 CLK: TI: DPLL: simplify autoidle register detection logic
In reply to Tero KristoAMxxxx dpll_data previously had autoidle_mask set, even if these SoC:s don't have autoidle register. Remove the bit-field value as it is unused, also drop the unnecessary DPLL_HAS_AUTOIDLE flag passing during init, as we can just simply check against the contents of the autoidle_mask.
--- drivers/clk/ti/dpll.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-)
drivers/clk/ti/dpll.c +15 -24
@@ -25,8 +25,6 @@#undef pr_fmt#define pr_fmt (fmt) "%s: " fmt, __func__ -#define DPLL_HAS_AUTOIDLE 0x1 -#if defined(CONFIG_ARCH_OMAP4 ) || defined(CONFIG_SOC_OMAP5 ) || \ defined(CONFIG_SOC_DRA7XX ) static const struct clk_ops dpll_m4xen_ck_ops = {
@@ -193,14 +191,12 @@ static void ti_clk_register_dpll_x2(struct device_node *node,* @node: device node containing the DPLL info * @ops: ops for the DPLL * @ddt: DPLL data template to use -* @init_flags: flags for controlling init types * * Initializes a DPLL clock from device tree data. */ static void __init of_ti_dpll_setup (struct device_node *node,const struct clk_ops *ops, -const struct dpll_data *ddt, -u8 init_flags) +const struct dpll_data *ddt) {struct clk_hw_omap *clk_hw =NULL ;struct clk_init_data *init =NULL ;
@@ -247,7 +243,7 @@ static void __init of_ti_dpll_setup(struct device_node *node,if (!dd->control_reg || !dd->idlest_reg || !dd->mult_div1_reg) goto cleanup; -if (init_flags &DPLL_HAS_AUTOIDLE ) { +if (dd->autoidle_mask) { dd->autoidle_reg =ti_clk_get_reg_addr (node,3 );if (!dd->autoidle_reg) goto cleanup;
@@ -310,7 +306,7 @@ static void __init of_ti_omap3_dpll_setup(struct device_node *node) .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), }; -of_ti_dpll_setup (node, &omap3_dpll_ck_ops, &dd,DPLL_HAS_AUTOIDLE ); +of_ti_dpll_setup (node, &omap3_dpll_ck_ops, &dd); }CLK_OF_DECLARE (ti_omap3_dpll_clock,"ti,omap3-dpll-clock" , of_ti_omap3_dpll_setup);
@@ -329,7 +325,7 @@ static void __init of_ti_omap3_core_dpll_setup(struct device_node *node) .freqsel_mask = 0xf0, }; -of_ti_dpll_setup (node, &omap3_dpll_core_ck_ops, &dd,DPLL_HAS_AUTOIDLE ); +of_ti_dpll_setup (node, &omap3_dpll_core_ck_ops, &dd); }CLK_OF_DECLARE (ti_omap3_core_dpll_clock,"ti,omap3-dpll-core-clock" , of_ti_omap3_core_dpll_setup);
@@ -349,7 +345,7 @@ static void __init of_ti_omap3_per_dpll_setup(struct device_node *node) .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED), }; -of_ti_dpll_setup (node, &omap3_dpll_per_ck_ops, &dd,DPLL_HAS_AUTOIDLE ); +of_ti_dpll_setup (node, &omap3_dpll_per_ck_ops, &dd); }CLK_OF_DECLARE (ti_omap3_per_dpll_clock,"ti,omap3-dpll-per-clock" , of_ti_omap3_per_dpll_setup);
@@ -371,7 +367,7 @@ static void __init of_ti_omap3_per_jtype_dpll_setup(struct device_node *node) .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED), }; -of_ti_dpll_setup (node, &omap3_dpll_per_ck_ops, &dd,DPLL_HAS_AUTOIDLE ); +of_ti_dpll_setup (node, &omap3_dpll_per_ck_ops, &dd); }CLK_OF_DECLARE (ti_omap3_per_jtype_dpll_clock,"ti,omap3-dpll-per-j-type-clock" , of_ti_omap3_per_jtype_dpll_setup);
@@ -391,7 +387,7 @@ static void __init of_ti_omap4_dpll_setup(struct device_node *node) .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), }; -of_ti_dpll_setup (node, &dpll_ck_ops, &dd,DPLL_HAS_AUTOIDLE ); +of_ti_dpll_setup (node, &dpll_ck_ops, &dd); }CLK_OF_DECLARE (ti_omap4_dpll_clock,"ti,omap4-dpll-clock" , of_ti_omap4_dpll_setup);
@@ -410,7 +406,7 @@ static void __init of_ti_omap4_core_dpll_setup(struct device_node *node) .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), }; -of_ti_dpll_setup (node, &dpll_core_ck_ops, &dd,DPLL_HAS_AUTOIDLE ); +of_ti_dpll_setup (node, &dpll_core_ck_ops, &dd); }CLK_OF_DECLARE (ti_omap4_core_dpll_clock,"ti,omap4-dpll-core-clock" , of_ti_omap4_core_dpll_setup);
@@ -433,7 +429,7 @@ static void __init of_ti_omap4_m4xen_dpll_setup(struct device_node *node) .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), }; -of_ti_dpll_setup (node, &dpll_m4xen_ck_ops, &dd,DPLL_HAS_AUTOIDLE ); +of_ti_dpll_setup (node, &dpll_m4xen_ck_ops, &dd); }CLK_OF_DECLARE (ti_omap4_m4xen_dpll_clock,"ti,omap4-dpll-m4xen-clock" , of_ti_omap4_m4xen_dpll_setup);
@@ -454,7 +450,7 @@ static void __init of_ti_omap4_jtype_dpll_setup(struct device_node *node) .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), }; -of_ti_dpll_setup (node, &dpll_m4xen_ck_ops, &dd,DPLL_HAS_AUTOIDLE ); +of_ti_dpll_setup (node, &dpll_m4xen_ck_ops, &dd); }CLK_OF_DECLARE (ti_omap4_jtype_dpll_clock,"ti,omap4-dpll-j-type-clock" , of_ti_omap4_jtype_dpll_setup);
@@ -465,7 +461,6 @@ static void __init of_ti_am3_no_gate_dpll_setup(struct device_node *node)const struct dpll_data dd = { .idlest_mask =0x1 , .enable_mask =0x7 , - .autoidle_mask =0x7 , .mult_mask =0x7ff <<8 , .div1_mask =0x7f , .max_multiplier =2047 ,
@@ -474,7 +469,7 @@ static void __init of_ti_am3_no_gate_dpll_setup(struct device_node *node) .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), }; -of_ti_dpll_setup (node, &dpll_no_gate_ck_ops, &dd,0 ); +of_ti_dpll_setup (node, &dpll_no_gate_ck_ops, &dd); }CLK_OF_DECLARE (ti_am3_no_gate_dpll_clock,"ti,am3-dpll-no-gate-clock" , of_ti_am3_no_gate_dpll_setup);
@@ -484,7 +479,6 @@ static void __init of_ti_am3_jtype_dpll_setup(struct device_node *node)const struct dpll_data dd = { .idlest_mask =0x1 , .enable_mask =0x7 , - .autoidle_mask =0x7 , .mult_mask =0x7ff <<8 , .div1_mask =0x7f , .max_multiplier =4095 ,
@@ -494,7 +488,7 @@ static void __init of_ti_am3_jtype_dpll_setup(struct device_node *node) .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), }; -of_ti_dpll_setup (node, &dpll_ck_ops, &dd,0 ); +of_ti_dpll_setup (node, &dpll_ck_ops, &dd); }CLK_OF_DECLARE (ti_am3_jtype_dpll_clock,"ti,am3-dpll-j-type-clock" , of_ti_am3_jtype_dpll_setup);
@@ -504,7 +498,6 @@ static void __init of_ti_am3_no_gate_jtype_dpll_setup(struct device_node *node)const struct dpll_data dd = { .idlest_mask =0x1 , .enable_mask =0x7 , - .autoidle_mask =0x7 , .mult_mask =0x7ff <<8 , .div1_mask =0x7f , .max_multiplier =2047 ,
@@ -514,7 +507,7 @@ static void __init of_ti_am3_no_gate_jtype_dpll_setup(struct device_node *node) .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), }; -of_ti_dpll_setup (node, &dpll_no_gate_ck_ops, &dd,0 ); +of_ti_dpll_setup (node, &dpll_no_gate_ck_ops, &dd); } CLK_OF_DECLARE(ti_am3_no_gate_jtype_dpll_clock, "ti,am3-dpll-no-gate-j-type-clock",
@@ -525,7 +518,6 @@ static void __init of_ti_am3_dpll_setup(struct device_node *node)const struct dpll_data dd = { .idlest_mask =0x1 , .enable_mask =0x7 , - .autoidle_mask =0x7 , .mult_mask =0x7ff <<8 , .div1_mask =0x7f , .max_multiplier =2047 ,
@@ -534,7 +526,7 @@ static void __init of_ti_am3_dpll_setup(struct device_node *node) .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), }; -of_ti_dpll_setup (node, &dpll_ck_ops, &dd,0 ); +of_ti_dpll_setup (node, &dpll_ck_ops, &dd); }CLK_OF_DECLARE (ti_am3_dpll_clock,"ti,am3-dpll-clock" , of_ti_am3_dpll_setup);
@@ -543,7 +535,6 @@ static void __init of_ti_am3_core_dpll_setup(struct device_node *node)const struct dpll_data dd = { .idlest_mask =0x1 , .enable_mask =0x7 , - .autoidle_mask =0x7 , .mult_mask =0x7ff <<8 , .div1_mask =0x7f , .max_multiplier =2047 ,
@@ -552,7 +543,7 @@ static void __init of_ti_am3_core_dpll_setup(struct device_node *node) .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), }; -of_ti_dpll_setup (node, &dpll_core_ck_ops, &dd,0 ); +of_ti_dpll_setup (node, &dpll_core_ck_ops, &dd); }CLK_OF_DECLARE (ti_am3_core_dpll_clock,"ti,am3-dpll-core-clock" , of_ti_am3_core_dpll_setup);
Signature · 1 line
1.7.9.5
PATCH v2 4/14 CLK: TI: DPLL: add support for omap2 core dpll
In reply to Tero KristoOMAP2 has slightly different DPLL compared to later OMAP generations. This patch adds support for the ti,omap2-dpll-core-clock and also adds the bindings documentation.
--- .../devicetree/bindings/clock/ti/dpll.txt | 9 +++ arch/arm/mach-omap2/clock.h | 1 - arch/arm/mach-omap2/clock2xxx.h | 4 -- drivers/clk/ti/dpll.c | 76 +++++++++++++++++--- include/linux/clk/ti.h | 6 ++ 5 files changed, 80 insertions(+), 16 deletions(-)
Documentation/devicetree/bindings/clock/ti/dpll.txt +9 -0
@@ -30,6 +30,7 @@ Required properties: "ti,am3-dpll-clock", "ti,am3-dpll-core-clock", "ti,am3-dpll-x2-clock", + "ti,omap2-dpll-core-clock", - #clock-cells : from common clock binding; shall be set to 0. - clocks : link phandles of parent clocks, first entry lists reference clock
@@ -41,6 +42,7 @@ Required properties: "mult-div1" - contains the multiplier / divider register base address "autoidle" - contains the autoidle register base address (optional) ti,am3-* dpll types do not have autoidle register + ti,omap2-* dpll type does not support idlest / autoidle registers Optional properties: - DPLL mode setting - defining any one or more of the following overrides
@@ -73,3 +75,10 @@ Examples: clocks = <&sys_clkin_ck>, <&sys_clkin_ck>; reg = <0x90>, <0x5c>, <0x68>; }; + + dpll_ck: dpll_ck { + #clock-cells = <0>; + compatible = "ti,omap2-dpll-core-clock"; + clocks = <&sys_ck>, <&sys_ck>; + reg = <0x0500>, <0x0540>; + };
arch/arm/mach-omap2/clock.h +0 -1
@@ -276,7 +276,6 @@ extern const struct clk_hw_omap_ops clkhwops_omap3430es2_hsotgusb_wait;extern const struct clk_hw_omap_ops clkhwops_am35xx_ipss_module_wait;extern const struct clk_hw_omap_ops clkhwops_apll54;extern const struct clk_hw_omap_ops clkhwops_apll96; -extern const struct clk_hw_omap_ops clkhwops_omap2xxx_dpll;extern const struct clk_hw_omap_ops clkhwops_omap2430_i2chs_wait;/* clksel_rate blocks shared between OMAP44xx and AM33xx */
arch/arm/mach-omap2/clock2xxx.h +0 -4
@@ -21,10 +21,6 @@ unsigned long omap2xxx_sys_clk_recalc(struct clk_hw *clk, unsigned long parent_rate);unsigned long omap2_osc_clk_recalc (struct clk_hw *clk,unsigned long parent_rate); -unsigned long omap2_dpllcore_recalc (struct clk_hw *hw, -unsigned long parent_rate); -int omap2_reprogram_dpllcore (struct clk_hw *clk,unsigned long rate, -unsigned long parent_rate);void omap2xxx_clkt_dpllcore_init (struct clk_hw *hw);unsigned long omap2_clk_apll54_recalc (struct clk_hw *hw,unsigned long parent_rate);
drivers/clk/ti/dpll.c +65 -11
105 lines not on this page · raw message
include/linux/clk/ti.h +6 -0
@@ -255,6 +255,11 @@ int omap2_dflt_clk_enable(struct clk_hw *hw);void omap2_dflt_clk_disable (struct clk_hw *hw);int omap2_dflt_clk_is_enabled (struct clk_hw *hw);void omap3_clk_lock_dpll5 (void ); +unsigned long omap2_dpllcore_recalc (struct clk_hw *hw, +unsigned long parent_rate); +int omap2_reprogram_dpllcore (struct clk_hw *clk,unsigned long rate, +unsigned long parent_rate); +void omap2xxx_clkt_dpllcore_init (struct clk_hw *hw);void __iomem *ti_clk_get_reg_addr (struct device_node *node,int index);void ti_dt_clocks_register (struct ti_dt_clk *oclks);
@@ -283,6 +288,7 @@ static inline void of_ti_clk_allow_autoidle_all(void) { }static inline void of_ti_clk_deny_autoidle_all (void ) { }#endif +extern const struct clk_hw_omap_ops clkhwops_omap2xxx_dpll;extern const struct clk_hw_omap_ops clkhwops_omap3_dpll;extern const struct clk_hw_omap_ops clkhwops_omap4_dpllmx;extern const struct clk_hw_omap_ops clkhwops_wait;
Signature · 1 line
1.7.9.5
PATCH v2 5/14 CLK: TI: APLL: add support for omap2 aplls
In reply to Tero KristoThis patch adds support for omap2 type aplls, which have gating and autoidle functionality.
--- .../devicetree/bindings/clock/ti/apll.txt | 24 ++- arch/arm/mach-omap2/clock.h | 11 -- drivers/clk/ti/apll.c | 181 ++++++++++++++++++++ include/linux/clk/ti.h | 21 ++- 4 files changed, 220 insertions(+), 17 deletions(-)
Documentation/devicetree/bindings/clock/ti/apll.txt +19 -5
@@ -14,18 +14,32 @@ a subtype of a DPLL [2], although a simplified one at that. [2] Documentation/devicetree/bindings/clock/ti/dpll.txt Required properties: -- compatible : shall be "ti,dra7-apll-clock" +- compatible : shall be "ti,dra7-apll-clock" or "ti,omap2-apll-clock" - #clock-cells : from common clock binding; shall be set to 0. - clocks : link phandles of parent clocks (clk-ref and clk-bypass) - reg : address and length of the register set for controlling the APLL. It contains the information of registers in the following order: - "control" - contains the control register base address - "idlest" - contains the idlest register base address + "control" - contains the control register offset + "idlest" - contains the idlest register offset + "autoidle" - contains the autoidle register offset (OMAP2 only) +- ti,clock-frequency : static clock frequency for the clock (OMAP2 only) +- ti,idlest-shift : bit-shift for the idlest field (OMAP2 only) +- ti,bit-shift : bit-shift for enable and autoidle fields (OMAP2 only) Examples: - apll_pcie_ck: apll_pcie_ck at 4a008200 { + apll_pcie_ck: apll_pcie_ck { #clock-cells = <0>; clocks = <&apll_pcie_in_clk_mux>, <&dpll_pcie_ref_ck>; - reg = <0x4a00821c 0x4>, <0x4a008220 0x4>; + reg = <0x021c>, <0x0220>; compatible = "ti,dra7-apll-clock"; }; + + apll96_ck: apll96_ck { + #clock-cells = <0>; + compatible = "ti,omap2-apll-clock"; + clocks = <&sys_ck>; + ti,bit-shift = <2>; + ti,idlest-shift = <8>; + ti,clock-frequency = <96000000>; + reg = <0x0500>, <0x0530>, <0x0520>; + };
arch/arm/mach-omap2/clock.h +0 -11
@@ -178,17 +178,6 @@ struct clksel {const struct clksel_rate *rates; }; -struct clk_hw_omap_ops { -void (*find_idlest)(struct clk_hw_omap *oclk, -void __iomem **idlest_reg, -u8 *idlest_bit,u8 *idlest_val); -void (*find_companion)(struct clk_hw_omap *oclk, -void __iomem **other_reg, -u8 *other_bit); -void (*allow_idle)(struct clk_hw_omap *oclk); -void (*deny_idle)(struct clk_hw_omap *oclk); -}; -/* CM_CLKSEL2_PLL.CORE_CLK_SRC bits (2XXX) */ #define CORE_CLK_SRC_32K 0x0#define CORE_CLK_SRC_DPLL 0x1
drivers/clk/ti/apll.c +181 -0
184 lines not on this page · raw message
include/linux/clk/ti.h +20 -1
@@ -94,7 +94,26 @@ struct dpll_data {u8 flags; }; -struct clk_hw_omap_ops ; +struct clk_hw_omap ; + +/** +* struct clk_hw_omap_ops - OMAP clk ops +* @find_idlest: find idlest register information for a clock +* @find_companion: find companion clock register information for a clock, +* basically converts CM_ICLKEN* <-> CM_FCLKEN* +* @allow_idle: enables autoidle hardware functionality for a clock +* @deny_idle: prevent autoidle hardware functionality for a clock +*/ +struct clk_hw_omap_ops { +void (*find_idlest)(struct clk_hw_omap *oclk, +void __iomem **idlest_reg, +u8 *idlest_bit,u8 *idlest_val); +void (*find_companion)(struct clk_hw_omap *oclk, +void __iomem **other_reg, +u8 *other_bit); +void (*allow_idle)(struct clk_hw_omap *oclk); +void (*deny_idle)(struct clk_hw_omap *oclk); +};/** * struct clk_hw_omap - OMAP struct clk
Signature · 1 line
1.7.9.5
PATCH v2 6/14 CLK: TI: gate: fixed DT binding documentation bugs
In reply to Tero Kristoti,composite-gate-clock documentation was missing, also the register offset examples were wrong.
--- .../devicetree/bindings/clock/ti/gate.txt | 29 +++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/clock/ti/gate.txt +25 -4
@@ -25,6 +25,11 @@ Required properties: to map clockdomains properly "ti,hsdiv-gate-clock" - gate clock with OMAP36xx specific hardware handling, required for a hardware errata + "ti,composite-gate-clock" - composite gate clock, to be part of composite + clock + "ti,composite-no-wait-gate-clock" - composite gate clock that does not wait + for clock to be active before returning + from clk_enable() - #clock-cells : from common clock binding; shall be set to 0 - clocks : link to phandle of parent clock - reg : offset for register controlling adjustable gate, not needed for
@@ -41,7 +46,7 @@ Examples: #clock-cells = <0>; compatible = "ti,gate-clock"; clocks = <&core_96m_fck>; - reg = <0x48004a00 0x4>; + reg = <0x0a00>; ti,bit-shift = <25>; };
@@ -57,7 +62,7 @@ Examples: #clock-cells = <0>; compatible = "ti,dss-gate-clock"; clocks = <&dpll4_m4x2_ck>; - reg = <0x48004e00 0x4>; + reg = <0x0e00>; ti,bit-shift = <0>; };
@@ -65,7 +70,7 @@ Examples: #clock-cells = <0>; compatible = "ti,am35xx-gate-clock"; clocks = <&ipss_ick>; - reg = <0x4800259c 0x4>; + reg = <0x059c>; ti,bit-shift = <1>; };
@@ -80,6 +85,22 @@ Examples: compatible = "ti,hsdiv-gate-clock"; clocks = <&dpll4_m2x2_mul_ck>; ti,bit-shift = <0x1b>; - reg = <0x48004d00 0x4>; + reg = <0x0d00>; ti,set-bit-to-disable; }; + + vlynq_gate_fck: vlynq_gate_fck { + #clock-cells = <0>; + compatible = "ti,composite-gate-clock"; + clocks = <&core_ck>; + ti,bit-shift = <3>; + reg = <0x0200>; + }; + + sys_clkout2_src_gate: sys_clkout2_src_gate { + #clock-cells = <0>; + compatible = "ti,composite-no-wait-gate-clock"; + clocks = <&core_ck>; + ti,bit-shift = <15>; + reg = <0x0070>; + };
Signature · 1 line
1.7.9.5
PATCH v2 7/14 CLK: TI: interface: add support for omap2430 specific interface clock
In reply to Tero KristoOMAP2430 I2CHS modules require specific hardware ops to be used, so added a new compatible string for this.
--- .../devicetree/bindings/clock/ti/interface.txt | 2 ++ arch/arm/mach-omap2/clock.h | 1 - drivers/clk/ti/interface.c | 11 +++++++++++ include/linux/clk/ti.h | 1 + 4 files changed, 14 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/clock/ti/interface.txt +2 -0
@@ -21,6 +21,8 @@ Required properties: "ti,omap3-dss-interface-clock" - interface clock with DSS specific HW handling "ti,omap3-ssi-interface-clock" - interface clock with SSI specific HW handling "ti,am35xx-interface-clock" - interface clock with AM35xx specific HW handling + "ti,omap2430-interface-clock" - interface clock with OMAP2430 specific HW + handling - #clock-cells : from common clock binding; shall be set to 0 - clocks : link to phandle of parent clock - reg : base address for the control register
arch/arm/mach-omap2/clock.h +0 -1
@@ -265,7 +265,6 @@ extern const struct clk_hw_omap_ops clkhwops_omap3430es2_hsotgusb_wait;extern const struct clk_hw_omap_ops clkhwops_am35xx_ipss_module_wait;extern const struct clk_hw_omap_ops clkhwops_apll54;extern const struct clk_hw_omap_ops clkhwops_apll96; -extern const struct clk_hw_omap_ops clkhwops_omap2430_i2chs_wait;/* clksel_rate blocks shared between OMAP44xx and AM33xx */ extern const struct clksel_rate div_1_0_rates[];
drivers/clk/ti/interface.c +11 -0
@@ -94,6 +94,7 @@ static void __init of_ti_no_wait_interface_clk_setup(struct device_node *node)CLK_OF_DECLARE (ti_no_wait_interface_clk,"ti,omap3-no-wait-interface-clock" , of_ti_no_wait_interface_clk_setup); +#ifdef CONFIG_ARCH_OMAP3 static void __init of_ti_hsotgusb_interface_clk_setup (struct device_node *node) { _of_ti_interface_clk_setup(node,
@@ -123,3 +124,13 @@ static void __init of_ti_am35xx_interface_clk_setup(struct device_node *node) }CLK_OF_DECLARE (ti_am35xx_interface_clk,"ti,am35xx-interface-clock" , of_ti_am35xx_interface_clk_setup); +#endif + +#ifdef CONFIG_SOC_OMAP2430 +static void __init of_ti_omap2430_interface_clk_setup (struct device_node *node) +{ +_of_ti_interface_clk_setup (node, &clkhwops_omap2430_i2chs_wait); +} +CLK_OF_DECLARE (ti_omap2430_interface_clk,"ti,omap2430-interface-clock" , + of_ti_omap2430_interface_clk_setup); +#endif
include/linux/clk/ti.h +1 -0
@@ -308,6 +308,7 @@ static inline void of_ti_clk_deny_autoidle_all(void) { }#endif extern const struct clk_hw_omap_ops clkhwops_omap2xxx_dpll; +extern const struct clk_hw_omap_ops clkhwops_omap2430_i2chs_wait;extern const struct clk_hw_omap_ops clkhwops_omap3_dpll;extern const struct clk_hw_omap_ops clkhwops_omap4_dpllmx;extern const struct clk_hw_omap_ops clkhwops_wait;
Signature · 1 line
1.7.9.5
PATCH v2 8/14 CLK: TI: OMAP2: add clock init support
In reply to Tero KristoAdds support for registering the alias clocks, boot time clock-enable list and disabling autoidle of clocks.
--- drivers/clk/ti/Makefile | 1 + drivers/clk/ti/clk-2xxx.c | 254 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/clk/ti.h | 2 + 3 files changed, 257 insertions(+) create mode 100644 drivers/clk/ti/clk-2xxx.c
drivers/clk/ti/Makefile +1 -0
@@ -3,6 +3,7 @@ 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 obj-$(CONFIG_SOC_AM33XX) += $(clk-common) clk-33xx.o +obj-$(CONFIG_ARCH_OMAP2) += $(clk-common) interface.o clk-2xxx.o obj-$(CONFIG_ARCH_OMAP3) += $(clk-common) interface.o clk-3xxx.o obj-$(CONFIG_ARCH_OMAP4) += $(clk-common) clk-44xx.o obj-$(CONFIG_SOC_OMAP5) += $(clk-common) clk-54xx.o
drivers/clk/ti/clk-2xxx.c new file +254 -0
254 lines not on this page · raw message
include/linux/clk/ti.h +2 -0
@@ -298,6 +298,8 @@ int omap5xxx_dt_clk_init(void);int dra7xx_dt_clk_init (void );int am33xx_dt_clk_init (void );int am43xx_dt_clk_init (void ); +int omap2420_dt_clk_init (void ); +int omap2430_dt_clk_init (void );#ifdef CONFIG_OF void of_ti_clk_allow_autoidle_all (void );
Signature · 1 line
1.7.9.5
PATCH v2 9/14 ARM: OMAP2: PRM: add support for OMAP2 specific clock providers
In reply to Tero KristoThis patch adds support for initializing also omap2-prcm and omap2-scrm through DT.
--- .../devicetree/bindings/arm/omap/prcm.txt | 65 ++++++++++++++++++++ arch/arm/mach-omap2/prm_common.c | 2 + 2 files changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/prcm.txt
Documentation/devicetree/bindings/arm/omap/prcm.txt new file +65 -0
@@ -0,0 +1,65 @@ +OMAP PRCM bindings + +Power Reset and Clock Manager lists the device clocks and clockdomains under +a DT hierarchy. Each TI SoC can have multiple PRCM entities listed for it, +each describing one module and the clock hierarchy under it. see [1] for +documentation about the individual clock/clockdomain nodes. + +[1] Documentation/devicetree/bindings/clock/ti/* + +Required properties: +- compatible: Must be one of: + "ti,am3-prcm" + "ti,am3-scrm" + "ti,am4-prcm" + "ti,am4-scrm" + "ti,omap2-prcm" + "ti,omap2-scrm" + "ti,omap3-prm" + "ti,omap3-cm" + "ti,omap3-scrm" + "ti,omap4-cm1" + "ti,omap4-prm" + "ti,omap4-cm2" + "ti,omap4-scrm" + "ti,omap5-prm" + "ti,omap5-cm-core-aon" + "ti,omap5-scrm" + "ti,omap5-cm-core" + "ti,dra7-prm" + "ti,dra7-cm-core-aon" + "ti,dra7-cm-core" +- reg: Contains PRCM module register address range + (base address and length) +- clocks: clocks for this module +- clockdomains: clockdomains for this module + +Example: + +cm: cm at 48004000 { + compatible = "ti,omap3-cm"; + reg = <0x48004000 0x4000>; + + cm_clocks: clocks { + #address-cells = <1>; + #size-cells = <0>; + }; + + cm_clockdomains: clockdomains { + }; +} + +&cm_clocks { + omap2_32k_fck: omap_32k_fck { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <32768>; + }; +}; + +&cm_clockdomains { + core_l3_clkdm: core_l3_clkdm { + compatible = "ti,clockdomain"; + clocks = <&sdrc_ick>; + }; +};
arch/arm/mach-omap2/prm_common.c +2 -0
@@ -475,6 +475,8 @@ static struct of_device_id omap_prcm_dt_match_table[] = { { .compatible = "ti,am3-scrm" }, { .compatible = "ti,am4-prcm" }, { .compatible = "ti,am4-scrm" }, + { .compatible = "ti,omap2-prcm" }, + { .compatible = "ti,omap2-scrm" }, { .compatible = "ti,omap3-prm" }, { .compatible = "ti,omap3-cm" }, { .compatible = "ti,omap3-scrm" },
Signature · 1 line
1.7.9.5
PATCH v2 10/14 ARM: dts: omap2 clock data
In reply to Tero KristoThis patch creates a unique node for each clock in the OMAP2 power, reset and clock manager (PRCM).
--- arch/arm/boot/dts/omap2420-clocks.dtsi | 270 +++++++ arch/arm/boot/dts/omap2420.dtsi | 29 + arch/arm/boot/dts/omap2430-clocks.dtsi | 344 +++++++++ arch/arm/boot/dts/omap2430.dtsi | 29 + arch/arm/boot/dts/omap24xx-clocks.dtsi | 1244 ++++++++++++++++++++++++++++++++ 5 files changed, 1916 insertions(+) create mode 100644 arch/arm/boot/dts/omap2420-clocks.dtsi create mode 100644 arch/arm/boot/dts/omap2430-clocks.dtsi create mode 100644 arch/arm/boot/dts/omap24xx-clocks.dtsi
arch/arm/boot/dts/omap2420-clocks.dtsi new file +270 -0
@@ -0,0 +1,270 @@ +/* + * Device Tree Source for OMAP2420 clock data + * + * Copyright (C) 2014 Texas Instruments, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +&prcm_clocks { + sys_clkout2_src_gate: sys_clkout2_src_gate { + #clock-cells = <0>; + compatible = "ti,composite-no-wait-gate-clock"; + clocks = <&core_ck>; + ti,bit-shift = <15>; + reg = <0x0070>; + }; + + sys_clkout2_src_mux: sys_clkout2_src_mux { + #clock-cells = <0>; + compatible = "ti,composite-mux-clock"; + clocks = <&core_ck>, <&sys_ck>, <&func_96m_ck>, <&func_54m_ck>; + ti,bit-shift = <8>; + reg = <0x0070>; + }; + + sys_clkout2_src: sys_clkout2_src { + #clock-cells = <0>; + compatible = "ti,composite-clock"; + clocks = <&sys_clkout2_src_gate>, <&sys_clkout2_src_mux>; + }; + + sys_clkout2: sys_clkout2 { + #clock-cells = <0>; + compatible = "ti,divider-clock"; + clocks = <&sys_clkout2_src>; + ti,bit-shift = <11>; + ti,max-div = <64>; + reg = <0x0070>; + ti,index-power-of-two; + }; + + dsp_gate_ick: dsp_gate_ick { + #clock-cells = <0>; + compatible = "ti,composite-interface-clock"; + clocks = <&dsp_fck>; + ti,bit-shift = <1>; + reg = <0x0810>; + }; + + dsp_div_ick: dsp_div_ick { + #clock-cells = <0>; + compatible = "ti,composite-divider-clock"; + clocks = <&dsp_fck>; + ti,bit-shift = <5>; + ti,max-div = <3>; + reg = <0x0840>; + ti,index-starts-at-one; + }; + + dsp_ick: dsp_ick { + #clock-cells = <0>; + compatible = "ti,composite-clock"; + clocks = <&dsp_gate_ick>, <&dsp_div_ick>; + }; + + iva1_gate_ifck: iva1_gate_ifck { + #clock-cells = <0>; + compatible = "ti,composite-gate-clock"; + clocks = <&core_ck>; + ti,bit-shift = <10>; + reg = <0x0800>; + }; + + iva1_div_ifck: iva1_div_ifck { + #clock-cells = <0>; + compatible = "ti,composite-divider-clock"; + clocks = <&core_ck>; + ti,bit-shift = <8>; + reg = <0x0840>; + ti,dividers = <0>, <1>, <2>, <3>, <4>, <0>, <6>, <0>, <8>, <0>, <0>, <0>, <12>; + }; + + iva1_ifck: iva1_ifck { + #clock-cells = <0>; + compatible = "ti,composite-clock"; + clocks = <&iva1_gate_ifck>, <&iva1_div_ifck>; + }; + + iva1_ifck_div: iva1_ifck_div { + #clock-cells = <0>; + compatible = "fixed-factor-clock"; + clocks = <&iva1_ifck>; + clock-mult = <1>; + clock-div = <2>; + }; + + iva1_mpu_int_ifck: iva1_mpu_int_ifck { + #clock-cells = <0>; + compatible = "ti,wait-gate-clock"; + clocks = <&iva1_ifck_div>; + ti,bit-shift = <8>; + reg = <0x0800>; + }; + + wdt3_ick: wdt3_ick { + #clock-cells = <0>; + compatible = "ti,omap3-interface-clock"; + clocks = <&l4_ck>; + ti,bit-shift = <28>; + reg = <0x0210>; + }; + + wdt3_fck: wdt3_fck { + #clock-cells = <0>; + compatible = "ti,wait-gate-clock"; + clocks = <&func_32k_ck>; + ti,bit-shift = <28>; + reg = <0x0200>; + }; + + mmc_ick: mmc_ick { + #clock-cells = <0>; + compatible = "ti,omap3-interface-clock"; + clocks = <&l4_ck>; + ti,bit-shift = <26>; + reg = <0x0210>; + }; + + mmc_fck: mmc_fck { + #clock-cells = <0>; + compatible = "ti,wait-gate-clock"; + clocks = <&func_96m_ck>; + ti,bit-shift = <26>; + reg = <0x0200>; + }; + + eac_ick: eac_ick { + #clock-cells = <0>; + compatible = "ti,omap3-interface-clock"; + clocks = <&l4_ck>; + ti,bit-shift = <24>; + reg = <0x0210>; + }; + + eac_fck: eac_fck { + #clock-cells = <0>; + compatible = "ti,wait-gate-clock"; + clocks = <&func_96m_ck>; + ti,bit-shift = <24>; + reg = <0x0200>; + }; + + i2c1_fck: i2c1_fck { + #clock-cells = <0>; + compatible = "ti,wait-gate-clock"; + clocks = <&func_12m_ck>; + ti,bit-shift = <19>; + reg = <0x0200>; + }; + + i2c2_fck: i2c2_fck { + #clock-cells = <0>; + compatible = "ti,wait-gate-clock"; + clocks = <&func_12m_ck>; + ti,bit-shift = <20>; + reg = <0x0200>; + }; + + vlynq_ick: vlynq_ick { + #clock-cells = <0>; + compatible = "ti,omap3-interface-clock"; + clocks = <&core_l3_ck>; + ti,bit-shift = <3>; + reg = <0x0210>; + }; + + vlynq_gate_fck: vlynq_gate_fck { + #clock-cells = <0>; + compatible = "ti,composite-gate-clock"; + clocks = <&core_ck>; + ti,bit-shift = <3>; + reg = <0x0200>; + }; + + core_d18_ck: core_d18_ck { + #clock-cells = <0>; + compatible = "fixed-factor-clock"; + clocks = <&core_ck>; + clock-mult = <1>; + clock-div = <18>; + }; + + vlynq_mux_fck: vlynq_mux_fck { + #clock-cells = <0>; + compatible = "ti,composite-mux-clock"; + clocks = <&func_96m_ck>, <&core_ck>, <&core_d2_ck>, <&core_d3_ck>, <&core_d4_ck>, <&dummy_ck>, <&core_d6_ck>, <&dummy_ck>, <&core_d8_ck>, <&core_d9_ck>, <&dummy_ck>, <&dummy_ck>, <&core_d12_ck>, <&dummy_ck>, <&dummy_ck>, <&dummy_ck>, <&core_d16_ck>, <&dummy_ck>, <&core_d18_ck>; + ti,bit-shift = <15>; + reg = <0x0240>; + }; + + vlynq_fck: vlynq_fck { + #clock-cells = <0>; + compatible = "ti,composite-clock"; + clocks = <&vlynq_gate_fck>, <&vlynq_mux_fck>; + }; +}; + +&prcm_clockdomains { + gfx_clkdm: gfx_clkdm { + compatible = "ti,clockdomain"; + clocks = <&gfx_ick>; + }; + + core_l3_clkdm: core_l3_clkdm { + compatible = "ti,clockdomain"; + clocks = <&cam_fck>, <&vlynq_ick>, <&usb_fck>; + }; + + wkup_clkdm: wkup_clkdm { + compatible = "ti,clockdomain"; + clocks = <&dpll_ck>, <&emul_ck>, <&gpt1_ick>, <&gpios_ick>, + <&gpios_fck>, <&mpu_wdt_ick>, <&mpu_wdt_fck>, + <&sync_32k_ick>, <&wdt1_ick>, <&omapctrl_ick>; + }; + + iva1_clkdm: iva1_clkdm { + compatible = "ti,clockdomain"; + clocks = <&iva1_mpu_int_ifck>; + }; + + dss_clkdm: dss_clkdm { + compatible = "ti,clockdomain"; + clocks = <&dss_ick>, <&dss_54m_fck>; + }; + + core_l4_clkdm: core_l4_clkdm { + compatible = "ti,clockdomain"; + clocks = <&ssi_l4_ick>, <&gpt2_ick>, <&gpt3_ick>, <&gpt4_ick>, + <&gpt5_ick>, <&gpt6_ick>, <&gpt7_ick>, <&gpt8_ick>, + <&gpt9_ick>, <&gpt10_ick>, <&gpt11_ick>, <&gpt12_ick>, + <&mcbsp1_ick>, <&mcbsp2_ick>, <&mcspi1_ick>, + <&mcspi1_fck>, <&mcspi2_ick>, <&mcspi2_fck>, + <&uart1_ick>, <&uart1_fck>, <&uart2_ick>, <&uart2_fck>, + <&uart3_ick>, <&uart3_fck>, <&cam_ick>, + <&mailboxes_ick>, <&wdt4_ick>, <&wdt4_fck>, + <&wdt3_ick>, <&wdt3_fck>, <&mspro_ick>, <&mspro_fck>, + <&mmc_ick>, <&mmc_fck>, <&fac_ick>, <&fac_fck>, + <&eac_ick>, <&eac_fck>, <&hdq_ick>, <&hdq_fck>, + <&i2c1_ick>, <&i2c1_fck>, <&i2c2_ick>, <&i2c2_fck>, + <&des_ick>, <&sha_ick>, <&rng_ick>, <&aes_ick>, + <&pka_ick>; + }; +}; + +&func_96m_ck { + compatible = "fixed-factor-clock"; + clocks = <&apll96_ck>; + clock-mult = <1>; + clock-div = <1>; +}; + +&dsp_div_fck { + ti,dividers = <0>, <1>, <2>, <3>, <4>, <0>, <6>, <0>, <8>, <0>, <0>, <0>, <12>; +}; + +&ssi_ssr_sst_div_fck { + ti,dividers = <0>, <1>, <2>, <3>, <4>, <0>, <6>, <0>, <8>; +};
arch/arm/boot/dts/omap2420.dtsi +29 -0
@@ -14,6 +14,32 @@ compatible = "ti,omap2420", "ti,omap2"; ocp { + prcm: prcm at 48008000 { + compatible = "ti,omap2-prcm"; + reg = <0x48008000 0x1000>; + + prcm_clocks: clocks { + #address-cells = <1>; + #size-cells = <0>; + }; + + prcm_clockdomains: clockdomains { + }; + }; + + scrm: scrm at 48000000 { + compatible = "ti,omap2-scrm"; + reg = <0x48000000 0x1000>; + + scrm_clocks: clocks { + #address-cells = <1>; + #size-cells = <0>; + }; + + scrm_clockdomains: clockdomains { + }; + }; + counter32k: counter at 48004000 { compatible = "ti,omap-counter32k"; reg = <0x48004000 0x20>;
@@ -146,3 +172,6 @@ &i2c2 { compatible = "ti,omap2420-i2c"; }; + +/include/ "omap24xx-clocks.dtsi" +/include/ "omap2420-clocks.dtsi"
arch/arm/boot/dts/omap2430-clocks.dtsi new file +344 -0
344 lines not on this page · raw message
arch/arm/boot/dts/omap2430.dtsi +29 -0
@@ -14,6 +14,32 @@ compatible = "ti,omap2430", "ti,omap2"; ocp { + prcm: prcm at 49006000 { + compatible = "ti,omap2-prcm"; + reg = <0x49006000 0x1000>; + + prcm_clocks: clocks { + #address-cells = <1>; + #size-cells = <0>; + }; + + prcm_clockdomains: clockdomains { + }; + }; + + scrm: scrm at 49002000 { + compatible = "ti,omap2-scrm"; + reg = <0x49002000 0x1000>; + + scrm_clocks: clocks { + #address-cells = <1>; + #size-cells = <0>; + }; + + scrm_clockdomains: clockdomains { + }; + }; + counter32k: counter at 49020000 { compatible = "ti,omap-counter32k"; reg = <0x49020000 0x20>;
@@ -233,3 +259,6 @@ &i2c2 { compatible = "ti,omap2430-i2c"; }; + +/include/ "omap24xx-clocks.dtsi" +/include/ "omap2430-clocks.dtsi"
arch/arm/boot/dts/omap24xx-clocks.dtsi new file +1244 -0
1,244 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v2 11/14 ARM: OMAP2: clock: add DT boot support for cpufreq_ck
In reply to Tero KristoThe clock and clkdev for this are added manually.
--- arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | 53 ++++++++++++++++++++++++++ drivers/clk/ti/clk-2xxx.c | 2 + include/linux/clk/ti.h | 1 + 3 files changed, 56 insertions(+)
arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +53 -0
@@ -208,3 +208,56 @@ void omap2xxx_clkt_vps_late_init(void)clk_put (c); } } + +#ifdef CONFIG_OF +#include <linux/clk-provider.h> +#include <linux/clkdev.h> + +static const struct clk_ops virt_prcm_set_ops = { + .recalc_rate = &omap2_table_mpu_recalc, + .set_rate = &omap2_select_table_rate, + .round_rate = &omap2_round_to_table_rate, +}; + +/** +* omap2xxx_clkt_vps_init - initialize virt_prcm_set clock +* +* Does a manual init for the virtual prcm DVFS clock for OMAP2. This +* function is called only from omap2 DT clock init, as the virtual +* node is not modelled in the DT clock data. +*/ +void omap2xxx_clkt_vps_init (void ) +{ +struct clk_init_data init = {NULL }; +struct clk_hw_omap *hw =NULL ; +struct clk *clk; +const char *parent_name ="mpu_ck" ; +struct clk_lookup *lookup =NULL ; + +omap2xxx_clkt_vps_late_init (); +omap2xxx_clkt_vps_check_bootloader_rates (); + + hw =kzalloc (sizeof (*hw),GFP_KERNEL ); + lookup =kzalloc (sizeof (*lookup),GFP_KERNEL ); +if (!hw || !lookup) + goto cleanup; + init.name ="virt_prcm_set" ; + init.ops = &virt_prcm_set_ops; + init.parent_names = &parent_name; + init.num_parents =1 ; + + hw->hw.init = &init; + + clk =clk_register (NULL , &hw->hw); + + lookup->dev_id =NULL ; + lookup->con_id ="cpufreq_ck" ; + lookup->clk = clk; + +clkdev_add (lookup); +return ; +cleanup: +kfree (hw); +kfree (lookup); +} +#endif
drivers/clk/ti/clk-2xxx.c +2 -0
@@ -229,6 +229,8 @@ static int __init omap2xxx_dt_clk_init(int soc_type)else ti_dt_clocks_register (omap2430_clks); +omap2xxx_clkt_vps_init (); +omap2_clk_disable_autoidle_all (); omap2_clk_enable_init_clocks(enable_init_clks,
include/linux/clk/ti.h +1 -0
@@ -279,6 +279,7 @@ unsigned long omap2_dpllcore_recalc(struct clk_hw *hw,int omap2_reprogram_dpllcore (struct clk_hw *clk,unsigned long rate,unsigned long parent_rate);void omap2xxx_clkt_dpllcore_init (struct clk_hw *hw); +void omap2xxx_clkt_vps_init (void );void __iomem *ti_clk_get_reg_addr (struct device_node *node,int index);void ti_dt_clocks_register (struct ti_dt_clk *oclks);
Signature · 1 line
1.7.9.5
PATCH v2 12/14 ARM: OMAP2: clock: use DT clock boot if available
In reply to Tero KristoOtherwise legacy boot clock data is used.
--- arch/arm/mach-omap2/io.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/io.c +13 -2
@@ -53,6 +53,7 @@#include "prm2xxx.h" #include "prm3xxx.h" #include "prm44xx.h" +#include "opp2xxx.h" /* * omap_clk_soc_init: points to a function that does the SoC-specific
@@ -410,7 +411,12 @@ void __init omap2420_init_early(void)omap242x_clockdomains_init ();omap2420_hwmod_init ();omap_hwmod_init_postsetup (); - omap_clk_soc_init = omap2420_clk_init; +if (of_have_populated_dt ()) { + omap_clk_soc_init = omap2420_dt_clk_init; + rate_table = omap2420_rate_table; + }else { + omap_clk_soc_init = omap2420_clk_init; + } }void __init omap2420_init_late (void )
@@ -439,7 +445,12 @@ void __init omap2430_init_early(void)omap243x_clockdomains_init ();omap2430_hwmod_init ();omap_hwmod_init_postsetup (); - omap_clk_soc_init = omap2430_clk_init; +if (of_have_populated_dt ()) { + omap_clk_soc_init = omap2430_dt_clk_init; + rate_table = omap2430_rate_table; + }else { + omap_clk_soc_init = omap2430_clk_init; + } }void __init omap2430_init_late (void )
Signature · 1 line
1.7.9.5
A message that is not in the archive (sent off-list or not yet received): 1393924700-6510-1-git-send-email-t-kristo-l0cyMroinI0@public.gmane.org
PATCH v2 13/14 ARM: OMAP24xx: clock: remove legacy clock data
This is no longer needed as clock data is provided through DT.
--- arch/arm/mach-omap2/Makefile | 3 +- arch/arm/mach-omap2/cclock2420_data.c | 1928 ------------------------------- arch/arm/mach-omap2/cclock2430_data.c | 2054 --------------------------------- arch/arm/mach-omap2/io.c | 16 +- 4 files changed, 5 insertions(+), 3996 deletions(-) delete mode 100644 arch/arm/mach-omap2/cclock2420_data.c delete mode 100644 arch/arm/mach-omap2/cclock2430_data.c
arch/arm/mach-omap2/Makefile +1 -2
@@ -177,8 +177,7 @@ obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_dpllcore.o obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_virt_prcm_set.o obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_apll.o obj-$(CONFIG_ARCH_OMAP2) += clkt2xxx_dpll.o clkt_iclk.o -obj-$(CONFIG_SOC_OMAP2420) += cclock2420_data.o -obj-$(CONFIG_SOC_OMAP2430) += clock2430.o cclock2430_data.o +obj-$(CONFIG_SOC_OMAP2430) += clock2430.o obj-$(CONFIG_ARCH_OMAP3) += $(clock-common) clock3xxx.o obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o clkt34xx_dpll3m2.o obj-$(CONFIG_ARCH_OMAP3) += clock3517.o clock36xx.o
arch/arm/mach-omap2/cclock2420_data.c deleted +0 -1928
1,928 lines not on this page · raw message
arch/arm/mach-omap2/cclock2430_data.c deleted +0 -2054
1,063 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Part of the diff is not shown here. View the raw message.
Tony Lindgren
maintainerPATCH v2 13/14 ARM: OMAP24xx: clock: remove legacy clock data
Quoted 1 line · Tero Kristo
This is no longer needed as clock data is provided through DT.
Looks like there's a new error even before applying this patch in the series as I'm now getting the following oops on n8x0. So cannot test this patch yet.
Regards,
Tony
[ 0.000000] Linux version 3.14.0-rc4-00012-g4c73c72 (tmlind at muffinssi) (gcc version 4.3.5 (Debian 4.3.5-4) ) #393 Tue Mar 4 09:28:18 PST 2014 [ 0.000000] CPU: ARMv6-compatible processor [4107b362] revision 2 (ARMv6TEJ), cr=00c5387d [ 0.000000] CPU: VIPT aliasing data cache, VIPT aliasing instruction cache [ 0.000000] Machine model: Nokia N800 [ 0.000000] bootconsole [earlycon0] enabled [ 0.000000] debug: ignoring loglevel setting. [ 0.000000] Memory policy: Data cache writeback [ 0.000000] On node 0 totalpages: 32768 [ 0.000000] free_area_init_node: node 0, pgdat c0764e70, node_mem_map c7ef9000 [ 0.000000] Normal zone: 256 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 32768 pages, LIFO batch:7 [ 0.000000] CPU: All CPU(s) started in SVC mode. [ 0.000000] OMAP2420 [ 0.000000] [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 [ 0.000000] Kernel command line: root=/dev/mmcblk0p2 rootwait console=ttyO2,115200 earlyprintk ignore_loglevel [ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes) [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) [ 0.000000] Memory: 116716K/131072K available (5085K kernel code, 354K rwdata, 1828K rodata, 278K init, 5483K bss, 14356K reserved, 0K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) [ 0.000000] vmalloc : 0xc8800000 - 0xff000000 ( 872 MB) [ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0008000 - 0xc06c8a68 (6915 kB) [ 0.000000] .init : 0xc06c9000 - 0xc070e9ac ( 279 kB) [ 0.000000] .data : 0xc0710000 - 0xc0768b50 ( 355 kB) [ 0.000000] .bss : 0xc0768b50 - 0xc0cc3a10 (5484 kB) [ 0.000000] NR_IRQS:16 nr_irqs:16 16 [ 0.000000] IRQ: Found an INTC at 0xfa0fe000 (revision 2.0) with 96 interrupts [ 0.000000] Total of 96 interrupts on 1 active controller [ 0.000000] ti_dt_clocks_register: failed to lookup clock node usb_l4_ick [ 0.000000] ti_dt_clocks_register: failed to lookup clock node dsp_ick [ 0.000000] Clocking rate (Crystal/DPLL/MPU): 19.2/658/329 MHz [ 0.000000] OMAP clockevent source: timer1 at 32768 Hz [ 0.000061] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 65536000000000ns [ 0.008758] OMAP clocksource: 32k_counter at 32768 Hz [ 0.014465] hw-breakpoint: CPUID feature registers not supported. Assuming v6 debug is present. [ 0.026245] Console: colour dummy device 80x30 [ 0.030975] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar [ 0.039184] ... MAX_LOCKDEP_SUBCLASSES: 8 [ 0.043609] ... MAX_LOCK_DEPTH: 48 [ 0.048004] ... MAX_LOCKDEP_KEYS: 8191 [ 0.052673] ... CLASSHASH_SIZE: 4096 [ 0.057250] ... MAX_LOCKDEP_ENTRIES: 16384 [ 0.061981] ... MAX_LOCKDEP_CHAINS: 32768 [ 0.066680] ... CHAINHASH_SIZE: 16384 [ 0.071411] memory used by lock dependency info: 3695 kB [ 0.077056] per task-struct memory footprint: 1152 bytes [ 0.082916] Calibrating delay loop... 324.40 BogoMIPS (lpj=1622016) [ 0.143707] pid_max: default: 32768 minimum: 301 [ 0.149230] Security Framework initialized [ 0.153930] Mount-cache hash table entries: 512 [ 0.246917] CPU: Testing write buffer coherency: ok [ 0.256347] Setting up static identity map for 0x804d7bf0 - 0x804d7c60 [ 0.286285] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 2 [ 0.313659] omap_hwmod: dsp: cannot clk_get interface_clk dsp_ick [ 0.320068] omap_hwmod: dsp: cannot _init_clocks [ 0.325042] ------------[ cut here ]------------ [ 0.329956] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2543 _init+0xcc/0x18c() [ 0.339019] omap_hwmod: dsp: couldn't init clocks [ 0.344024] Modules linked in: [ 0.347320] CPU: 0 PID: 1 Comm: swapper Not tainted 3.14.0-rc4-00012-g4c73c72 #393 [ 0.355346] [<c0013f9c>] (unwind_backtrace) from [<c00123cc>] (show_stack+0x14/0x1c) [ 0.363555] [<c00123cc>] (show_stack) from [<c00369ac>] (warn_slowpath_common+0x64/0x84) [ 0.372100] [<c00369ac>] (warn_slowpath_common) from [<c0036a60>] (warn_slowpath_fmt+0x30/0x40) [ 0.381286] [<c0036a60>] (warn_slowpath_fmt) from [<c06d4c24>] (_init+0xcc/0x18c) [ 0.389129] [<c06d4c24>] (_init) from [<c0023d14>] (omap_hwmod_for_each+0x50/0x64) [ 0.397155] [<c0023d14>] (omap_hwmod_for_each) from [<c06d4e14>] (__omap_hwmod_setup_all+0x34/0x4c) [ 0.406707] [<c06d4e14>] (__omap_hwmod_setup_all) from [<c0008778>] (do_one_initcall+0x2c/0x14c) [ 0.415954] [<c0008778>] (do_one_initcall) from [<c06c9568>] (do_basic_setup+0x94/0xd4) [ 0.424438] [<c06c9568>] (do_basic_setup) from [<c06c9610>] (kernel_init_freeable+0x68/0x108) [ 0.433441] [<c06c9610>] (kernel_init_freeable) from [<c04cc39c>] (kernel_init+0x8/0xf0) [ 0.441986] [<c04cc39c>] (kernel_init) from [<c000e768>] (ret_from_fork+0x14/0x2c) [ 0.450286] ---[ end trace c2c0c340faab4ca1 ]--- [ 0.455352] Unable to handle kernel NULL pointer dereference at virtual address 00000040 [ 0.463928] pgd = c0004000 [ 0.466827] [00000040] *pgd=00000000 [ 0.470703] Internal error: Oops: 5 [#1] ARM [ 0.475219] Modules linked in: [ 0.478454] CPU: 0 PID: 1 Comm: swapper Tainted: G W 3.14.0-rc4-00012-g4c73c72 #393 [ 0.487365] task: c78894c0 ti: c788a000 task.ti: c788a000 [ 0.493041] PC is at omap_hwmod_read+0x14/0x30 [ 0.497741] LR is at dispc_disable_outputs+0x2c/0x1e8 [ 0.503051] pc : [<c0023c6c>] lr : [<c0023438>] psr: 40000153 [ 0.503051] sp : c788be60 ip : c0613034 fp : 00000000 [ 0.515075] r10: c06c96b0 r9 : c06d4de0 r8 : c071e931 [ 0.520538] r7 : 00000002 r6 : c0726430 r5 : 00000002 r4 : c7810500 [ 0.527374] r3 : 00000040 r2 : 0000000a r1 : 00000040 r0 : c0726430 [ 0.534179] Flags: nZcv IRQs on FIQs off Mode SVC_32 ISA ARM Segment kernel [ 0.541900] Control: 00c5387d Table: 80004000 DAC: 00000017 [ 0.547912] Process swapper (pid: 1, stack limit = 0xc788a240) [ 0.554046] Stack: (0xc788be60 to 0xc788c000) [ 0.558654] be60: 60000153 c7810500 00000002 c0726d54 00000002 c0726398 c06c96b0 c002367c [ 0.567199] be80: 00000000 00000002 c0726398 c0726398 c06d48ac c788a000 c06c96b0 c0025b04 [ 0.575744] bea0: c07263e4 00000002 c07263e4 c06d4994 c0613774 c061559c c0726398 c071e848 [ 0.584289] bec0: 00000000 c0023d14 c0702ca0 c070e3b8 c0702ca0 00000002 0000009e c06d4e20 [ 0.592803] bee0: 00000000 c0008778 c06a1c10 c005388c 60000153 60000153 c7ffc900 00000000 [ 0.601348] bf00: c7ffc8fe 00000000 c066ab70 c051399c 00000000 c0053c80 0000009e 00000001 [ 0.609893] bf20: 00000001 c06c96b0 00000001 00000001 0000009e c06a1230 60000153 c070e3b8 [ 0.618438] bf40: c0702ca0 00000002 0000009e c0768b90 c0702c7c c06c96b0 c0768b80 c06c9568 [ 0.626983] bf60: 00000001 00000001 c06c96b0 ffffffff ffffffff c070e398 c070e398 00000000 [ 0.635528] bf80: 00000000 00000000 00000000 00000000 00000000 c06c9610 00000000 00000000 [ 0.644073] bfa0: c04cc394 c04cc39c 00000000 c000e768 00000000 00000000 00000000 00000000 [ 0.652587] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 0.661132] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff ffffffff [ 0.669708] [<c0023c6c>] (omap_hwmod_read) from [<c0023438>] (dispc_disable_outputs+0x2c/0x1e8) [ 0.678802] [<c0023438>] (dispc_disable_outputs) from [<c002367c>] (omap_dss_reset+0x88/0x160) [ 0.687774] [<c002367c>] (omap_dss_reset) from [<c0025b04>] (_reset+0x20/0x120) [ 0.695434] [<c0025b04>] (_reset) from [<c06d4994>] (_setup+0xe8/0x164) [ 0.702362] [<c06d4994>] (_setup) from [<c0023d14>] (omap_hwmod_for_each+0x50/0x64) [ 0.710388] [<c0023d14>] (omap_hwmod_for_each) from [<c06d4e20>] (__omap_hwmod_setup_all+0x40/0x4c) [ 0.719818] [<c06d4e20>] (__omap_hwmod_setup_all) from [<c0008778>] (do_one_initcall+0x2c/0x14c) [ 0.728973] [<c0008778>] (do_one_initcall) from [<c06c9568>] (do_basic_setup+0x94/0xd4) [ 0.737335] [<c06c9568>] (do_basic_setup) from [<c06c9610>] (kernel_init_freeable+0x68/0x108) [ 0.746246] [<c06c9610>] (kernel_init_freeable) from [<c04cc39c>] (kernel_init+0x8/0xf0) [ 0.754730] [<c04cc39c>] (kernel_init) from [<c000e768>] (ret_from_fork+0x14/0x2c) [ 0.762634] Code: e3130c01 1a000003 e590305c e0833001 (e5930000) [ 0.769104] ---[ end trace c2c0c340faab4ca2 ]--- [ 0.774078] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 0.774078]
PATCH v2 13/14 ARM: OMAP24xx: clock: remove legacy clock data
Quoted 6 lines · Tony Lindgren
Quoted 1 line · Tero Kristo
This is no longer needed as clock data is provided through DT.
Looks like there's a new error even before applying this patch in the series as I'm now getting the following oops on n8x0. So cannot test this patch yet.
Is this with OMAP2 only boot?
-Tero
Quoted 133 lines
Regards,
Tony
[ 0.000000] Linux version 3.14.0-rc4-00012-g4c73c72 (tmlind at muffinssi) (gcc version 4.3.5 (Debian 4.3.5-4) ) #393 Tue Mar 4 09:28:18 PST 2014 [ 0.000000] CPU: ARMv6-compatible processor [4107b362] revision 2 (ARMv6TEJ), cr=00c5387d [ 0.000000] CPU: VIPT aliasing data cache, VIPT aliasing instruction cache [ 0.000000] Machine model: Nokia N800 [ 0.000000] bootconsole [earlycon0] enabled [ 0.000000] debug: ignoring loglevel setting. [ 0.000000] Memory policy: Data cache writeback [ 0.000000] On node 0 totalpages: 32768 [ 0.000000] free_area_init_node: node 0, pgdat c0764e70, node_mem_map c7ef9000 [ 0.000000] Normal zone: 256 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 32768 pages, LIFO batch:7 [ 0.000000] CPU: All CPU(s) started in SVC mode. [ 0.000000] OMAP2420 [ 0.000000] [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 [ 0.000000] Kernel command line: root=/dev/mmcblk0p2 rootwait console=ttyO2,115200 earlyprintk ignore_loglevel [ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes) [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) [ 0.000000] Memory: 116716K/131072K available (5085K kernel code, 354K rwdata, 1828K rodata, 278K init, 5483K bss, 14356K reserved, 0K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) [ 0.000000] vmalloc : 0xc8800000 - 0xff000000 ( 872 MB) [ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0008000 - 0xc06c8a68 (6915 kB) [ 0.000000] .init : 0xc06c9000 - 0xc070e9ac ( 279 kB) [ 0.000000] .data : 0xc0710000 - 0xc0768b50 ( 355 kB) [ 0.000000] .bss : 0xc0768b50 - 0xc0cc3a10 (5484 kB) [ 0.000000] NR_IRQS:16 nr_irqs:16 16 [ 0.000000] IRQ: Found an INTC at 0xfa0fe000 (revision 2.0) with 96 interrupts [ 0.000000] Total of 96 interrupts on 1 active controller [ 0.000000] ti_dt_clocks_register: failed to lookup clock node usb_l4_ick [ 0.000000] ti_dt_clocks_register: failed to lookup clock node dsp_ick [ 0.000000] Clocking rate (Crystal/DPLL/MPU): 19.2/658/329 MHz [ 0.000000] OMAP clockevent source: timer1 at 32768 Hz [ 0.000061] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 65536000000000ns [ 0.008758] OMAP clocksource: 32k_counter at 32768 Hz [ 0.014465] hw-breakpoint: CPUID feature registers not supported. Assuming v6 debug is present. [ 0.026245] Console: colour dummy device 80x30 [ 0.030975] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar [ 0.039184] ... MAX_LOCKDEP_SUBCLASSES: 8 [ 0.043609] ... MAX_LOCK_DEPTH: 48 [ 0.048004] ... MAX_LOCKDEP_KEYS: 8191 [ 0.052673] ... CLASSHASH_SIZE: 4096 [ 0.057250] ... MAX_LOCKDEP_ENTRIES: 16384 [ 0.061981] ... MAX_LOCKDEP_CHAINS: 32768 [ 0.066680] ... CHAINHASH_SIZE: 16384 [ 0.071411] memory used by lock dependency info: 3695 kB [ 0.077056] per task-struct memory footprint: 1152 bytes [ 0.082916] Calibrating delay loop... 324.40 BogoMIPS (lpj=1622016) [ 0.143707] pid_max: default: 32768 minimum: 301 [ 0.149230] Security Framework initialized [ 0.153930] Mount-cache hash table entries: 512 [ 0.246917] CPU: Testing write buffer coherency: ok [ 0.256347] Setting up static identity map for 0x804d7bf0 - 0x804d7c60 [ 0.286285] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 2 [ 0.313659] omap_hwmod: dsp: cannot clk_get interface_clk dsp_ick [ 0.320068] omap_hwmod: dsp: cannot _init_clocks [ 0.325042] ------------[ cut here ]------------ [ 0.329956] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2543 _init+0xcc/0x18c() [ 0.339019] omap_hwmod: dsp: couldn't init clocks [ 0.344024] Modules linked in: [ 0.347320] CPU: 0 PID: 1 Comm: swapper Not tainted 3.14.0-rc4-00012-g4c73c72 #393 [ 0.355346] [<c0013f9c>] (unwind_backtrace) from [<c00123cc>] (show_stack+0x14/0x1c) [ 0.363555] [<c00123cc>] (show_stack) from [<c00369ac>] (warn_slowpath_common+0x64/0x84) [ 0.372100] [<c00369ac>] (warn_slowpath_common) from [<c0036a60>] (warn_slowpath_fmt+0x30/0x40) [ 0.381286] [<c0036a60>] (warn_slowpath_fmt) from [<c06d4c24>] (_init+0xcc/0x18c) [ 0.389129] [<c06d4c24>] (_init) from [<c0023d14>] (omap_hwmod_for_each+0x50/0x64) [ 0.397155] [<c0023d14>] (omap_hwmod_for_each) from [<c06d4e14>] (__omap_hwmod_setup_all+0x34/0x4c) [ 0.406707] [<c06d4e14>] (__omap_hwmod_setup_all) from [<c0008778>] (do_one_initcall+0x2c/0x14c) [ 0.415954] [<c0008778>] (do_one_initcall) from [<c06c9568>] (do_basic_setup+0x94/0xd4) [ 0.424438] [<c06c9568>] (do_basic_setup) from [<c06c9610>] (kernel_init_freeable+0x68/0x108) [ 0.433441] [<c06c9610>] (kernel_init_freeable) from [<c04cc39c>] (kernel_init+0x8/0xf0) [ 0.441986] [<c04cc39c>] (kernel_init) from [<c000e768>] (ret_from_fork+0x14/0x2c) [ 0.450286] ---[ end trace c2c0c340faab4ca1 ]--- [ 0.455352] Unable to handle kernel NULL pointer dereference at virtual address 00000040 [ 0.463928] pgd = c0004000 [ 0.466827] [00000040] *pgd=00000000 [ 0.470703] Internal error: Oops: 5 [#1] ARM [ 0.475219] Modules linked in: [ 0.478454] CPU: 0 PID: 1 Comm: swapper Tainted: G W 3.14.0-rc4-00012-g4c73c72 #393 [ 0.487365] task: c78894c0 ti: c788a000 task.ti: c788a000 [ 0.493041] PC is at omap_hwmod_read+0x14/0x30 [ 0.497741] LR is at dispc_disable_outputs+0x2c/0x1e8 [ 0.503051] pc : [<c0023c6c>] lr : [<c0023438>] psr: 40000153 [ 0.503051] sp : c788be60 ip : c0613034 fp : 00000000 [ 0.515075] r10: c06c96b0 r9 : c06d4de0 r8 : c071e931 [ 0.520538] r7 : 00000002 r6 : c0726430 r5 : 00000002 r4 : c7810500 [ 0.527374] r3 : 00000040 r2 : 0000000a r1 : 00000040 r0 : c0726430 [ 0.534179] Flags: nZcv IRQs on FIQs off Mode SVC_32 ISA ARM Segment kernel [ 0.541900] Control: 00c5387d Table: 80004000 DAC: 00000017 [ 0.547912] Process swapper (pid: 1, stack limit = 0xc788a240) [ 0.554046] Stack: (0xc788be60 to 0xc788c000) [ 0.558654] be60: 60000153 c7810500 00000002 c0726d54 00000002 c0726398 c06c96b0 c002367c [ 0.567199] be80: 00000000 00000002 c0726398 c0726398 c06d48ac c788a000 c06c96b0 c0025b04 [ 0.575744] bea0: c07263e4 00000002 c07263e4 c06d4994 c0613774 c061559c c0726398 c071e848 [ 0.584289] bec0: 00000000 c0023d14 c0702ca0 c070e3b8 c0702ca0 00000002 0000009e c06d4e20 [ 0.592803] bee0: 00000000 c0008778 c06a1c10 c005388c 60000153 60000153 c7ffc900 00000000 [ 0.601348] bf00: c7ffc8fe 00000000 c066ab70 c051399c 00000000 c0053c80 0000009e 00000001 [ 0.609893] bf20: 00000001 c06c96b0 00000001 00000001 0000009e c06a1230 60000153 c070e3b8 [ 0.618438] bf40: c0702ca0 00000002 0000009e c0768b90 c0702c7c c06c96b0 c0768b80 c06c9568 [ 0.626983] bf60: 00000001 00000001 c06c96b0 ffffffff ffffffff c070e398 c070e398 00000000 [ 0.635528] bf80: 00000000 00000000 00000000 00000000 00000000 c06c9610 00000000 00000000 [ 0.644073] bfa0: c04cc394 c04cc39c 00000000 c000e768 00000000 00000000 00000000 00000000 [ 0.652587] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 0.661132] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff ffffffff [ 0.669708] [<c0023c6c>] (omap_hwmod_read) from [<c0023438>] (dispc_disable_outputs+0x2c/0x1e8) [ 0.678802] [<c0023438>] (dispc_disable_outputs) from [<c002367c>] (omap_dss_reset+0x88/0x160) [ 0.687774] [<c002367c>] (omap_dss_reset) from [<c0025b04>] (_reset+0x20/0x120) [ 0.695434] [<c0025b04>] (_reset) from [<c06d4994>] (_setup+0xe8/0x164) [ 0.702362] [<c06d4994>] (_setup) from [<c0023d14>] (omap_hwmod_for_each+0x50/0x64) [ 0.710388] [<c0023d14>] (omap_hwmod_for_each) from [<c06d4e20>] (__omap_hwmod_setup_all+0x40/0x4c) [ 0.719818] [<c06d4e20>] (__omap_hwmod_setup_all) from [<c0008778>] (do_one_initcall+0x2c/0x14c) [ 0.728973] [<c0008778>] (do_one_initcall) from [<c06c9568>] (do_basic_setup+0x94/0xd4) [ 0.737335] [<c06c9568>] (do_basic_setup) from [<c06c9610>] (kernel_init_freeable+0x68/0x108) [ 0.746246] [<c06c9610>] (kernel_init_freeable) from [<c04cc39c>] (kernel_init+0x8/0xf0) [ 0.754730] [<c04cc39c>] (kernel_init) from [<c000e768>] (ret_from_fork+0x14/0x2c) [ 0.762634] Code: e3130c01 1a000003 e590305c e0833001 (e5930000) [ 0.769104] ---[ end trace c2c0c340faab4ca2 ]--- [ 0.774078] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 0.774078]
Tony Lindgren
maintainerPATCH v2 13/14 ARM: OMAP24xx: clock: remove legacy clock data
Quoted 9 lines · Tero Kristo
Quoted 6 lines · Tony Lindgren
Quoted 1 line · Tero Kristo
This is no longer needed as clock data is provided through DT.
Looks like there's a new error even before applying this patch in the series as I'm now getting the following oops on n8x0. So cannot test this patch yet.
Is this with OMAP2 only boot?
Yeah that's with omap2 only.
Tony
PATCH v2 13/14 ARM: OMAP24xx: clock: remove legacy clock data
Quoted 5 lines · Tony Lindgren
Quoted 4 lines · Tero Kristo
Quoted 3 lines · Tony Lindgren
Quoted 1 line · Tero Kristo
This is no longer needed as clock data is provided through DT.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Looks like there's a new error even before applying this patch in the series as I'm now getting the following oops on n8x0. So cannot test this patch yet.
Is this with OMAP2 only boot?
Yeah that's with omap2 only.
That explains it, as previous series was never boot tested in omap2 only config (due to build issues.)
I just force pushed the branch with the below additional patch, can you check if it works now?
-Tero
------------------------------------
From b8be115c8bba8088f7b25922ed81c1d5867af974 Mon Sep 17 00:00:00 2001
From: Tero Kristo <[email protected]>
Date: Wed, 5 Mar 2014 10:03:38 +0200
Subject: [PATCH 12/15] CLK: TI: gate: add composite interface clock to OMAP2
only build
Composite interface clock is needed by OMAP2, but it was only built in for OMAP3. Fixed the conditional build flag checks for this.
--- drivers/clk/ti/gate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/ti/gate.c +0 -0
@@ -185,7 +185,7 @@ of_ti_composite_no_wait_gate_clk_setup(struct
device_node *node)
CLK_OF_DECLARE(ti_composite_no_wait_gate_clk,
"ti,composite-no-wait-gate-clock",
of_ti_composite_no_wait_gate_clk_setup);
-#ifdef CONFIG_ARCH_OMAP3
+#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
static void __init of_ti_composite_interface_clk_setup(structdevice_node *node)
{
_of_ti_composite_gate_clk_setup(node, &clkhwops_iclk_wait);
Signature · 1 line
1.7.9.5
Tony Lindgren
maintainerPATCH v2 13/14 ARM: OMAP24xx: clock: remove legacy clock data
Quoted 12 lines · Tero Kristo
Quoted 11 lines · Tony Lindgren
Quoted 9 lines · Tero Kristo
Quoted 6 lines · Tony Lindgren
Quoted 1 line · Tero Kristo
This is no longer needed as clock data is provided through DT.
Looks like there's a new error even before applying this patch in the series as I'm now getting the following oops on n8x0. So cannot test this patch yet.
Is this with OMAP2 only boot?
Quoted 7 lines
Quoted 1 line
Yeah that's with omap2 only.
That explains it, as previous series was never boot tested in omap2 only config (due to build issues.)
I just force pushed the branch with the below additional patch, can you check if it works now?
Yes seems to work with that thanks. And with the omap2 legacy clock data removed too, it boots fine on n8x0 and 2430sdp.
I suggest you drop the omap3 legacy data patch from this branch as it's not omap2 related and cannot be done yet. Then try to get acks from Paul. And if there are no issues, it seems Mike could take the whole branch as it seems to merge just fine with what I have queued. So for all the patches except for the omap3 legacy data removal, feel free to add:
Tony Lindgren
maintainerPATCH v2 13/14 ARM: OMAP24xx: clock: remove legacy clock data
Quoted 24 lines · Tony Lindgren
Quoted 12 lines · Tero Kristo
Quoted 11 lines · Tony Lindgren
Quoted 9 lines · Tero Kristo
Quoted 6 lines · Tony Lindgren
Quoted 1 line · Tero Kristo
This is no longer needed as clock data is provided through DT.
Looks like there's a new error even before applying this patch in the series as I'm now getting the following oops on n8x0. So cannot test this patch yet.
Is this with OMAP2 only boot?
Quoted 7 lines
Quoted 1 line
Yeah that's with omap2 only.
That explains it, as previous series was never boot tested in omap2 only config (due to build issues.)
I just force pushed the branch with the below additional patch, can you check if it works now?
Yes seems to work with that thanks. And with the omap2 legacy clock data removed too, it boots fine on n8x0 and 2430sdp.
Quoted 8 lines
I suggest you drop the omap3 legacy data patch from this branch as it's not omap2 related and cannot be done yet. Then try to get acks from Paul. And if there are no issues, it seems Mike could take the whole branch as it seems to merge just fine with what I have queued. So for all the patches except for the omap3 legacy data removal, feel free to add:
Acked-by Tony Lindgren <[email protected]>
Found one randconfig error with this series when CONFIG_ARCH_OMAP2 is not set:
/drivers/clk/ti/dpll.c:273: undefined reference to omap2xxx_clkt_dpllcore_init' drivers/clk/ti/dpll.c:311: undefined reference to clkhwops_omap2xxx_dpll'
It's also possible the error is the PRM clean up series, but probably in this series based drivers/clk/ti/dpll.c path.
Regards,
Tony
PATCH v2 13/14 ARM: OMAP24xx: clock: remove legacy clock data
Quoted 32 lines · Tony Lindgren
Quoted 31 lines · Tony Lindgren
Quoted 12 lines · Tero Kristo
Quoted 11 lines · Tony Lindgren
Quoted 9 lines · Tero Kristo
Quoted 6 lines · Tony Lindgren
Quoted 1 line · Tero Kristo
This is no longer needed as clock data is provided through DT.
Looks like there's a new error even before applying this patch in the series as I'm now getting the following oops on n8x0. So cannot test this patch yet.
Is this with OMAP2 only boot?
Quoted 7 lines
Quoted 1 line
Yeah that's with omap2 only.
That explains it, as previous series was never boot tested in omap2 only config (due to build issues.)
I just force pushed the branch with the below additional patch, can you check if it works now?
Yes seems to work with that thanks. And with the omap2 legacy clock data removed too, it boots fine on n8x0 and 2430sdp.
I suggest you drop the omap3 legacy data patch from this branch as it's not omap2 related and cannot be done yet. Then try to get acks from Paul. And if there are no issues, it seems Mike could take the whole branch as it seems to merge just fine with what I have queued. So for all the patches except for the omap3 legacy data removal, feel free to add:
Quoted 7 lines
Quoted 1 line
Acked-by Tony Lindgren <[email protected]>Found one randconfig error with this series when
CONFIG_ARCH_OMAP2is not set:/drivers/clk/ti/dpll.c:273: undefined reference to
omap2xxx_clkt_dpllcore_init' drivers/clk/ti/dpll.c:311: undefined reference toclkhwops_omap2xxx_dpll'
Yeah, this is in this series. Force pushed a minor update to patch #4 to fix this.
I can repost the series if Mike or Paul or someone requests this.
-Tero
Quoted 8 lines
It's also possible the error is the PRM clean up series, but probably in this series based
drivers/clk/ti/dpll.cpath.Regards,
Tony
PATCH v2 14/14 ARM: OMAP3: clock: remove legacy clock data
In reply to a message not in the archiveThis is no longer needed as clock data is provided through DT.
--- arch/arm/mach-omap2/Makefile | 2 +- arch/arm/mach-omap2/cclock3xxx_data.c | 3682 --------------------------------- arch/arm/mach-omap2/io.c | 18 +- 3 files changed, 6 insertions(+), 3696 deletions(-) delete mode 100644 arch/arm/mach-omap2/cclock3xxx_data.c
arch/arm/mach-omap2/Makefile +1 -1
@@ -181,7 +181,7 @@ obj-$(CONFIG_SOC_OMAP2430) += clock2430.o obj-$(CONFIG_ARCH_OMAP3) += $(clock-common) clock3xxx.o obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o clkt34xx_dpll3m2.o obj-$(CONFIG_ARCH_OMAP3) += clock3517.o clock36xx.o -obj-$(CONFIG_ARCH_OMAP3) += dpll3xxx.o cclock3xxx_data.o +obj-$(CONFIG_ARCH_OMAP3) += dpll3xxx.o obj-$(CONFIG_ARCH_OMAP3) += clkt_iclk.o obj-$(CONFIG_ARCH_OMAP4) += $(clock-common) obj-$(CONFIG_ARCH_OMAP4) += dpll3xxx.o dpll44xx.o
arch/arm/mach-omap2/cclock3xxx_data.c deleted +0 -3682
2,992 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Part of the diff is not shown here. View the raw message.
Tony Lindgren
maintainerPATCH v2 14/14 ARM: OMAP3: clock: remove legacy clock data
Quoted 1 line · Tero Kristo
This is no longer needed as clock data is provided through DT.
And this one we cannot apply yet until omap3 is booting in device tree only mode.
Regards,
Tony
PATCH v2 14/14 ARM: OMAP3: clock: remove legacy clock data
Quoted 5 lines · Tony Lindgren
Quoted 1 line · Tero Kristo
This is no longer needed as clock data is provided through DT.
And this one we cannot apply yet until omap3 is booting in device tree only mode.
What is missing to achieve this? Some boards are not booting in DT mode yet or?
-Tero
Tony Lindgren
maintainerPATCH v2 14/14 ARM: OMAP3: clock: remove legacy clock data
Quoted 9 lines · Tero Kristo
Quoted 5 lines · Tony Lindgren
Quoted 1 line · Tero Kristo
This is no longer needed as clock data is provided through DT.
And this one we cannot apply yet until omap3 is booting in device tree only mode.
What is missing to achieve this? Some boards are not booting in DT mode yet or?
It seems that the last missing pieces are the DSS bindings and .dts file for the pandora. At least I can't think of anything else that's missing or could not be done using pdata-quirks.c.
Regards,
Tony
v2 cover : ARM: OMAP2: clock DT conversion
In reply to Tero KristoQuoted 8 lines · Tero Kristo
Hi,
Changes compared to v1:
- fixed OMAP2 only build issues
- fixed OMAP2420 boot issues
- added patch #13 and #14 to remove legacy clock data for OMAP2/OMAP3
- fixed smatch + DT bindings documentation problems reported by Nishanth
Quoted 6 lines
This set is un-tested on OMAP2 hardware as I don't have access to any. So, any testing feedback welcome.
Test branch available:
tree: https://github.com/t-kristo/linux-pm.git
branch: 3.14-rc4-omap2-dt-clks-v2
I just queued these for 3.16/ti-clk-drv.
-Tero
Quoted 8 lines
-Tero
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html