linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: b20788@freescale.com (Anson Huang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 0/3] move gpt per clk parent from ipg_per to OSC
Date: Fri, 5 Sep 2014 11:26:43 +0800	[thread overview]
Message-ID: <1409887606-22388-1-git-send-email-b20788@freescale.com> (raw)

Currently, gpt timer's clock is from ipg_per, and ipg_per clock is from ipg
on most of i.MX6 series SOCs, but ipg's rate may be scaled when system enters
low bus mode for saving power, then gpt timer's clock rate will be scaled as
well, as system timer should be kept stable and NOT drift, better to keep gpt
timer's clk at fixed rate, on i.MX6Q TO > 1.0, i.MX6DL and i.MX6SX, there is
OSC clk available for gpt timer, we should enable this feature, the hardware
design is as below:

i.MX6Q TO > 1.0: GPT_CR_CLKSRC, 3b'101 selects fix clock
    of OSC / 8 for gpt per clk;
i.MX6DL and i.MX6SX: GPT_CR_CLKSRC, 3b'101 selects OSC
    for gpt per clk, and we must enable GPT_CR_24MEM to
    enable OSC clk source for gpt per, GPT_PR_PRESCALER24M
    is for pre-scaling of this OSC clk, here set it to 8
    to make gpt per clk is 3MHz;
i.MX6SL: ipg_per can be from OSC directly, so no need to
    implement this new clk source for gpt per.

As we still need to make it work on i.MX6Q TO1.0 which has no OSC clock source
for gpt per, so we add a soc_per clock for i.MX6Q, other SoCs all have OSC
clock source available for gpt per, so we can just replace the original gpt
per clk with gpt_3m clock.

Anson Huang (3):
  ARM: imx: add gpt_3m clk for i.mx6qdl
  ARM: dts: imx6: make gpt per clock can be from OSC
  ARM: imx: source gpt per clk from OSC for system timer

 arch/arm/boot/dts/imx6qdl.dtsi            |    5 ++--
 arch/arm/boot/dts/imx6sx.dtsi             |    2 +-
 arch/arm/mach-imx/clk-imx6q.c             |    1 +
 arch/arm/mach-imx/time.c                  |   41 ++++++++++++++++++++++++-----
 include/dt-bindings/clock/imx6qdl-clock.h |    3 ++-
 5 files changed, 42 insertions(+), 10 deletions(-)

-- 
1.7.9.5

             reply	other threads:[~2014-09-05  3:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05  3:26 Anson Huang [this message]
2014-09-05  3:26 ` [PATCH V2 1/3] ARM: imx: add gpt_3m clk for i.mx6qdl Anson Huang
2014-09-05  3:26 ` [PATCH V2 2/3] ARM: dts: imx6: make gpt per clock can be from OSC Anson Huang
2014-09-05  3:26 ` [PATCH V2 3/3] ARM: imx: source gpt per clk from OSC for system timer Anson Huang
2014-09-05 12:09   ` Fabio Estevam
2014-09-05 12:58     ` Anson.Huang at freescale.com
2014-09-10  7:33       ` Shawn Guo
2014-09-10  7:43         ` Anson.Huang at freescale.com
2014-09-10 11:49           ` Shawn Guo
     [not found]             ` <8DDD46F6-AA96-4E14-ADD6-45A1AD12423C@freescale.com>
2014-09-10 13:01               ` Shawn Guo
2014-09-10  7:36   ` Shawn Guo
2014-09-10  7:45     ` Anson.Huang at freescale.com

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=1409887606-22388-1-git-send-email-b20788@freescale.com \
    --to=b20788@freescale.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).