From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Walmsley Subject: Re: [PATCH 7/8] OMAP4: clock: Add CPU local timer clock node. Date: Thu, 29 Sep 2011 13:12:59 -0600 (MDT) Message-ID: References: <1315459327-3285-1-git-send-email-santosh.shilimkar@ti.com> <1315459327-3285-8-git-send-email-santosh.shilimkar@ti.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: Received: from utopia.booyaka.com ([72.9.107.138]:39907 "EHLO utopia.booyaka.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754116Ab1I2TNA (ORCPT ); Thu, 29 Sep 2011 15:13:00 -0400 In-Reply-To: <1315459327-3285-8-git-send-email-santosh.shilimkar@ti.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Santosh Shilimkar Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Kevin Hilman Hi Santosh, On Thu, 8 Sep 2011, Santosh Shilimkar wrote: > Local timer clock is sourced from the CPU clock and hence changes > along with CPU clock. These per CPU local timers are used as > clock-events, so they need to be reconfigured on CPU frequency > change as part of CPUfreq governor. > > Newly introduced clockevents_reconfigure() needs to know the > twd clock-rate. Provide a clock-node to make clk_get_rate() work > for TWD. > > Signed-off-by: Santosh Shilimkar > Cc: Paul Walmsley > Cc: Kevin Hilman This clock looks like the ARM Cortex-A9 MPCore PERIPHCLK, correct? From ARM Cortex-A9 MPCore Technical Reference Manual (DDI 0407G) Section 5.1 "Clocks"? Assuming that is so, I've modified this patch appropriately, and added support to the autogeneration script to generate this clock node. Care to take a quick look at it to make sure it's okay? - Paul From: Santosh Shilimkar Date: Thu, 8 Sep 2011 10:52:06 +0530 Subject: [PATCH] ARM: OMAP4: clock: Add CPU local timer clock node. Local timer clock is sourced from the CPU clock and hence changes along with CPU clock. These per CPU local timers are used as clock-events, so they need to be reconfigured on CPU frequency change as part of CPUfreq governor. Newly introduced clockevents_reconfigure() needs to know the twd clock-rate. Provide a clock-node to make clk_get_rate() work for TWD. Signed-off-by: Santosh Shilimkar Cc: Paul Walmsley Cc: Kevin Hilman [paul@pwsan.com: renamed clock node to 'mpu_periphclk' to indicate that this is the Cortex-A9 MPCore subsystem clock PERIPHCLK (DDI 0407G); moved clock and clkdev entries to match the autogenerated script output] Signed-off-by: Paul Walmsley --- arch/arm/mach-omap2/clock44xx_data.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 4873c00..9684233 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c @@ -1195,6 +1195,14 @@ static struct clk l4_wkup_clk_mux_ck = { .recalc = &omap2_clksel_recalc, }; +static struct clk mpu_periphclk = { + .name = "mpu_periphclk", + .parent = &dpll_mpu_ck, + .ops = &clkops_null, + .fixed_div = 2, + .recalc = &omap_fixed_divisor_recalc, +}; + static const struct clksel_rate div2_2to1_rates[] = { { .div = 1, .val = 1, .flags = RATE_IN_4430 }, { .div = 2, .val = 0, .flags = RATE_IN_4430 }, @@ -3189,6 +3197,7 @@ static struct omap_clk omap44xx_clks[] = { CLK(NULL, "l4_div_ck", &l4_div_ck, CK_443X), CLK(NULL, "lp_clk_div_ck", &lp_clk_div_ck, CK_443X), CLK(NULL, "l4_wkup_clk_mux_ck", &l4_wkup_clk_mux_ck, CK_443X), + CLK(NULL, "smp_twd", &mpu_periphclk, CK_443X), CLK(NULL, "ocp_abe_iclk", &ocp_abe_iclk, CK_443X), CLK(NULL, "per_abe_24m_fclk", &per_abe_24m_fclk, CK_443X), CLK(NULL, "per_abe_nc_fclk", &per_abe_nc_fclk, CK_443X), -- 1.7.6.3 From mboxrd@z Thu Jan 1 00:00:00 1970 From: paul@pwsan.com (Paul Walmsley) Date: Thu, 29 Sep 2011 13:12:59 -0600 (MDT) Subject: [PATCH 7/8] OMAP4: clock: Add CPU local timer clock node. In-Reply-To: <1315459327-3285-8-git-send-email-santosh.shilimkar@ti.com> References: <1315459327-3285-1-git-send-email-santosh.shilimkar@ti.com> <1315459327-3285-8-git-send-email-santosh.shilimkar@ti.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Santosh, On Thu, 8 Sep 2011, Santosh Shilimkar wrote: > Local timer clock is sourced from the CPU clock and hence changes > along with CPU clock. These per CPU local timers are used as > clock-events, so they need to be reconfigured on CPU frequency > change as part of CPUfreq governor. > > Newly introduced clockevents_reconfigure() needs to know the > twd clock-rate. Provide a clock-node to make clk_get_rate() work > for TWD. > > Signed-off-by: Santosh Shilimkar > Cc: Paul Walmsley > Cc: Kevin Hilman This clock looks like the ARM Cortex-A9 MPCore PERIPHCLK, correct? From ARM Cortex-A9 MPCore Technical Reference Manual (DDI 0407G) Section 5.1 "Clocks"? Assuming that is so, I've modified this patch appropriately, and added support to the autogeneration script to generate this clock node. Care to take a quick look at it to make sure it's okay? - Paul From: Santosh Shilimkar Date: Thu, 8 Sep 2011 10:52:06 +0530 Subject: [PATCH] ARM: OMAP4: clock: Add CPU local timer clock node. Local timer clock is sourced from the CPU clock and hence changes along with CPU clock. These per CPU local timers are used as clock-events, so they need to be reconfigured on CPU frequency change as part of CPUfreq governor. Newly introduced clockevents_reconfigure() needs to know the twd clock-rate. Provide a clock-node to make clk_get_rate() work for TWD. Signed-off-by: Santosh Shilimkar Cc: Paul Walmsley Cc: Kevin Hilman [paul at pwsan.com: renamed clock node to 'mpu_periphclk' to indicate that this is the Cortex-A9 MPCore subsystem clock PERIPHCLK (DDI 0407G); moved clock and clkdev entries to match the autogenerated script output] Signed-off-by: Paul Walmsley --- arch/arm/mach-omap2/clock44xx_data.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 4873c00..9684233 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c @@ -1195,6 +1195,14 @@ static struct clk l4_wkup_clk_mux_ck = { .recalc = &omap2_clksel_recalc, }; +static struct clk mpu_periphclk = { + .name = "mpu_periphclk", + .parent = &dpll_mpu_ck, + .ops = &clkops_null, + .fixed_div = 2, + .recalc = &omap_fixed_divisor_recalc, +}; + static const struct clksel_rate div2_2to1_rates[] = { { .div = 1, .val = 1, .flags = RATE_IN_4430 }, { .div = 2, .val = 0, .flags = RATE_IN_4430 }, @@ -3189,6 +3197,7 @@ static struct omap_clk omap44xx_clks[] = { CLK(NULL, "l4_div_ck", &l4_div_ck, CK_443X), CLK(NULL, "lp_clk_div_ck", &lp_clk_div_ck, CK_443X), CLK(NULL, "l4_wkup_clk_mux_ck", &l4_wkup_clk_mux_ck, CK_443X), + CLK(NULL, "smp_twd", &mpu_periphclk, CK_443X), CLK(NULL, "ocp_abe_iclk", &ocp_abe_iclk, CK_443X), CLK(NULL, "per_abe_24m_fclk", &per_abe_24m_fclk, CK_443X), CLK(NULL, "per_abe_nc_fclk", &per_abe_nc_fclk, CK_443X), -- 1.7.6.3