* [PATCH] ARM: mach-shmobile: clock-sh7372: Add MMCIF clock
@ 2010-06-01 2:40 Kuninori Morimoto
2010-07-28 2:54 ` [PATCH] ARM: mach-shmobile: clock-sh7372: modify clock name for FSI2 Kuninori Morimoto
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2010-06-01 2:40 UTC (permalink / raw)
To: linux-sh
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/arm/mach-shmobile/clock-sh7372.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
index 1364072..241caea 100644
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ b/arch/arm/mach-shmobile/clock-sh7372.c
@@ -246,7 +246,7 @@ enum { MSTP001,
MSTP106, MSTP101, MSTP100,
MSTP223,
MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
- MSTP329, MSTP328, MSTP323, MSTP322, MSTP314, MSTP313,
+ MSTP329, MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312,
MSTP415, MSTP410, MSTP411, MSTP406, MSTP403,
MSTP_NR };
@@ -279,6 +279,7 @@ static struct clk mstp_clks[MSTP_NR] = {
[MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */
[MSTP314] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 14, 0), /* SDHI0 */
[MSTP313] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 13, 0), /* SDHI1 */
+ [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMC */
[MSTP415] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 15, 0), /* SDHI2 */
[MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */
[MSTP410] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 10, 0), /* IIC4 */
@@ -363,6 +364,7 @@ static struct clk_lookup lookups[] = {
CLKDEV_DEV_ID("r8a66597_udc.0", &mstp_clks[MSTP323]), /* USB0 */
CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */
CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */
+ CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMC */
CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), /* SDHI2 */
CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */
CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* IIC4 */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] ARM: mach-shmobile: clock-sh7372: modify clock name for FSI2
2010-06-01 2:40 [PATCH] ARM: mach-shmobile: clock-sh7372: Add MMCIF clock Kuninori Morimoto
@ 2010-07-28 2:54 ` Kuninori Morimoto
2011-01-11 5:11 ` [PATCH] ARM: mach-shmobile: clock-sh7372: fixup pllc2 set_rate Kuninori Morimoto
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2010-07-28 2:54 UTC (permalink / raw)
To: linux-sh
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/arm/mach-shmobile/clock-sh7372.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
index 2b804aa..26d651c 100644
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ b/arch/arm/mach-shmobile/clock-sh7372.c
@@ -514,7 +514,7 @@ static struct clk_lookup lookups[] = {
CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */
CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */
CLKDEV_CON_ID("cmt1", &mstp_clks[MSTP329]), /* CMT10 */
- CLKDEV_DEV_ID("sh_fsi", &mstp_clks[MSTP328]), /* FSI */
+ CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI2 */
CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */
CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP323]), /* USB0 */
CLKDEV_DEV_ID("r8a66597_udc.0", &mstp_clks[MSTP323]), /* USB0 */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] ARM: mach-shmobile: clock-sh7372: fixup pllc2 set_rate
2010-06-01 2:40 [PATCH] ARM: mach-shmobile: clock-sh7372: Add MMCIF clock Kuninori Morimoto
2010-07-28 2:54 ` [PATCH] ARM: mach-shmobile: clock-sh7372: modify clock name for FSI2 Kuninori Morimoto
@ 2011-01-11 5:11 ` Kuninori Morimoto
2011-01-13 22:43 ` Paul Mundt
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2011-01-11 5:11 UTC (permalink / raw)
To: linux-sh
This patch fixup 421b446abeec55bed1251fab80cb5c12be58b773
- Care clk->rate
- Don't over write PLLC2 enable bit
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
Guennadi
Thank you for your report about it.
Is this patch solve your issue ?
I tested this patch on ap4evb, mackerel on Paul's rmobile-latest.
arch/arm/mach-shmobile/clock-sh7372.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
index 9aa8d68..e9731b5 100644
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ b/arch/arm/mach-shmobile/clock-sh7372.c
@@ -234,7 +234,9 @@ static int pllc2_set_rate(struct clk *clk, unsigned long rate)
value = __raw_readl(PLLC2CR) & ~(0x3f << 24);
- __raw_writel((value & ~0x80000000) | ((idx + 19) << 24), PLLC2CR);
+ __raw_writel(value | ((idx + 19) << 24), PLLC2CR);
+
+ clk->rate = clk->freq_table[idx].frequency;
return 0;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] ARM: mach-shmobile: clock-sh7372: fixup pllc2 set_rate
2010-06-01 2:40 [PATCH] ARM: mach-shmobile: clock-sh7372: Add MMCIF clock Kuninori Morimoto
2010-07-28 2:54 ` [PATCH] ARM: mach-shmobile: clock-sh7372: modify clock name for FSI2 Kuninori Morimoto
2011-01-11 5:11 ` [PATCH] ARM: mach-shmobile: clock-sh7372: fixup pllc2 set_rate Kuninori Morimoto
@ 2011-01-13 22:43 ` Paul Mundt
2011-01-14 16:53 ` Guennadi Liakhovetski
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Paul Mundt @ 2011-01-13 22:43 UTC (permalink / raw)
To: linux-sh
On Tue, Jan 11, 2011 at 02:11:20PM +0900, Kuninori Morimoto wrote:
> This patch fixup 421b446abeec55bed1251fab80cb5c12be58b773
> - Care clk->rate
> - Don't over write PLLC2 enable bit
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
> Guennadi
>
> Thank you for your report about it.
> Is this patch solve your issue ?
> I tested this patch on ap4evb, mackerel on Paul's rmobile-latest.
>
Guennadi, please give this a test when you have a chance. If it fixes
the issues you were seeing then it's also suitable as a -stable
candidate.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ARM: mach-shmobile: clock-sh7372: fixup pllc2 set_rate
2010-06-01 2:40 [PATCH] ARM: mach-shmobile: clock-sh7372: Add MMCIF clock Kuninori Morimoto
` (2 preceding siblings ...)
2011-01-13 22:43 ` Paul Mundt
@ 2011-01-14 16:53 ` Guennadi Liakhovetski
2011-04-14 8:13 ` [PATCH] ARM: mach-shmobile: clock-sh7372: remove status check from Kuninori Morimoto
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Guennadi Liakhovetski @ 2011-01-14 16:53 UTC (permalink / raw)
To: linux-sh
Morimoto-san
Thanks for the patch, it does fix the regression.
On Tue, 11 Jan 2011, Kuninori Morimoto wrote:
> This patch fixup 421b446abeec55bed1251fab80cb5c12be58b773
> - Care clk->rate
> - Don't over write PLLC2 enable bit
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Thanks
Guennadi
> ---
> Guennadi
>
> Thank you for your report about it.
> Is this patch solve your issue ?
> I tested this patch on ap4evb, mackerel on Paul's rmobile-latest.
>
> arch/arm/mach-shmobile/clock-sh7372.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
> index 9aa8d68..e9731b5 100644
> --- a/arch/arm/mach-shmobile/clock-sh7372.c
> +++ b/arch/arm/mach-shmobile/clock-sh7372.c
> @@ -234,7 +234,9 @@ static int pllc2_set_rate(struct clk *clk, unsigned long rate)
>
> value = __raw_readl(PLLC2CR) & ~(0x3f << 24);
>
> - __raw_writel((value & ~0x80000000) | ((idx + 19) << 24), PLLC2CR);
> + __raw_writel(value | ((idx + 19) << 24), PLLC2CR);
> +
> + clk->rate = clk->freq_table[idx].frequency;
>
> return 0;
> }
> --
> 1.7.1
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ARM: mach-shmobile: clock-sh7372: remove status check from
2010-06-01 2:40 [PATCH] ARM: mach-shmobile: clock-sh7372: Add MMCIF clock Kuninori Morimoto
` (3 preceding siblings ...)
2011-01-14 16:53 ` Guennadi Liakhovetski
@ 2011-04-14 8:13 ` Kuninori Morimoto
2011-04-18 9:36 ` [PATCH] ARM: mach-shmobile: clock-sh7372: remove status check from fsidiv_recalc Paul Mundt
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2011-04-14 8:13 UTC (permalink / raw)
To: linux-sh
clock status check is not needed in recalc function.
clk->rate will be 0 in clk_set_rate without this patch.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/arm/mach-shmobile/clock-sh7372.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
index e9731b5..6c79b40 100644
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ b/arch/arm/mach-shmobile/clock-sh7372.c
@@ -421,9 +421,6 @@ static unsigned long fsidiv_recalc(struct clk *clk)
value = __raw_readl(clk->mapping->base);
- if ((value & 0x3) != 0x3)
- return 0;
-
value >>= 16;
if (value < 2)
return 0;
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] ARM: mach-shmobile: clock-sh7372: remove status check from fsidiv_recalc
2010-06-01 2:40 [PATCH] ARM: mach-shmobile: clock-sh7372: Add MMCIF clock Kuninori Morimoto
` (4 preceding siblings ...)
2011-04-14 8:13 ` [PATCH] ARM: mach-shmobile: clock-sh7372: remove status check from Kuninori Morimoto
@ 2011-04-18 9:36 ` Paul Mundt
2011-08-24 2:44 ` [PATCH] ARM: mach-shmobile: clock-sh7372: fixup USB-DMAC1 settings Kuninori Morimoto
2011-08-24 9:20 ` Magnus Damm
7 siblings, 0 replies; 9+ messages in thread
From: Paul Mundt @ 2011-04-18 9:36 UTC (permalink / raw)
To: linux-sh
On Thu, Apr 14, 2011 at 05:13:22PM +0900, Kuninori Morimoto wrote:
> clock status check is not needed in recalc function.
> clk->rate will be 0 in clk_set_rate without this patch.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
On Thu, Apr 14, 2011 at 05:13:53PM +0900, Kuninori Morimoto wrote:
> div6 clock should not use arch_flags for clk_rate_table_build,
> because SH_CLK_DIV6_EXT doesn't care .arch_flags.
> clk->freq_table[] will be all CPUFREQ_ENTRY_INVALID without this patch.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Both applied, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ARM: mach-shmobile: clock-sh7372: fixup USB-DMAC1 settings
2010-06-01 2:40 [PATCH] ARM: mach-shmobile: clock-sh7372: Add MMCIF clock Kuninori Morimoto
` (5 preceding siblings ...)
2011-04-18 9:36 ` [PATCH] ARM: mach-shmobile: clock-sh7372: remove status check from fsidiv_recalc Paul Mundt
@ 2011-08-24 2:44 ` Kuninori Morimoto
2011-08-24 9:20 ` Magnus Damm
7 siblings, 0 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2011-08-24 2:44 UTC (permalink / raw)
To: linux-sh
USB-DMAC1 needs SMSTPCR4/MSTP407 controls, not MSTP214
Reported-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
Paul
It is based on paul/rmobile/dma branch
arch/arm/mach-shmobile/clock-sh7372.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
index c239ab1..3f8de2c 100644
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ b/arch/arm/mach-shmobile/clock-sh7372.c
@@ -512,7 +512,7 @@ enum { MSTP001,
MSTP214, MSTP218, MSTP217, MSTP216,
MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
MSTP329, MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312,
- MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP406, MSTP403,
+ MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP407, MSTP406, MSTP403,
MSTP_NR };
#define MSTP(_parent, _reg, _bit, _flags) \
@@ -558,6 +558,7 @@ static struct clk mstp_clks[MSTP_NR] = {
[MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */
[MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */
[MSTP410] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 10, 0), /* IIC4 */
+ [MSTP407] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 7, 0), /* USBDMAC */
[MSTP406] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 6, 0), /* USB1 */
[MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */
};
@@ -635,7 +636,7 @@ static struct clk_lookup lookups[] = {
CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* DMAC2 */
CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), /* DMAC3 */
CLKDEV_DEV_ID("sh-dma-engine.3", &mstp_clks[MSTP214]), /* USB-DMAC0 */
- CLKDEV_DEV_ID("sh-dma-engine.4", &mstp_clks[MSTP214]), /* USB-DMAC1 */
+ CLKDEV_DEV_ID("sh-dma-engine.4", &mstp_clks[MSTP407]), /* USB-DMAC1 */
CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */
CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP206]), /* SCIFB */
CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] ARM: mach-shmobile: clock-sh7372: fixup USB-DMAC1 settings
2010-06-01 2:40 [PATCH] ARM: mach-shmobile: clock-sh7372: Add MMCIF clock Kuninori Morimoto
` (6 preceding siblings ...)
2011-08-24 2:44 ` [PATCH] ARM: mach-shmobile: clock-sh7372: fixup USB-DMAC1 settings Kuninori Morimoto
@ 2011-08-24 9:20 ` Magnus Damm
7 siblings, 0 replies; 9+ messages in thread
From: Magnus Damm @ 2011-08-24 9:20 UTC (permalink / raw)
To: linux-sh
Hi Morimoto-san,
On Wed, Aug 24, 2011 at 11:44 AM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> USB-DMAC1 needs SMSTPCR4/MSTP407 controls, not MSTP214
>
> Reported-by: Magnus Damm <damm@opensource.se>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
Thanks for your work on this. Please make sure the code is well tested.
> @@ -558,6 +558,7 @@ static struct clk mstp_clks[MSTP_NR] = {
> [MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */
> [MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */
> [MSTP410] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 10, 0), /* IIC4 */
> + [MSTP407] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 7, 0), /* USBDMAC */
> [MSTP406] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 6, 0), /* USB1 */
> [MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */
> };
Nit: s/USBDMAC/USB-DMAC0/g
> @@ -635,7 +636,7 @@ static struct clk_lookup lookups[] = {
> CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* DMAC2 */
> CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), /* DMAC3 */
> CLKDEV_DEV_ID("sh-dma-engine.3", &mstp_clks[MSTP214]), /* USB-DMAC0 */
> - CLKDEV_DEV_ID("sh-dma-engine.4", &mstp_clks[MSTP214]), /* USB-DMAC1 */
> + CLKDEV_DEV_ID("sh-dma-engine.4", &mstp_clks[MSTP407]), /* USB-DMAC1 */
> CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */
> CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP206]), /* SCIFB */
> CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */
This should follow the same order as above. Please move down MSTP407
next to the other MSTP4xx bits.
Thanks,
/ magnus
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-08-24 9:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-01 2:40 [PATCH] ARM: mach-shmobile: clock-sh7372: Add MMCIF clock Kuninori Morimoto
2010-07-28 2:54 ` [PATCH] ARM: mach-shmobile: clock-sh7372: modify clock name for FSI2 Kuninori Morimoto
2011-01-11 5:11 ` [PATCH] ARM: mach-shmobile: clock-sh7372: fixup pllc2 set_rate Kuninori Morimoto
2011-01-13 22:43 ` Paul Mundt
2011-01-14 16:53 ` Guennadi Liakhovetski
2011-04-14 8:13 ` [PATCH] ARM: mach-shmobile: clock-sh7372: remove status check from Kuninori Morimoto
2011-04-18 9:36 ` [PATCH] ARM: mach-shmobile: clock-sh7372: remove status check from fsidiv_recalc Paul Mundt
2011-08-24 2:44 ` [PATCH] ARM: mach-shmobile: clock-sh7372: fixup USB-DMAC1 settings Kuninori Morimoto
2011-08-24 9:20 ` Magnus Damm
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.