diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-10-29 04:14:41 -0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2012-11-07 03:11:34 -0500 |
commit | 0a3842900429c2b59fe5d5d9c182cb8f63bd955c (patch) | |
tree | 09ff3b8572980ea05471380398329541f47e3153 | |
parent | 167443b16e3b9875e0541701b96e4009be8360f0 (diff) |
ARM: shmobile: r8a7740: add USB24 clock explain
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>
-rw-r--r-- | 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 6729e0032180..c012bbf4e05c 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 = { | |||
188 | }; | 188 | }; |
189 | 189 | ||
190 | /* USB clock */ | 190 | /* USB clock */ |
191 | /* | ||
192 | * USBCKCR is controlling usb24 clock | ||
193 | * bit[7] : parent clock | ||
194 | * bit[6] : clock divide rate | ||
195 | * And this bit[7] is used as a "usb24s" from other devices. | ||
196 | * (Video clock / Sub clock / SPU clock) | ||
197 | * You can controll this clock as a below. | ||
198 | * | ||
199 | * struct clk *usb24 = clk_get(dev, "usb24"); | ||
200 | * struct clk *usb24s = clk_get(NULL, "usb24s"); | ||
201 | * struct clk *system = clk_get(NULL, "system_clk"); | ||
202 | * int rate = clk_get_rate(system); | ||
203 | * | ||
204 | * clk_set_parent(usb24s, system); // for bit[7] | ||
205 | * clk_set_rate(usb24, rate / 2); // for bit[6] | ||
206 | */ | ||
191 | static struct clk *usb24s_parents[] = { | 207 | static struct clk *usb24s_parents[] = { |
192 | [0] = &system_clk, | 208 | [0] = &system_clk, |
193 | [1] = &extal2_clk | 209 | [1] = &extal2_clk |