linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] Renesas ARM-based SoC: r8a7740 SoC for 3.7
@ 2012-08-30  5:52 Simon Horman
  2012-08-30  5:52 ` [PATCH] ARM: shmobile: r8a7740: add USB24 clock explain and sample code Simon Horman
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Horman @ 2012-08-30  5:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Olof, Hi Arnd,

please consider the following documentation enhancement for the
r8a7740 SoC from Morimoto-san for inclusion in 3.7.

----------------------------------------------------------------
The following changes since commit fea7a08acb13524b47711625eebea40a0ede69a0:

  Linux 3.6-rc3 (2012-08-22 13:29:06 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git r8a7740

for you to fetch changes up to a6e7c110f972d7ca5c6eb288f5e64d5659b44dc0:

  ARM: shmobile: r8a7740: add USB24 clock explain and sample code (2012-08-27 17:43:22 +0900)

----------------------------------------------------------------
Kuninori Morimoto (1):
      ARM: shmobile: r8a7740: add USB24 clock explain and sample code

 arch/arm/mach-shmobile/clock-r8a7740.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH] ARM: shmobile: r8a7740: add USB24 clock explain and sample code
@ 2012-08-08  8:55 Kuninori Morimoto
  2012-08-27  8:44 ` Simon Horman
  0 siblings, 1 reply; 6+ messages in thread
From: Kuninori Morimoto @ 2012-08-08  8:55 UTC (permalink / raw)
  To: linux-sh

USBCKCR is controlling USB parent clock and divide rate.
This parent clock is used as a "usb24s" from other devices,
but the "divide rate" is not used.
Further, this clock itself is known as "usb24".
So, to set this clock is a little confusable.
This patch adds quick explain and sample code for this clock.

Cc: Damian Hobson-Garcia <dhobsong@igel.co.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm/mach-shmobile/clock-r8a7740.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
index ad5fccc..a6a7583 100644
--- a/arch/arm/mach-shmobile/clock-r8a7740.c
+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
@@ -188,6 +188,22 @@ static struct clk pllc1_div2_clk = {
 };
 
 /* USB clock */
+/*
+ * USBCKCR is controlling usb24 clock
+ * bit[7] : parent clock
+ * bit[6] : clock divide rate
+ * And this bit[7] is used as a "usb24s" from other devices.
+ * (Video clock / Sub clock / SPU clock)
+ * You can controll this clock as a below.
+ *
+ * struct clk *usb24	= clk_get(dev,  "usb24");
+ * struct clk *usb24s	= clk_get(NULL, "usb24s");
+ * struct clk *system	= clk_get(NULL, "system_clk");
+ * int rate = clk_get_rate(system);
+ *
+ * clk_set_parent(usb24s, system);  // for bit[7]
+ * clk_set_rate(usb24, rate / 2);   // for bit[6]
+ */
 static struct clk *usb24s_parents[] = {
 	[0] = &system_clk,
 	[1] = &extal2_clk
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-07  1:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-30  5:52 [GIT PULL] Renesas ARM-based SoC: r8a7740 SoC for 3.7 Simon Horman
2012-08-30  5:52 ` [PATCH] ARM: shmobile: r8a7740: add USB24 clock explain and sample code Simon Horman
2012-09-05 22:54   ` Olof Johansson
2012-09-07  1:23     ` Kuninori Morimoto
  -- strict thread matches above, loose matches on Subject: below --
2012-08-08  8:55 Kuninori Morimoto
2012-08-27  8:44 ` Simon Horman

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).