* [PATCH 1/3] ARM: shmobile: Add r8a7791 legacy SDHI clocks
2014-02-21 6:13 [GIT PULL] Third Round of Renesas ARM Based SoC Updates for v3.15 Simon Horman
@ 2014-02-21 6:13 ` Simon Horman
2014-02-21 6:13 ` [PATCH 2/3] ARM: shmobile: Remove legacy r8a7790 DT clocks Simon Horman
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2014-02-21 6:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
Add legacy r8a7791 SDHI clocks. This to allow the SDHI devices
to be used by legacy Koelsch board support.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/clock-r8a7791.c | 51 ++++++++++++++++++++++++++++++++--
1 file changed, 49 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
index c8227b3..3e1b6b6 100644
--- a/arch/arm/mach-shmobile/clock-r8a7791.c
+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
@@ -61,6 +61,7 @@
#define MSTPSR1 IOMEM(0xe6150038)
#define MSTPSR2 IOMEM(0xe6150040)
+#define MSTPSR3 IOMEM(0xe6150048)
#define MSTPSR5 IOMEM(0xe615003c)
#define MSTPSR7 IOMEM(0xe61501c4)
#define MSTPSR8 IOMEM(0xe61509a0)
@@ -69,8 +70,8 @@
#define MODEMR 0xE6160060
#define SDCKCR 0xE6150074
-#define SD2CKCR 0xE6150078
-#define SD3CKCR 0xE615007C
+#define SD1CKCR 0xE6150078
+#define SD2CKCR 0xE615026c
#define MMC0CKCR 0xE6150240
#define MMC1CKCR 0xE6150244
#define SSPCKCR 0xE6150248
@@ -134,6 +135,39 @@ static struct clk *main_clks[] = {
&zs_clk,
};
+/* SDHI (DIV4) clock */
+static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 18, 24, 0, 36, 48, 10 };
+
+static struct clk_div_mult_table div4_div_mult_table = {
+ .divisors = divisors,
+ .nr_divisors = ARRAY_SIZE(divisors),
+};
+
+static struct clk_div4_table div4_table = {
+ .div_mult_table = &div4_div_mult_table,
+};
+
+enum {
+ DIV4_SDH, DIV4_SD0,
+ DIV4_NR
+};
+
+static struct clk div4_clks[DIV4_NR] = {
+ [DIV4_SDH] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 8, 0x0dff, CLK_ENABLE_ON_INIT),
+ [DIV4_SD0] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 4, 0x1de0, CLK_ENABLE_ON_INIT),
+};
+
+/* DIV6 clocks */
+enum {
+ DIV6_SD1, DIV6_SD2,
+ DIV6_NR
+};
+
+static struct clk div6_clks[DIV6_NR] = {
+ [DIV6_SD1] = SH_CLK_DIV6(&pll1_div2_clk, SD1CKCR, 0),
+ [DIV6_SD2] = SH_CLK_DIV6(&pll1_div2_clk, SD2CKCR, 0),
+};
+
/* MSTP */
enum {
MSTP931, MSTP930, MSTP929, MSTP928, MSTP927, MSTP925,
@@ -144,6 +178,7 @@ enum {
MSTP726, MSTP724, MSTP723, MSTP721, MSTP720,
MSTP719, MSTP718, MSTP715, MSTP714,
MSTP522,
+ MSTP314, MSTP312, MSTP311,
MSTP216, MSTP207, MSTP206,
MSTP204, MSTP203, MSTP202, MSTP1105, MSTP1106, MSTP1107,
MSTP124,
@@ -174,6 +209,9 @@ static struct clk mstp_clks[MSTP_NR] = {
[MSTP715] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 15, MSTPSR7, 0), /* SCIF4 */
[MSTP714] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 14, MSTPSR7, 0), /* SCIF5 */
[MSTP522] = SH_CLK_MSTP32_STS(&extal_clk, SMSTPCR5, 22, MSTPSR5, 0), /* Thermal */
+ [MSTP314] = SH_CLK_MSTP32_STS(&div4_clks[DIV4_SD0], SMSTPCR3, 14, MSTPSR3, 0), /* SDHI0 */
+ [MSTP312] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_SD1], SMSTPCR3, 12, MSTPSR3, 0), /* SDHI1 */
+ [MSTP311] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_SD2], SMSTPCR3, 11, MSTPSR3, 0), /* SDHI2 */
[MSTP216] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 16, MSTPSR2, 0), /* SCIFB2 */
[MSTP207] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 7, MSTPSR2, 0), /* SCIFB1 */
[MSTP206] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 6, MSTPSR2, 0), /* SCIFB0 */
@@ -224,6 +262,9 @@ static struct clk_lookup lookups[] = {
CLKDEV_DEV_ID("sh-sci.12", &mstp_clks[MSTP1105]), /* SCIFA3 */
CLKDEV_DEV_ID("sh-sci.13", &mstp_clks[MSTP1106]), /* SCIFA4 */
CLKDEV_DEV_ID("sh-sci.14", &mstp_clks[MSTP1107]), /* SCIFA5 */
+ CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]),
+ CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP312]),
+ CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]),
CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]),
CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]),
CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
@@ -286,6 +327,12 @@ void __init r8a7791_clock_init(void)
ret = clk_register(main_clks[k]);
if (!ret)
+ ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table);
+
+ if (!ret)
+ ret = sh_clk_div6_register(div6_clks, DIV6_NR);
+
+ if (!ret)
ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
--
1.8.5.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [GIT PULL] Third Round of Renesas ARM Based SoC Updates for v3.15
@ 2014-02-21 6:13 Simon Horman
2014-02-21 6:13 ` [PATCH 1/3] ARM: shmobile: Add r8a7791 legacy SDHI clocks Simon Horman
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Simon Horman @ 2014-02-21 6:13 UTC (permalink / raw)
To: linux-arm-kernel
Hi Olof, Hi Kevin, Hi Arnd,
Please consider this third round of Renesas ARM based SoC updates for v3.15.
This pull request is based on the previous round of
such requests, tagged as renesas-soc2-for-v3.15,
which I have already sent a pull-request for.
The following changes since commit 74b9ba5f35fbd071f313781498a9e244bcc6f03e:
ARM: shmobile: r8a7790: Correct SYS DMAC clock defines (2014-02-07 09:24:07 +0900)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc3-for-v3.15
for you to fetch changes up to db47204b32dd0d72454b4f841d0f7e33c44ee2b8:
ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins() (2014-02-18 13:25:09 +0900)
----------------------------------------------------------------
Third Round of Renesas ARM Based SoC Updates for v3.15
* R-Car Gen2 SoCs: r8a7791 (R-Car M2) and r8a7790 (R-Car H2)
- Remove __init from rcar_gen2_read_mode_pins()
* r8a7791 SoC (R-Car M2)
- Add r8a7791 legacy SDHI clocks
* r8a7790 SoC (R-Car M2)
- Remove legacy DT clocks
----------------------------------------------------------------
Magnus Damm (3):
ARM: shmobile: Add r8a7791 legacy SDHI clocks
ARM: shmobile: Remove legacy r8a7790 DT clocks
ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins()
arch/arm/mach-shmobile/clock-r8a7790.c | 11 -------
arch/arm/mach-shmobile/clock-r8a7791.c | 51 ++++++++++++++++++++++++++++++--
arch/arm/mach-shmobile/setup-rcar-gen2.c | 2 +-
3 files changed, 50 insertions(+), 14 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] ARM: shmobile: Remove legacy r8a7790 DT clocks
2014-02-21 6:13 [GIT PULL] Third Round of Renesas ARM Based SoC Updates for v3.15 Simon Horman
2014-02-21 6:13 ` [PATCH 1/3] ARM: shmobile: Add r8a7791 legacy SDHI clocks Simon Horman
@ 2014-02-21 6:13 ` Simon Horman
2014-02-21 6:13 ` [PATCH 3/3] ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins() Simon Horman
2014-03-17 7:28 ` [GIT PULL] Third Round of Renesas ARM Based SoC Updates for v3.15 Olof Johansson
3 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2014-02-21 6:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
The DT device case is handled by CCF these days, so get
rid of DT devices from the legacy clocks for r8a7790.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/clock-r8a7790.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
index 08a2803..02b94036 100644
--- a/arch/arm/mach-shmobile/clock-r8a7790.c
+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
@@ -328,34 +328,23 @@ static struct clk_lookup lookups[] = {
CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]),
CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP717]),
CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP716]),
- CLKDEV_DEV_ID("e6508000.i2c", &mstp_clks[MSTP931]),
CLKDEV_DEV_ID("i2c-rcar_gen2.0", &mstp_clks[MSTP931]),
- CLKDEV_DEV_ID("e6518000.i2c", &mstp_clks[MSTP930]),
CLKDEV_DEV_ID("i2c-rcar_gen2.1", &mstp_clks[MSTP930]),
- CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP929]),
CLKDEV_DEV_ID("i2c-rcar_gen2.2", &mstp_clks[MSTP929]),
- CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]),
CLKDEV_DEV_ID("i2c-rcar_gen2.3", &mstp_clks[MSTP928]),
CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]),
CLKDEV_DEV_ID("r8a7790-vin.0", &mstp_clks[MSTP811]),
CLKDEV_DEV_ID("r8a7790-vin.1", &mstp_clks[MSTP810]),
CLKDEV_DEV_ID("r8a7790-vin.2", &mstp_clks[MSTP809]),
CLKDEV_DEV_ID("r8a7790-vin.3", &mstp_clks[MSTP808]),
- CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP502]),
CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP501]),
- CLKDEV_DEV_ID("ee200000.mmc", &mstp_clks[MSTP315]),
CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
- CLKDEV_DEV_ID("ee100000.sd", &mstp_clks[MSTP314]),
CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]),
- CLKDEV_DEV_ID("ee120000.sd", &mstp_clks[MSTP313]),
CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]),
- CLKDEV_DEV_ID("ee140000.sd", &mstp_clks[MSTP312]),
CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]),
- CLKDEV_DEV_ID("ee160000.sd", &mstp_clks[MSTP311]),
CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP311]),
- CLKDEV_DEV_ID("ee220000.mmc", &mstp_clks[MSTP305]),
CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]),
CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]),
CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]),
--
1.8.5.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins()
2014-02-21 6:13 [GIT PULL] Third Round of Renesas ARM Based SoC Updates for v3.15 Simon Horman
2014-02-21 6:13 ` [PATCH 1/3] ARM: shmobile: Add r8a7791 legacy SDHI clocks Simon Horman
2014-02-21 6:13 ` [PATCH 2/3] ARM: shmobile: Remove legacy r8a7790 DT clocks Simon Horman
@ 2014-02-21 6:13 ` Simon Horman
2014-03-17 7:28 ` [GIT PULL] Third Round of Renesas ARM Based SoC Updates for v3.15 Olof Johansson
3 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2014-02-21 6:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
Remove __init from rcar_gen2_read_mode_pins() to allow
it to be used after boot. For instance the R-Car Gen2
MD21 check is needed even in the case of CPU Hotplug.
Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/setup-rcar-gen2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
index 69ccc6c..1060448 100644
--- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
@@ -28,7 +28,7 @@
#define MODEMR 0xe6160060
-u32 __init rcar_gen2_read_mode_pins(void)
+u32 rcar_gen2_read_mode_pins(void)
{
void __iomem *modemr = ioremap_nocache(MODEMR, 4);
u32 mode;
--
1.8.5.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [GIT PULL] Third Round of Renesas ARM Based SoC Updates for v3.15
@ 2014-03-10 8:36 Simon Horman
2014-03-17 7:50 ` Olof Johansson
0 siblings, 1 reply; 7+ messages in thread
From: Simon Horman @ 2014-03-10 8:36 UTC (permalink / raw)
To: linux-arm-kernel
Hi Olof, Hi Kevin, Hi Arnd,
Please consider this third round of Renesas ARM based SoC updates for v3.15.
I am sending this pull request after the release of v3.14-rc6
as it only includes a fix.
This pull request is based on the previous round of
such requests, tagged as renesas-soc2-for-v3.15,
which I have already sent a pull-request for.
The following changes since commit c4ca5d80e03559fd95c526ece5ce39fc732a2511:
ARM: shmobile: Move SYSC base variable to inside ifdefs (2014-02-26 14:53:35 +0900)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc3-for-v3.15
for you to fetch changes up to 56ff873122c4baab43df241c7701d043b8ec8a8e:
ARM: shmobile: APMU: Fix warnings due to improper printk formats (2014-03-06 13:14:03 +0900)
----------------------------------------------------------------
Third Round of Renesas ARM Based SoC Updates for v3.15
Fix warnings due to improper printk formats in shared APMU code.
----------------------------------------------------------------
Laurent Pinchart (1):
ARM: shmobile: APMU: Fix warnings due to improper printk formats
arch/arm/mach-shmobile/platsmp-apmu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [GIT PULL] Third Round of Renesas ARM Based SoC Updates for v3.15
2014-02-21 6:13 [GIT PULL] Third Round of Renesas ARM Based SoC Updates for v3.15 Simon Horman
` (2 preceding siblings ...)
2014-02-21 6:13 ` [PATCH 3/3] ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins() Simon Horman
@ 2014-03-17 7:28 ` Olof Johansson
3 siblings, 0 replies; 7+ messages in thread
From: Olof Johansson @ 2014-03-17 7:28 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Feb 21, 2014 at 03:13:09PM +0900, Simon Horman wrote:
> Hi Olof, Hi Kevin, Hi Arnd,
>
> Please consider this third round of Renesas ARM based SoC updates for v3.15.
>
> This pull request is based on the previous round of
> such requests, tagged as renesas-soc2-for-v3.15,
> which I have already sent a pull-request for.
>
>
> The following changes since commit 74b9ba5f35fbd071f313781498a9e244bcc6f03e:
>
> ARM: shmobile: r8a7790: Correct SYS DMAC clock defines (2014-02-07 09:24:07 +0900)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc3-for-v3.15
As per email on the second SoC pull request; I'm not pulling this specific
request in (there seems to be a new cumulative tag with the same name, I'll
come across that pull request as I work through the backlog :)
-Olof
^ permalink raw reply [flat|nested] 7+ messages in thread
* [GIT PULL] Third Round of Renesas ARM Based SoC Updates for v3.15
2014-03-10 8:36 Simon Horman
@ 2014-03-17 7:50 ` Olof Johansson
0 siblings, 0 replies; 7+ messages in thread
From: Olof Johansson @ 2014-03-17 7:50 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Mar 10, 2014 at 05:36:55PM +0900, Simon Horman wrote:
> Hi Olof, Hi Kevin, Hi Arnd,
>
> Please consider this third round of Renesas ARM based SoC updates for v3.15.
>
> I am sending this pull request after the release of v3.14-rc6
> as it only includes a fix.
>
> This pull request is based on the previous round of
> such requests, tagged as renesas-soc2-for-v3.15,
> which I have already sent a pull-request for.
>
>
> The following changes since commit c4ca5d80e03559fd95c526ece5ce39fc732a2511:
>
> ARM: shmobile: Move SYSC base variable to inside ifdefs (2014-02-26 14:53:35 +0900)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc3-for-v3.15
>
> for you to fetch changes up to 56ff873122c4baab43df241c7701d043b8ec8a8e:
>
> ARM: shmobile: APMU: Fix warnings due to improper printk formats (2014-03-06 13:14:03 +0900)
>
Merged, thanks!
-Olof
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-03-17 7:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21 6:13 [GIT PULL] Third Round of Renesas ARM Based SoC Updates for v3.15 Simon Horman
2014-02-21 6:13 ` [PATCH 1/3] ARM: shmobile: Add r8a7791 legacy SDHI clocks Simon Horman
2014-02-21 6:13 ` [PATCH 2/3] ARM: shmobile: Remove legacy r8a7790 DT clocks Simon Horman
2014-02-21 6:13 ` [PATCH 3/3] ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins() Simon Horman
2014-03-17 7:28 ` [GIT PULL] Third Round of Renesas ARM Based SoC Updates for v3.15 Olof Johansson
-- strict thread matches above, loose matches on Subject: below --
2014-03-10 8:36 Simon Horman
2014-03-17 7:50 ` Olof Johansson
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).