From: Tero Kristo <t-kristo@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org, mturquette@linaro.org,
paul@pwsan.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 00/11] ARM: OMAP3: legacy clock data move under clk driver
Date: Thu, 29 Jan 2015 22:19:29 +0200 [thread overview]
Message-ID: <54CA95D1.6080700@ti.com> (raw)
In-Reply-To: <20150107230006.GE13010@atomide.com>
On 01/08/2015 01:00 AM, Tony Lindgren wrote:
> * Tero Kristo <t-kristo@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 <tony@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 = 0x70000,
@@ -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 = 0x70000,
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;
next prev parent reply other threads:[~2015-01-29 20:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 16:20 [PATCH 00/11] ARM: OMAP3: legacy clock data move under clk driver Tero Kristo
2014-12-16 16:20 ` [PATCH 01/11] clk: ti: add core support for initializing legacy clocks Tero Kristo
2014-12-16 16:20 ` [PATCH 02/11] clk: ti: mux: add support for legacy mux init Tero Kristo
2014-12-16 16:20 ` [PATCH 03/11] clk: ti: gate: add support for legacy gate init Tero Kristo
2014-12-16 16:20 ` [PATCH 04/11] clk: ti: interface: add support for legacy interface clock init Tero Kristo
2014-12-16 16:20 ` [PATCH 05/11] clk: ti: divider: add support for legacy divider init Tero Kristo
2014-12-16 16:20 ` [PATCH 06/11] clk: ti: dpll: add support for legacy DPLL init Tero Kristo
2014-12-16 16:20 ` [PATCH 07/11] clk: ti: composite: add support for legacy composite clock init Tero Kristo
2014-12-16 16:20 ` [PATCH 09/11] ARM: OMAP3: PRM: add support for legacy iomapping init Tero Kristo
2014-12-16 16:20 ` [PATCH 10/11] ARM: OMAP3: use clock data from TI clock driver for legacy boot Tero Kristo
2015-01-07 23:00 ` [PATCH 00/11] ARM: OMAP3: legacy clock data move under clk driver Tony Lindgren
2015-01-29 20:19 ` Tero Kristo [this message]
2015-01-30 0:42 ` Mike Turquette
2015-01-30 15:20 ` Tero Kristo
2015-01-30 18:45 ` Mike Turquette
2015-02-03 16:59 ` Arnd Bergmann
2015-02-03 19:04 ` Tony Lindgren
2015-02-03 19:11 ` Mike Turquette
2015-01-29 20:24 ` [PATCHv2 06/11] clk: ti: dpll: add support for legacy DPLL init Tero Kristo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54CA95D1.6080700@ti.com \
--to=t-kristo@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=paul@pwsan.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).