All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Christophe Dubois <jcd@tribudubois.net>
To: qemu-devel@nongnu.org, peter.maydell@linaro.org,
	crosthwaite.peter@gmail.com
Cc: Jean-Christophe Dubois <jcd@tribudubois.net>
Subject: [Qemu-devel] [PATCH v2 4/9] i.MX: Add the CLK_IPG_HIGH clock
Date: Mon,  8 Feb 2016 23:08:17 +0100	[thread overview]
Message-ID: <ee9738c972c9020a7e2a253e75e3dc1a40bb8849.1454967766.git.jcd@tribudubois.net> (raw)
In-Reply-To: <cover.1454967766.git.jcd@tribudubois.net>

EPIT, GPT and other i.MX timers are using "abstract" clocks among which
a CLK_IPG_HIGH clock.

On i.MX25 and i.MX31 CLK_IPG and CLK_IPG_HIGH are mapped to the same clock
but on other SOC like i.MX6 they are mapped to distinct clocks.

This patch add the CLK_IPG_HIGH to prepare for SOC where these 2 clocks are
different.

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
---

Changes since V1:
 * Not present on V1 

 hw/misc/imx25_ccm.c       |  1 +
 hw/misc/imx31_ccm.c       |  1 +
 hw/timer/imx_epit.c       |  8 ++++----
 hw/timer/imx_gpt.c        | 16 ++++++++--------
 include/hw/misc/imx_ccm.h |  1 +
 5 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/hw/misc/imx25_ccm.c b/hw/misc/imx25_ccm.c
index e74486f..caceb0e 100644
--- a/hw/misc/imx25_ccm.c
+++ b/hw/misc/imx25_ccm.c
@@ -170,6 +170,7 @@ static uint32_t imx25_ccm_get_clock_frequency(IMXCCMState *dev, IMXClk clock)
     case CLK_NONE:
         break;
     case CLK_IPG:
+    case CLK_IPG_HIGH:
         freq = imx25_ccm_get_ipg_clk(dev);
         break;
     case CLK_32k:
diff --git a/hw/misc/imx31_ccm.c b/hw/misc/imx31_ccm.c
index dee0b11..96ba2cb 100644
--- a/hw/misc/imx31_ccm.c
+++ b/hw/misc/imx31_ccm.c
@@ -185,6 +185,7 @@ static uint32_t imx31_ccm_get_clock_frequency(IMXCCMState *dev, IMXClk clock)
     case CLK_NONE:
         break;
     case CLK_IPG:
+    case CLK_IPG_HIGH:
         freq = imx31_ccm_get_ipg_clk(dev);
         break;
     case CLK_32k:
diff --git a/hw/timer/imx_epit.c b/hw/timer/imx_epit.c
index f7772cc..ecd2e5a 100644
--- a/hw/timer/imx_epit.c
+++ b/hw/timer/imx_epit.c
@@ -51,10 +51,10 @@ static char const *imx_epit_reg_name(uint32_t reg)
  * These are typical.
  */
 static const IMXClk imx_epit_clocks[] =  {
-    CLK_NONE, /* 00 disabled */
-    CLK_IPG,  /* 01 ipg_clk, ~532MHz */
-    CLK_IPG,  /* 10 ipg_clk_highfreq */
-    CLK_32k,  /* 11 ipg_clk_32k -- ~32kHz */
+    CLK_NONE,      /* 00 disabled */
+    CLK_IPG,       /* 01 ipg_clk, ~532MHz */
+    CLK_IPG_HIGH,  /* 10 ipg_clk_highfreq */
+    CLK_32k,       /* 11 ipg_clk_32k -- ~32kHz */
 };
 
 /*
diff --git a/hw/timer/imx_gpt.c b/hw/timer/imx_gpt.c
index d1c0294..e69456d 100644
--- a/hw/timer/imx_gpt.c
+++ b/hw/timer/imx_gpt.c
@@ -80,14 +80,14 @@ static const VMStateDescription vmstate_imx_timer_gpt = {
 };
 
 static const IMXClk imx_gpt_clocks[] = {
-    CLK_NONE, /* 000 No clock source */
-    CLK_IPG,  /* 001 ipg_clk, 532MHz*/
-    CLK_IPG,  /* 010 ipg_clk_highfreq */
-    CLK_NONE, /* 011 not defined */
-    CLK_32k,  /* 100 ipg_clk_32k */
-    CLK_NONE, /* 101 not defined */
-    CLK_NONE, /* 110 not defined */
-    CLK_NONE, /* 111 not defined */
+    CLK_NONE,      /* 000 No clock source */
+    CLK_IPG,       /* 001 ipg_clk, 532MHz*/
+    CLK_IPG_HIGH,  /* 010 ipg_clk_highfreq */
+    CLK_NONE,      /* 011 not defined */
+    CLK_32k,       /* 100 ipg_clk_32k */
+    CLK_NONE,      /* 101 not defined */
+    CLK_NONE,      /* 110 not defined */
+    CLK_NONE,      /* 111 not defined */
 };
 
 static void imx_gpt_set_freq(IMXGPTState *s)
diff --git a/include/hw/misc/imx_ccm.h b/include/hw/misc/imx_ccm.h
index 378b78d..48a7afa 100644
--- a/include/hw/misc/imx_ccm.h
+++ b/include/hw/misc/imx_ccm.h
@@ -45,6 +45,7 @@ typedef struct IMXCCMState {
 typedef enum  {
     CLK_NONE,
     CLK_IPG,
+    CLK_IPG_HIGH,
     CLK_32k
 } IMXClk;
 
-- 
2.5.0

  parent reply	other threads:[~2016-02-08 22:08 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 22:08 [Qemu-devel] [PATCH v2 0/9] Add i.MX6 (Single/Dual/Quad) support Jean-Christophe Dubois
2016-02-08 22:08 ` [Qemu-devel] [PATCH v2 1/9] i.MX: Allow GPT timer to rollover Jean-Christophe Dubois
2016-02-16 15:19   ` Peter Maydell
2016-02-08 22:08 ` [Qemu-devel] [PATCH v2 2/9] i.MX: Rename CCM NOCLK to CLK_NONE for naming consistency Jean-Christophe Dubois
2016-02-16 15:20   ` Peter Maydell
2016-02-08 22:08 ` [Qemu-devel] [PATCH v2 3/9] i.MX: Remove CCM useless clock computation handling Jean-Christophe Dubois
2016-02-16 15:20   ` Peter Maydell
2016-02-08 22:08 ` Jean-Christophe Dubois [this message]
2016-02-16 15:20   ` [Qemu-devel] [PATCH v2 4/9] i.MX: Add the CLK_IPG_HIGH clock Peter Maydell
2016-02-08 22:08 ` [Qemu-devel] [PATCH v2 5/9] i.MX: Add i.MX6 CCM and ANALOG device Jean-Christophe Dubois
2016-02-16 15:21   ` Peter Maydell
2016-02-29 17:33   ` Peter Maydell
2016-02-29 20:15     ` Jean-Christophe DUBOIS
2016-02-08 22:08 ` [Qemu-devel] [PATCH v2 6/9] i.MX: Add i.MX6 System Reset Controller device Jean-Christophe Dubois
2016-02-16 15:35   ` Peter Maydell
2016-02-27 16:57     ` Jean-Christophe DUBOIS
2016-02-27 17:43       ` Peter Maydell
2016-02-28 12:00         ` Jean-Christophe DUBOIS
2016-02-08 22:08 ` [Qemu-devel] [PATCH v2 7/9] i.MX: Add i.MX6 SOC implementation Jean-Christophe Dubois
2016-02-16 15:31   ` Peter Maydell
2016-02-16 20:49     ` Jean-Christophe DUBOIS
2016-02-16 21:06       ` Peter Maydell
2016-02-16 21:47         ` Jean-Christophe DUBOIS
2016-02-16 21:57           ` Peter Maydell
2016-02-18 20:51             ` Jean-Christophe DUBOIS
2016-02-18 21:46               ` Peter Maydell
2016-02-19  6:32                 ` Jean-Christophe DUBOIS
2016-02-19  9:32                   ` Peter Maydell
2016-02-19 21:06                     ` Jean-Christophe DUBOIS
2016-02-20 10:55                       ` Jean-Christophe DUBOIS
2016-02-20 15:30                         ` Peter Crosthwaite
2016-02-20 18:03                           ` Jean-Christophe DUBOIS
2016-02-21  3:42                             ` Peter Crosthwaite
2016-02-21 13:42                               ` Jean-Christophe DUBOIS
2016-02-29 17:58                   ` Peter Maydell
2016-02-29 20:34                     ` Jean-Christophe DUBOIS
2016-02-29 21:14                       ` Peter Maydell
2016-02-29 21:32                         ` Jean-Christophe DUBOIS
2016-03-01 16:19                           ` Peter Maydell
2016-03-01 19:17                             ` Jean-Christophe DUBOIS
2016-02-08 22:08 ` [Qemu-devel] [PATCH v2 8/9] i.MX: Add sabrelite i.MX6 emulation Jean-Christophe Dubois
2016-02-16 15:25   ` Peter Maydell
2016-02-08 22:08 ` [Qemu-devel] [PATCH v2 9/9] i.MX: Add missing descriptions in devices Jean-Christophe Dubois
2016-02-16 15:21   ` Peter Maydell
2016-02-28 20:27 ` [Qemu-devel] [PATCH v2 0/9] Add i.MX6 (Single/Dual/Quad) support Jean-Christophe DUBOIS
2016-03-01 19:18   ` Jean-Christophe DUBOIS
2016-03-01 19:27     ` Peter Maydell

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=ee9738c972c9020a7e2a253e75e3dc1a40bb8849.1454967766.git.jcd@tribudubois.net \
    --to=jcd@tribudubois.net \
    --cc=crosthwaite.peter@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.