From: horms@verge.net.au (Simon Horman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/10] ARM: shmobile: r8a7740: add USB24 clock explain
Date: Fri, 9 Nov 2012 16:29:17 +0900 [thread overview]
Message-ID: <1352446165-19298-3-git-send-email-horms@verge.net.au> (raw)
In-Reply-To: <1352446165-19298-1-git-send-email-horms@verge.net.au>
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
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 settings for this clock.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
arch/arm/mach-shmobile/clock-r8a7740.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
index 6729e00..c012bbf 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.10.4
next prev parent reply other threads:[~2012-11-09 7:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-09 7:29 [GIT PULL v2] Renesas ARM-based SoC for v3.8 #2 Simon Horman
2012-11-09 7:29 ` [PATCH 01/10] ARM: shmobile: r8a7779: PFC rename PENCx -> USB_PENCx Simon Horman
2012-11-09 7:29 ` Simon Horman [this message]
2012-11-09 7:29 ` [PATCH 03/10] ARM: shmobile: r8a7779: add USB EHCI clock support Simon Horman
2013-03-14 0:10 ` Sergei Shtylyov
2013-03-14 0:57 ` Kuninori Morimoto
2012-11-09 7:29 ` [PATCH 04/10] ARM: shmobile: r8a7779: add USB OHCI " Simon Horman
2012-11-09 7:29 ` [PATCH 05/10] sh: clkfwk: add sh_clk_fsidiv_register() Simon Horman
2012-11-12 22:43 ` Arnd Bergmann
2012-11-13 0:33 ` [PATCH] sh: clkfwk: fixup unsed variable warning Kuninori Morimoto
2012-11-09 7:29 ` [PATCH 06/10] ARM: shmobile: sh7372: sh7372_fsidivX_clk become non-global Simon Horman
2012-11-09 7:29 ` [PATCH 07/10] ARM: shmobile: sh7372: use sh_clk_fsidiv_register() for FSI-DIV clocks Simon Horman
2012-11-09 7:29 ` [PATCH 08/10] ARM: shmobile: r8a7740: add FSI-DVI clocks Simon Horman
2012-11-09 7:29 ` [PATCH 09/10] ARM: shmobile: add fsi external clock on r8a7740 Simon Horman
2012-11-09 7:29 ` [PATCH 10/10] ARM: shmobile: add fsi external clock sh7372 Simon Horman
2012-11-12 20:49 ` [GIT PULL v2] Renesas ARM-based SoC for v3.8 #2 Arnd Bergmann
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=1352446165-19298-3-git-send-email-horms@verge.net.au \
--to=horms@verge.net.au \
--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).