Skip to contentSkip to conversation

Second round of Renesas ARM based SoC updates for v3.13

GIT PULL New Simon Horman 4 participants 21 messages Oct 9, 2013 – Nov 13, 2013

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

Hi Olof, Kevin and Arnd,

please consider this second round of Renesas ARM based SoC updates for v3.13.

This pull-request is based on a merge of the following, each of which you have already pulled. The reason for the merge is to eliminate conflicts.
* renesas-soc-for-v3.13
* renesas-smp-for-v3.13
* renesas-fixes4-for-v3.13

The following changes since commit 243b6db0588b1425cb020e764475e8e1c4eb40d9:

Merge tag 'renesas-fixes4-for-v3.12' into soc2-base (2013-10-08 09:44:08 +0900)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc2-for-v3.13

for you to fetch changes up to 687c27b07050c21a62c4c975777c89e698649a6b:

ARM: shmobile: r8a7791 SMP support (2013-10-08 09:53:02 +0900)

----------------------------------------------------------------
Second Round of Renesas ARM based SoC updates for v3.13

* SMP support for r8a7791 SoC
* r8a7779_init_irq_extpin() for DT for r8a7779 and r8a7778 SoCs
* Add HPB-DMAC to r8a7779 and r8a7778 SoCs
* Add r7s72100 SoC
* Make use of ARCH timer workaround on r8a7791 SoC
* Add IRQC platform device support to r8a7791 SoC
* Add I2C clocks and aliases for the DT mode for r8a7790 SoC
* Add MAC platform device to r8a73a4 SoC

----------------------------------------------------------------
Guennadi Liakhovetski (3):
ARM: shmobile: r8a73a4: add a DMAC platform device and clock for it
ARM: shmobile: r8a7790: add I2C clocks and aliases for the DT mode
ARM: shmobile: r8a73a4: add a clock alias for the DMAC in DT mode

Kuninori Morimoto (2):

      ARM: shmobile: r8a7778: split r8a7778_init_irq_extpin() for DT
      ARM: shmobile: r8a7779: split r8a7779_init_irq_extpin() for DT

Magnus Damm (7):
ARM: shmobile: Break out R-Car Gen2 setup code
ARM: shmobile: Introduce r8a7791_add_standard_devices()
ARM: shmobile: r8a7791 IRQC platform device support
ARM: shmobile: r8a7791 Arch timer workaround
ARM: shmobile: Initial r7s72100 SoC support
ARM: shmobile: r7s72100 SCIF support
ARM: shmobile: r8a7791 SMP support

Max Filippov (2):
ARM: shmobile: r8a7778: add HPB-DMAC support
ARM: shmobile: r8a7779: add HPB-DMAC support

 arch/arm/boot/dts/r7s72100.dtsi                 |  36 +++++
 arch/arm/mach-shmobile/Kconfig                  |   6 +
 arch/arm/mach-shmobile/Makefile                 |   6 +-
 arch/arm/mach-shmobile/board-lager-reference.c  |   2 +-
 arch/arm/mach-shmobile/board-lager.c            |   2 +-
 arch/arm/mach-shmobile/clock-r7s72100.c         | 202 ++++++++++++++++++++++++
 arch/arm/mach-shmobile/clock-r8a73a4.c          |   5 +-
 arch/arm/mach-shmobile/clock-r8a7790.c          |  12 +-
 arch/arm/mach-shmobile/include/mach/r7s72100.h  |   8 +
 arch/arm/mach-shmobile/include/mach/r8a73a4.h   |   9 ++
 arch/arm/mach-shmobile/include/mach/r8a7778.h   |   9 ++
 arch/arm/mach-shmobile/include/mach/r8a7779.h   |   8 +
 arch/arm/mach-shmobile/include/mach/r8a7790.h   |   6 +-
 arch/arm/mach-shmobile/include/mach/r8a7791.h   |   2 +
 arch/arm/mach-shmobile/include/mach/rcar-gen2.h |   8 +
 arch/arm/mach-shmobile/setup-r7s72100.c         |  88 +++++++++++
 arch/arm/mach-shmobile/setup-r8a73a4.c          |  91 +++++++++++
 arch/arm/mach-shmobile/setup-r8a7778.c          |  91 ++++++++++-
 arch/arm/mach-shmobile/setup-r8a7779.c          | 160 ++++++++++++++++++-
 arch/arm/mach-shmobile/setup-r8a7790.c          |  68 +-------
 arch/arm/mach-shmobile/setup-r8a7791.c          |  35 ++++
 arch/arm/mach-shmobile/setup-rcar-gen2.c        |  91 +++++++++++
 arch/arm/mach-shmobile/smp-r8a7791.c            |  62 ++++++++
 23 files changed, 929 insertions(+), 78 deletions(-)
 create mode 100644 arch/arm/boot/dts/r7s72100.dtsi
 create mode 100644 arch/arm/mach-shmobile/clock-r7s72100.c
 create mode 100644 arch/arm/mach-shmobile/include/mach/r7s72100.h
 create mode 100644 arch/arm/mach-shmobile/include/mach/rcar-gen2.h
 create mode 100644 arch/arm/mach-shmobile/setup-r7s72100.c
 create mode 100644 arch/arm/mach-shmobile/setup-rcar-gen2.c
 create mode 100644 arch/arm/mach-shmobile/smp-r8a7791.c
#1 lore raw

PATCH 1/14 ARM: shmobile: r8a73a4: add a DMAC platform device and clock for it

From: Guennadi Liakhovetski <[email protected]>

Add a DMAC platform device and clock definitions for it on r8a73a4.

---
 arch/arm/mach-shmobile/clock-r8a73a4.c        |  4 +-
 arch/arm/mach-shmobile/include/mach/r8a73a4.h |  9 +++
 arch/arm/mach-shmobile/setup-r8a73a4.c        | 91 +++++++++++++++++++++++++++
 3 files changed, 103 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/clock-r8a73a4.c +3 -1
index 8ea5ef6..357b9bc 100644
@@ -504,7 +504,7 @@ static struct clk div6_clks[DIV6_NR] = {
 
 /* MSTP */
 enum {
-	MSTP217, MSTP216, MSTP207, MSTP206, MSTP204, MSTP203,
+	MSTP218, MSTP217, MSTP216, MSTP207, MSTP206, MSTP204, MSTP203,
 	MSTP329, MSTP323, MSTP318, MSTP317, MSTP316,
 	MSTP315, MSTP314, MSTP313, MSTP312, MSTP305, MSTP300,
 	MSTP411, MSTP410, MSTP409,
@@ -519,6 +519,7 @@ static struct clk mstp_clks[MSTP_NR] = {
 	[MSTP207] = SH_CLK_MSTP32(&div6_clks[DIV6_MP],	SMSTPCR2, 7, 0), /* SCIFB1 */
 	[MSTP216] = SH_CLK_MSTP32(&div6_clks[DIV6_MP],	SMSTPCR2, 16, 0), /* SCIFB2 */
 	[MSTP217] = SH_CLK_MSTP32(&div6_clks[DIV6_MP],	SMSTPCR2, 17, 0), /* SCIFB3 */
+	[MSTP218] = SH_CLK_MSTP32(&div4_clks[DIV4_HP],	SMSTPCR2, 18, 0), /* DMAC */
 	[MSTP300] = SH_CLK_MSTP32(&div4_clks[DIV4_HP],	SMSTPCR3, 0, 0), /* IIC2 */
 	[MSTP305] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC1],SMSTPCR3, 5, 0), /* MMCIF1 */
 	[MSTP312] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI2],SMSTPCR3, 12, 0), /* SDHI2 */
@@ -578,6 +579,7 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP207]),
 	CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]),
 	CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP217]),
+	CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]),
 	CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
 	CLKDEV_DEV_ID("e6520000.i2c", &mstp_clks[MSTP300]),
 	CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]),
arch/arm/mach-shmobile/include/mach/r8a73a4.h +9 -0
index 5214338..ce8bdd1 100644
@@ -1,6 +1,15 @@
 #ifndef __ASM_R8A73A4_H__
 #define __ASM_R8A73A4_H__
 
+/* DMA slave IDs */
+enum {
+	SHDMA_SLAVE_INVALID,
+	SHDMA_SLAVE_MMCIF0_TX,
+	SHDMA_SLAVE_MMCIF0_RX,
+	SHDMA_SLAVE_MMCIF1_TX,
+	SHDMA_SLAVE_MMCIF1_RX,
+};
+
 void r8a73a4_add_standard_devices(void);
 void r8a73a4_add_dt_devices(void);
 void r8a73a4_clock_init(void);
arch/arm/mach-shmobile/setup-r8a73a4.c +91 -0

111 lines not on this page · raw message

Signature · 1 line
1.8.4
#2 lore raw

PATCH 2/14 ARM: shmobile: r8a7778: add HPB-DMAC support

In reply to Simon Horman

From: Max Filippov <[email protected]>

Add HPB-DMAC platform device on R8A7778 SoC along with its slave and channel configurations (only for SDHI0 so far).

[Sergei: moved *enum* declaring HPB-DMAC slave IDs from now removed <mach/dma.h> to <mach/r8a7778.h>, removed #include <mach/dma.h> from setup-r8a7778.c, removed SSI-related *enum* values and SSI-related data from hpb_dmae_slaves[] and hpb_dmae_channels[], moved the comments after the element initializers of hpb_dmae_channels[].]

---
 arch/arm/mach-shmobile/include/mach/r8a7778.h |  8 +++
 arch/arm/mach-shmobile/setup-r8a7778.c        | 85 +++++++++++++++++++++++++++
 2 files changed, 93 insertions(+)
arch/arm/mach-shmobile/include/mach/r8a7778.h +8 -0
index ea1dca6..1d6fe97 100644
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2013  Renesas Solutions Corp.
  * Copyright (C) 2013  Kuninori Morimoto <[email protected]>
+ * Copyright (C) 2013  Cogent Embedded, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -21,6 +22,13 @@
 #include <linux/sh_eth.h>
 #include <linux/platform_data/camera-rcar.h>
 
+/* HPB-DMA slave IDs */
+enum {
+	HPBDMA_SLAVE_DUMMY,
+	HPBDMA_SLAVE_SDHI0_TX,
+	HPBDMA_SLAVE_SDHI0_RX,
+};
+
 extern void r8a7778_add_standard_devices(void);
 extern void r8a7778_add_standard_devices_dt(void);
 extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata);
arch/arm/mach-shmobile/setup-r8a7778.c +85 -0

103 lines not on this page · raw message

Signature · 1 line
1.8.4
#3 lore raw

PATCH 3/14 ARM: shmobile: r8a7779: add HPB-DMAC support

In reply to Simon Horman

From: Max Filippov <[email protected]>

Add HPB-DMAC platform device on R8A7779 SoC along with its slave and channel configurations (only for SDHI0 so far).

[Sergei: moved *enum* declaring HPB-DMAC slave IDs from now removed <mach/dma.h> to <mach/r8a7779.h>, removed #include <mach/dma.h> from setup-r8a7779.c, removed SSI-related *enum* values and SSI-related data from hpb_dmae_slaves[] and hpb_dmae_channels[], added ASYNCMDR.ASBTMD{20|24|43} and ASYNCMDR.ASMD{20|24|43} fields/values, fixed comments to ASYNCMDR.ASBTMD2[123] and ASYNCMDR.ASMD2[123] fields/values, renamed all the bit/field/value #define's to include 'HBP_DMAE_' prefix to match the driver, moved comments after the element initializers of hpb_dmae_channels[].]

---
 arch/arm/mach-shmobile/include/mach/r8a7779.h |   7 ++
 arch/arm/mach-shmobile/setup-r8a7779.c        | 154 ++++++++++++++++++++++++++
 2 files changed, 161 insertions(+)
arch/arm/mach-shmobile/include/mach/r8a7779.h +7 -0
index 11c7400..31e87b9 100644
@@ -6,6 +6,13 @@
 #include <linux/sh_eth.h>
 #include <linux/platform_data/camera-rcar.h>
 
+/* HPB-DMA slave IDs */
+enum {
+	HPBDMA_SLAVE_DUMMY,
+	HPBDMA_SLAVE_SDHI0_TX,
+	HPBDMA_SLAVE_SDHI0_RX,
+};
+
 struct platform_device;
 
 struct r8a7779_pm_ch {
arch/arm/mach-shmobile/setup-r8a7779.c +154 -0

172 lines not on this page · raw message

Signature · 1 line
1.8.4
#4 lore raw

PATCH 3/14 ARM: shmobile: r8a7779: add HPB-DMAC support

Hello.

Quoted 14 lines · Simon Horman

From: Max Filippov <[email protected]>

Add HPB-DMAC platform device on R8A7779 SoC along with its slave and channel configurations (only for SDHI0 so far).

[Sergei: moved *enum* declaring HPB-DMAC slave IDs from now removed <mach/dma.h> to <mach/r8a7779.h>, removed #include <mach/dma.h> from setup-r8a7779.c, removed SSI-related *enum* values and SSI-related data from hpb_dmae_slaves[] and hpb_dmae_channels[], added ASYNCMDR.ASBTMD{20|24|43} and ASYNCMDR.ASMD{20|24|43} fields/values, fixed comments to ASYNCMDR.ASBTMD2[123] and ASYNCMDR.ASMD2[123] fields/values, renamed all the bit/field/value #define's to include 'HBP_DMAE_' prefix to match the driver, moved comments after the element initializers of hpb_dmae_channels[].]

Quoted 6 lines
---
  arch/arm/mach-shmobile/include/mach/r8a7779.h |   7 ++
  arch/arm/mach-shmobile/setup-r8a7779.c        | 154 ++++++++++++++++++++++++++
  2 files changed, 161 insertions(+)

Hm, Simon, do you know how this patch and the next one ended up being
merged twice into Linus' tree?

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?idb6b5a0e55bfcfb0852b7d0f9442841ff807345
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id38c4991ed350abd7c5b3cb807fe022cb712a8ba

WBR, Sergei

#5 lore raw

PATCH 3/14 ARM: shmobile: r8a7779: add HPB-DMAC support

Quoted 25 lines · Sergei Shtylyov
Quoted 17 lines

From: Max Filippov <[email protected]>

Add HPB-DMAC platform device on R8A7779 SoC along with its slave and channel configurations (only for SDHI0 so far).

[Sergei: moved *enum* declaring HPB-DMAC slave IDs from now removed <mach/dma.h>
to <mach/r8a7779.h>, removed #include <mach/dma.h> from setup-r8a7779.c, removed
SSI-related *enum* values and SSI-related data from hpb_dmae_slaves[] and hpb_dmae_channels[], added ASYNCMDR.ASBTMD{20|24|43} and ASYNCMDR.ASMD{20|24|43}
fields/values, fixed comments to ASYNCMDR.ASBTMD2[123] and ASYNCMDR.ASMD2[123] fields/values, renamed all the bit/field/value #define's to include 'HBP_DMAE_' prefix to match the driver, moved comments after the element initializers of hpb_dmae_channels[].]

Quoted 7 lines
---
  arch/arm/mach-shmobile/include/mach/r8a7779.h |   7 ++
  arch/arm/mach-shmobile/setup-r8a7779.c        | 154
++++++++++++++++++++++++++
  2 files changed, 161 insertions(+)
Quoted 2 lines

Hm, Simon, do you know how this patch and the next one ended up being
merged twice into Linus' tree?

Sorry, I followed up to the wrong patch. So, the question was about this
patch and the previous one.

Quoted 2 lines

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?idb6b5a0e55bfcfb0852b7d0f9442841ff807345
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id38c4991ed350abd7c5b3cb807fe022cb712a8ba

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id¤3e5bd76a4a3df58167d85e8020a1c9e566ad75
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?idD1f750236f3d3d435a1e89ad885ec896832b9c6

WBR, Sergei

#6 lore raw

PATCH 3/14 ARM: shmobile: r8a7779: add HPB-DMAC support

Quoted 30 lines · Sergei Shtylyov
Quoted 25 lines · Sergei Shtylyov
Quoted 17 lines

From: Max Filippov <[email protected]>

Add HPB-DMAC platform device on R8A7779 SoC along with its slave and channel configurations (only for SDHI0 so far).

[Sergei: moved *enum* declaring HPB-DMAC slave IDs from now removed <mach/dma.h>
to <mach/r8a7779.h>, removed #include <mach/dma.h> from setup-r8a7779.c, removed
SSI-related *enum* values and SSI-related data from hpb_dmae_slaves[] and hpb_dmae_channels[], added ASYNCMDR.ASBTMD{20|24|43} and ASYNCMDR.ASMD{20|24|43}
fields/values, fixed comments to ASYNCMDR.ASBTMD2[123] and ASYNCMDR.ASMD2[123] fields/values, renamed all the bit/field/value #define's to include 'HBP_DMAE_' prefix to match the driver, moved comments after the element initializers of hpb_dmae_channels[].]

Quoted 7 lines
---
 arch/arm/mach-shmobile/include/mach/r8a7779.h |   7 ++
 arch/arm/mach-shmobile/setup-r8a7779.c        | 154
++++++++++++++++++++++++++
 2 files changed, 161 insertions(+)
Quoted 2 lines

Hm, Simon, do you know how this patch and the next one ended up being
merged twice into Linus' tree?

Quoted 8 lines

Sorry, I followed up to the wrong patch. So, the question was
about this patch and the previous one.

Quoted 2 lines

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1eb6b5a0e55bfcfb0852b7d0f9442841ff807345
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=338c4991ed350abd7c5b3cb807fe022cb712a8ba

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a43e5bd76a4a3df58167d85e8020a1c9e566ad75
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=441f750236f3d3d435a1e89ad885ec896832b9c6

I assume that the reference to above git IDs implies that the answer to your question is yes.

#7 lore raw

PATCH 3/14 ARM: shmobile: r8a7779: add HPB-DMAC support

Hello.

Quoted 31 lines · Simon Horman
Quoted 30 lines
Quoted 25 lines
Quoted 17 lines

From: Max Filippov <[email protected]>

Add HPB-DMAC platform device on R8A7779 SoC along with its slave and channel configurations (only for SDHI0 so far).

[Sergei: moved *enum* declaring HPB-DMAC slave IDs from now removed <mach/dma.h>
to <mach/r8a7779.h>, removed #include <mach/dma.h> from setup-r8a7779.c, removed
SSI-related *enum* values and SSI-related data from hpb_dmae_slaves[] and hpb_dmae_channels[], added ASYNCMDR.ASBTMD{20|24|43} and ASYNCMDR.ASMD{20|24|43}
fields/values, fixed comments to ASYNCMDR.ASBTMD2[123] and ASYNCMDR.ASMD2[123] fields/values, renamed all the bit/field/value #define's to include 'HBP_DMAE_' prefix to match the driver, moved comments after the element initializers of hpb_dmae_channels[].]

Quoted 7 lines
---
  arch/arm/mach-shmobile/include/mach/r8a7779.h |   7 ++
  arch/arm/mach-shmobile/setup-r8a7779.c        | 154
++++++++++++++++++++++++++
  2 files changed, 161 insertions(+)
Quoted 2 lines

Hm, Simon, do you know how this patch and the next one ended up being
merged twice into Linus' tree?

Sorry, I followed up to the wrong patch. So, the question was
about this patch and the previous one.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1eb6b5a0e55bfcfb0852b7d0f9442841ff807345
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=338c4991ed350abd7c5b3cb807fe022cb712a8ba

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a43e5bd76a4a3df58167d85e8020a1c9e566ad75
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=441f750236f3d3d435a1e89ad885ec896832b9c6

I assume that the reference to above git IDs implies that the answer to your question is yes.

And answer to the question "how" is? :-)

WBR, Sergei

#8 lore raw

PATCH 3/14 ARM: shmobile: r8a7779: add HPB-DMAC support

Quoted 38 lines · Sergei Shtylyov

Hello.

Quoted 33 lines · Simon Horman
Quoted 33 lines
Quoted 25 lines
Quoted 17 lines

From: Max Filippov <[email protected]>

Add HPB-DMAC platform device on R8A7779 SoC along with its slave and channel configurations (only for SDHI0 so far).

[Sergei: moved *enum* declaring HPB-DMAC slave IDs from now removed <mach/dma.h>
to <mach/r8a7779.h>, removed #include <mach/dma.h> from setup-r8a7779.c, removed
SSI-related *enum* values and SSI-related data from hpb_dmae_slaves[] and hpb_dmae_channels[], added ASYNCMDR.ASBTMD{20|24|43} and ASYNCMDR.ASMD{20|24|43}
fields/values, fixed comments to ASYNCMDR.ASBTMD2[123] and ASYNCMDR.ASMD2[123] fields/values, renamed all the bit/field/value #define's to include 'HBP_DMAE_' prefix to match the driver, moved comments after the element initializers of hpb_dmae_channels[].]

Quoted 7 lines
---
 arch/arm/mach-shmobile/include/mach/r8a7779.h |   7 ++
 arch/arm/mach-shmobile/setup-r8a7779.c        | 154
++++++++++++++++++++++++++
 2 files changed, 161 insertions(+)
Quoted 2 lines

Hm, Simon, do you know how this patch and the next one ended up being
merged twice into Linus' tree?

Sorry, I followed up to the wrong patch. So, the question was
about this patch and the previous one.

Quoted 2 lines

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1eb6b5a0e55bfcfb0852b7d0f9442841ff807345
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=338c4991ed350abd7c5b3cb807fe022cb712a8ba

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a43e5bd76a4a3df58167d85e8020a1c9e566ad75
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=441f750236f3d3d435a1e89ad885ec896832b9c6

I assume that the reference to above git IDs implies that the answer to your question is yes.

And answer to the question "how" is? :-)

Due to a rebasing error on my part two versions of a branch containing these patches and several others were merged. I checked and it looks like the code-changes made by both versions of the branch are the same. So at this stage I think the only problem is that this causes some confusion as there are duplicates of some patches in git, permanently.

#9 lore raw

PATCH 4/14 ARM: shmobile: r8a7790: add I2C clocks and aliases for the DT mode

In reply to Simon Horman

From: Guennadi Liakhovetski <[email protected]>

This patch adds clock definitions for the 4 I2C interfaces on r8a7790 and clock aliases, suitable for the DT mode.

---
 arch/arm/mach-shmobile/clock-r8a7790.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/mach-shmobile/clock-r8a7790.c +10 -0
index d99b87b..7661e89 100644
@@ -52,6 +52,7 @@
 #define SMSTPCR5 0xe6150144
 #define SMSTPCR7 0xe615014c
 #define SMSTPCR8 0xe6150990
+#define SMSTPCR9 0xe6150994
 
 #define SDCKCR		0xE6150074
 #define SD2CKCR		0xE6150078
@@ -181,6 +182,7 @@ static struct clk div6_clks[DIV6_NR] = {
 
 /* MSTP */
 enum {
+	MSTP931, MSTP930, MSTP929, MSTP928,
 	MSTP813,
 	MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720,
 	MSTP717, MSTP716,
@@ -192,6 +194,10 @@ enum {
 };
 
 static struct clk mstp_clks[MSTP_NR] = {
+	[MSTP931] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 31, 0), /* I2C0 */
+	[MSTP930] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 30, 0), /* I2C1 */
+	[MSTP929] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 29, 0), /* I2C2 */
+	[MSTP928] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 28, 0), /* I2C3 */
 	[MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */
 	[MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */
 	[MSTP725] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 25, 0), /* LVDS1 */
@@ -271,6 +277,10 @@ 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("e6518000.i2c", &mstp_clks[MSTP930]),
+	CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP929]),
+	CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]),
 	CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]),
 	CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
 	CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]),
Signature · 1 line
1.8.4
#10 lore raw

PATCH 5/14 ARM: shmobile: r8a73a4: add a clock alias for the DMAC in DT mode

In reply to Simon Horman

From: Guennadi Liakhovetski <[email protected]>

Devices, initialised from the Device Tree and from platform code usually have different names. This patch adds a clock alias for DMAC on r8a73a4 in DT mode.

---
 arch/arm/mach-shmobile/clock-r8a73a4.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-shmobile/clock-r8a73a4.c +1 -0
index 357b9bc..74841ed 100644
@@ -580,6 +580,7 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]),
 	CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP217]),
 	CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]),
+	CLKDEV_DEV_ID("e6700020.dma-controller", &mstp_clks[MSTP218]),
 	CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
 	CLKDEV_DEV_ID("e6520000.i2c", &mstp_clks[MSTP300]),
 	CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]),
Signature · 1 line
1.8.4
#11 lore raw

PATCH 6/14 ARM: shmobile: Break out R-Car Gen2 setup code

In reply to Simon Horman

From: Magnus Damm <[email protected]>

Move arch timer workaround code and boot mode pin handling from setup-r8a7790.c to setup-rcar-gen2.c.

With this in place the same code can be used on
other R-Car Generation 2 devices such as r8a7791.

[horms+renesas at verge.net.au trivial rebase of board-lager.c
for introduction of lager_add_standard_devices()]

---
 arch/arm/mach-shmobile/Makefile                 |  1 +
 arch/arm/mach-shmobile/board-lager-reference.c  |  2 +-
 arch/arm/mach-shmobile/board-lager.c            |  2 +-
 arch/arm/mach-shmobile/clock-r8a7790.c          |  2 +-
 arch/arm/mach-shmobile/include/mach/r8a7790.h   |  6 +-
 arch/arm/mach-shmobile/include/mach/rcar-gen2.h |  8 +++
 arch/arm/mach-shmobile/setup-r8a7790.c          | 68 +-----------------
 arch/arm/mach-shmobile/setup-rcar-gen2.c        | 91 +++++++++++++++++++++++++
 8 files changed, 106 insertions(+), 74 deletions(-)
 create mode 100644 arch/arm/mach-shmobile/include/mach/rcar-gen2.h
 create mode 100644 arch/arm/mach-shmobile/setup-rcar-gen2.c
arch/arm/mach-shmobile/Makefile +1 -0
index d30ec1a..6b7a02e 100644
@@ -15,6 +15,7 @@ obj-$(CONFIG_ARCH_R8A7740)	+= setup-r8a7740.o
 obj-$(CONFIG_ARCH_R8A7778)	+= setup-r8a7778.o
 obj-$(CONFIG_ARCH_R8A7779)	+= setup-r8a7779.o
 obj-$(CONFIG_ARCH_R8A7790)	+= setup-r8a7790.o
+obj-$(CONFIG_ARCH_R8A7790)	+= setup-r8a7790.o setup-rcar-gen2.o
 obj-$(CONFIG_ARCH_R8A7791)	+= setup-r8a7791.o
 obj-$(CONFIG_ARCH_EMEV2)	+= setup-emev2.o
 
arch/arm/mach-shmobile/board-lager-reference.c +1 -1
index d39a91b..1a1a4a8 100644
@@ -40,7 +40,7 @@ static const char *lager_boards_compat_dt[] __initdata = {
 DT_MACHINE_START(LAGER_DT, "lager")
 	.smp		= smp_ops(r8a7790_smp_ops),
 	.init_early	= r8a7790_init_early,
+	.init_time	= rcar_gen2_timer_init,
 	.init_machine	= lager_add_standard_devices,
-	.init_time	= r8a7790_timer_init,
 	.dt_compat	= lager_boards_compat_dt,
 MACHINE_END
arch/arm/mach-shmobile/board-lager.c +1 -1
index 6d1026e..4e040e4 100644
@@ -188,7 +188,7 @@ static const char *lager_boards_compat_dt[] __initdata = {
 DT_MACHINE_START(LAGER_DT, "lager")
 	.smp		= smp_ops(r8a7790_smp_ops),
 	.init_early	= r8a7790_init_early,
-	.init_time	= r8a7790_timer_init,
+	.init_time	= rcar_gen2_timer_init,
 	.init_machine	= lager_init,
 	.dt_compat	= lager_boards_compat_dt,
 MACHINE_END
arch/arm/mach-shmobile/clock-r8a7790.c +1 -1
index 7661e89..a64f965 100644
@@ -310,7 +310,7 @@ static struct clk_lookup lookups[] = {
 
 void __init r8a7790_clock_init(void)
 {
-	u32 mode = r8a7790_read_mode_pins();
+	u32 mode = rcar_gen2_read_mode_pins();
 	int k, ret = 0;
 
 	switch (mode & (MD(14) | MD(13))) {
arch/arm/mach-shmobile/include/mach/r8a7790.h +2 -4
index 79e731c..5fbfa28 100644
@@ -1,15 +1,13 @@
 #ifndef __ASM_R8A7790_H__
 #define __ASM_R8A7790_H__
 
+#include <mach/rcar-gen2.h>
+
 void r8a7790_add_standard_devices(void);
 void r8a7790_add_dt_devices(void);
 void r8a7790_clock_init(void);
 void r8a7790_pinmux_init(void);
 void r8a7790_init_early(void);
-void r8a7790_timer_init(void);
 extern struct smp_operations r8a7790_smp_ops;
 
-#define MD(nr) BIT(nr)
-u32 r8a7790_read_mode_pins(void);
-
 #endif /* __ASM_R8A7790_H__ */
arch/arm/mach-shmobile/include/mach/rcar-gen2.h new file +8 -0
new file mode 100644
index 0000000..43f606e
@@ -0,0 +1,8 @@
+#ifndef __ASM_RCAR_GEN2_H__
+#define __ASM_RCAR_GEN2_H__
+
+void rcar_gen2_timer_init(void);
+#define MD(nr) BIT(nr)
+u32 rcar_gen2_read_mode_pins(void);
+
+#endif /* __ASM_RCAR_GEN2_H__ */
arch/arm/mach-shmobile/setup-r8a7790.c +1 -67

86 lines not on this page · raw message

arch/arm/mach-shmobile/setup-rcar-gen2.c new file +91 -0

91 lines not on this page · raw message

Signature · 1 line
1.8.4
#12 lore raw

PATCH 7/14 ARM: shmobile: Introduce r8a7791_add_standard_devices()

In reply to Simon Horman

From: Magnus Damm <[email protected]>

Introduce the function r8a7791_add_standard_devices() that follows the same style as other mach-shmobile SoC code and allows C version of board code to add on-chip devices.

---
 arch/arm/mach-shmobile/include/mach/r8a7791.h | 1 +
 arch/arm/mach-shmobile/setup-r8a7791.c        | 5 +++++
 2 files changed, 6 insertions(+)
arch/arm/mach-shmobile/include/mach/r8a7791.h +1 -0
index 2e6d661..2a86a53 100644
@@ -1,6 +1,7 @@
 #ifndef __ASM_R8A7791_H__
 #define __ASM_R8A7791_H__
 
+void r8a7791_add_standard_devices(void);
 void r8a7791_add_dt_devices(void);
 void r8a7791_clock_init(void);
 void r8a7791_init_early(void);
arch/arm/mach-shmobile/setup-r8a7791.c +5 -0
index b56399d..350dfc4 100644
@@ -129,6 +129,11 @@ void __init r8a7791_add_dt_devices(void)
 	r8a7791_register_cmt(00);
 }
 
+void __init r8a7791_add_standard_devices(void)
+{
+	r8a7791_add_dt_devices();
+}
+
 void __init r8a7791_init_early(void)
 {
 #ifndef CONFIG_ARM_ARCH_TIMER
Signature · 1 line
1.8.4
#13 lore raw

PATCH 8/14 ARM: shmobile: r8a7791 IRQC platform device support

In reply to Simon Horman

From: Magnus Damm <[email protected]>

Add a platform device for the r8a7791 IRQC hardware driving IRQ pins IRQ0 to IRQ9. The Linux interrupt number is statically assigned to allow board code written in C to make use of static interrupt numbers.

---
 arch/arm/mach-shmobile/setup-r8a7791.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
arch/arm/mach-shmobile/setup-r8a7791.c +27 -0
index 350dfc4..ba4fa3e 100644
@@ -22,6 +22,7 @@
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/of_platform.h>
+#include <linux/platform_data/irq-renesas-irqc.h>
 #include <linux/serial_sci.h>
 #include <linux/sh_timer.h>
 #include <mach/common.h>
@@ -109,6 +110,31 @@ static const struct resource cmt00_resources[] __initconst = {
 					  &cmt##idx##_platform_data,	\
 					  sizeof(struct sh_timer_config))
 
+static struct renesas_irqc_config irqc0_data = {
+	.irq_base = irq_pin(0), /* IRQ0 -> IRQ9 */
+};
+
+static struct resource irqc0_resources[] = {
+	DEFINE_RES_MEM(0xe61c0000, 0x200), /* IRQC Event Detector Block_0 */
+	DEFINE_RES_IRQ(gic_spi(0)), /* IRQ0 */
+	DEFINE_RES_IRQ(gic_spi(1)), /* IRQ1 */
+	DEFINE_RES_IRQ(gic_spi(2)), /* IRQ2 */
+	DEFINE_RES_IRQ(gic_spi(3)), /* IRQ3 */
+	DEFINE_RES_IRQ(gic_spi(12)), /* IRQ4 */
+	DEFINE_RES_IRQ(gic_spi(13)), /* IRQ5 */
+	DEFINE_RES_IRQ(gic_spi(14)), /* IRQ6 */
+	DEFINE_RES_IRQ(gic_spi(15)), /* IRQ7 */
+	DEFINE_RES_IRQ(gic_spi(16)), /* IRQ8 */
+	DEFINE_RES_IRQ(gic_spi(17)), /* IRQ9 */
+};
+
+#define r8a7791_register_irqc(idx)					\
+	platform_device_register_resndata(&platform_bus, "renesas_irqc", \
+					  idx, irqc##idx##_resources,	\
+					  ARRAY_SIZE(irqc##idx##_resources), \
+					  &irqc##idx##_data,		\
+					  sizeof(struct renesas_irqc_config))
+
 void __init r8a7791_add_dt_devices(void)
 {
 	r8a7791_register_scif(SCIFA0);
@@ -132,6 +158,7 @@ void __init r8a7791_add_dt_devices(void)
 void __init r8a7791_add_standard_devices(void)
 {
 	r8a7791_add_dt_devices();
+	r8a7791_register_irqc(0);
 }
 
 void __init r8a7791_init_early(void)
Signature · 1 line
1.8.4
#14 lore raw

PATCH 9/14 ARM: shmobile: r8a7791 Arch timer workaround

In reply to Simon Horman

From: Magnus Damm <[email protected]>

Make use of the R-Car Gen2 arch timer workaround on r8a7791.

---
 arch/arm/mach-shmobile/Makefile        | 2 +-
 arch/arm/mach-shmobile/setup-r8a7791.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/Makefile +1 -1
index 6b7a02e..3c37e82 100644
@@ -16,7 +16,7 @@ obj-$(CONFIG_ARCH_R8A7778)	+= setup-r8a7778.o
 obj-$(CONFIG_ARCH_R8A7779)	+= setup-r8a7779.o
 obj-$(CONFIG_ARCH_R8A7790)	+= setup-r8a7790.o
 obj-$(CONFIG_ARCH_R8A7790)	+= setup-r8a7790.o setup-rcar-gen2.o
-obj-$(CONFIG_ARCH_R8A7791)	+= setup-r8a7791.o
+obj-$(CONFIG_ARCH_R8A7791)	+= setup-r8a7791.o setup-rcar-gen2.o
 obj-$(CONFIG_ARCH_EMEV2)	+= setup-emev2.o
 
 # Clock objects
arch/arm/mach-shmobile/setup-r8a7791.c +2 -0
index ba4fa3e..cb3859b 100644
@@ -28,6 +28,7 @@
 #include <mach/common.h>
 #include <mach/irqs.h>
 #include <mach/r8a7791.h>
+#include <mach/rcar-gen2.h>
 #include <asm/mach/arch.h>
 
 #define SCIF_COMMON(scif_type, baseaddr, irq)			\
@@ -176,6 +177,7 @@ static const char *r8a7791_boards_compat_dt[] __initdata = {
 
 DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)")
 	.init_early	= r8a7791_init_early,
+	.init_time	= rcar_gen2_timer_init,
 	.dt_compat	= r8a7791_boards_compat_dt,
 MACHINE_END
 #endif /* CONFIG_USE_OF */
Signature · 1 line
1.8.4
#15 lore raw

PATCH 10/14 ARM: shmobile: Initial r7s72100 SoC support

In reply to Simon Horman

From: Magnus Damm <[email protected]>

Add initial support for the r7272100 SoC including:
- Single Cortex-A9 CPU Core
- GIC

No static virtual mappings are used, all the components make use of ioremap(). DT_MACHINE_START is still wrapped in CONFIG_USE_OF to match other mach-shmobile code.

---
 arch/arm/boot/dts/r7s72100.dtsi                |  36 +++++
 arch/arm/mach-shmobile/Kconfig                 |   6 +
 arch/arm/mach-shmobile/Makefile                |   2 +
 arch/arm/mach-shmobile/clock-r7s72100.c        | 194 +++++++++++++++++++++++++
 arch/arm/mach-shmobile/include/mach/r7s72100.h |   7 +
 arch/arm/mach-shmobile/setup-r7s72100.c        |  43 ++++++
 6 files changed, 288 insertions(+)
 create mode 100644 arch/arm/boot/dts/r7s72100.dtsi
 create mode 100644 arch/arm/mach-shmobile/clock-r7s72100.c
 create mode 100644 arch/arm/mach-shmobile/include/mach/r7s72100.h
 create mode 100644 arch/arm/mach-shmobile/setup-r7s72100.c
arch/arm/boot/dts/r7s72100.dtsi new file +36 -0
new file mode 100644
index 0000000..46b82aa
@@ -0,0 +1,36 @@
+/*
+ * Device Tree Source for the r7s72100 SoC
+ *
+ * Copyright (C) 2013 Renesas Solutions Corp.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/ {
+	compatible = "renesas,r7s72100";
+	interrupt-parent = <&gic>;
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu at 0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a9";
+			reg = <0>;
+		};
+	};
+
+	gic: interrupt-controller at e8201000 {
+		compatible = "arm,cortex-a9-gic";
+		#interrupt-cells = <3>;
+		#address-cells = <0>;
+		interrupt-controller;
+		reg = <0xe8201000 0x1000>,
+			<0xe8202000 0x1000>;
+	};
+};
arch/arm/mach-shmobile/Kconfig +6 -0
index b452405..5dd5f9f 100644
@@ -113,6 +113,12 @@ config ARCH_EMEV2
 	select ARM_GIC
 	select CPU_V7
 
+config ARCH_R7S72100
+	bool "RZ/A1H (R7S72100)"
+	select ARM_GIC
+	select CPU_V7
+	select SH_CLK_CPG
+
 comment "SH-Mobile Board Type"
 
 config MACH_APE6EVM
arch/arm/mach-shmobile/Makefile +2 -0
index 3c37e82..95e48d1 100644
@@ -18,6 +18,7 @@ obj-$(CONFIG_ARCH_R8A7790)	+= setup-r8a7790.o
 obj-$(CONFIG_ARCH_R8A7790)	+= setup-r8a7790.o setup-rcar-gen2.o
 obj-$(CONFIG_ARCH_R8A7791)	+= setup-r8a7791.o setup-rcar-gen2.o
 obj-$(CONFIG_ARCH_EMEV2)	+= setup-emev2.o
+obj-$(CONFIG_ARCH_R7S72100)	+= setup-r7s72100.o
 
 # Clock objects
 ifndef CONFIG_COMMON_CLK
@@ -31,6 +32,7 @@ obj-$(CONFIG_ARCH_R8A7779)	+= clock-r8a7779.o
 obj-$(CONFIG_ARCH_R8A7790)	+= clock-r8a7790.o
 obj-$(CONFIG_ARCH_R8A7791)	+= clock-r8a7791.o
 obj-$(CONFIG_ARCH_EMEV2)	+= clock-emev2.o
+obj-$(CONFIG_ARCH_R7S72100)	+= clock-r7s72100.o
 endif
 
 # SMP objects
arch/arm/mach-shmobile/clock-r7s72100.c new file +194 -0

194 lines not on this page · raw message

arch/arm/mach-shmobile/include/mach/r7s72100.h new file +7 -0
new file mode 100644
index 0000000..f78062e
@@ -0,0 +1,7 @@
+#ifndef __ASM_R7S72100_H__
+#define __ASM_R7S72100_H__
+
+void r7s72100_clock_init(void);
+void r7s72100_init_early(void);
+
+#endif /* __ASM_R7S72100_H__ */
arch/arm/mach-shmobile/setup-r7s72100.c new file +43 -0

43 lines not on this page · raw message

Signature · 1 line
1.8.4
#16 lore raw

PATCH 11/14 ARM: shmobile: r7s72100 SCIF support

In reply to Simon Horman

From: Magnus Damm <[email protected]>

Add SCIF serial port support to the r7s72100 SoC by adding platform devices for SCIF0 -> SCIF7 together with clock bindings. DT device description is excluded at this point since such bindings are still under development.

---
 arch/arm/mach-shmobile/clock-r7s72100.c        |  8 +++++
 arch/arm/mach-shmobile/include/mach/r7s72100.h |  1 +
 arch/arm/mach-shmobile/setup-r7s72100.c        | 45 ++++++++++++++++++++++++++
 3 files changed, 54 insertions(+)
arch/arm/mach-shmobile/clock-r7s72100.c +8 -0
index 1e71094..4aba20c 100644
@@ -170,6 +170,14 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]),
 
 	/* MSTP clocks */
+	CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP47]),
+	CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[MSTP46]),
+	CLKDEV_ICK_ID("sci_fck", "sh-sci.2", &mstp_clks[MSTP45]),
+	CLKDEV_ICK_ID("sci_fck", "sh-sci.3", &mstp_clks[MSTP44]),
+	CLKDEV_ICK_ID("sci_fck", "sh-sci.4", &mstp_clks[MSTP43]),
+	CLKDEV_ICK_ID("sci_fck", "sh-sci.5", &mstp_clks[MSTP42]),
+	CLKDEV_ICK_ID("sci_fck", "sh-sci.6", &mstp_clks[MSTP41]),
+	CLKDEV_ICK_ID("sci_fck", "sh-sci.7", &mstp_clks[MSTP40]),
 };
 
 void __init r7s72100_clock_init(void)
arch/arm/mach-shmobile/include/mach/r7s72100.h +1 -0
index f78062e..5f34b20 100644
@@ -1,6 +1,7 @@
 #ifndef __ASM_R7S72100_H__
 #define __ASM_R7S72100_H__
 
+void r7s72100_add_dt_devices(void);
 void r7s72100_clock_init(void);
 void r7s72100_init_early(void);
 
arch/arm/mach-shmobile/setup-r7s72100.c +45 -0

55 lines not on this page · raw message

Signature · 1 line
1.8.4
#17 lore raw

PATCH 12/14 ARM: shmobile: r8a7778: split r8a7778_init_irq_extpin() for DT

In reply to Simon Horman

From: Kuninori Morimoto <[email protected]>

r8a7778 INTC needs IRL pin mode settings to determine behavior of IRQ0 - IRQ3, and r8a7778_init_irq_extpin() is controlling it via irlm parameter.
But this function registers renesas_intc_irqpin driver if irlm was set, and this value depends on platform. This is not good for DT.
This patch splits r8a7778_init_irq_extpin() function into "mode settings" and "funtion register" parts.

---
 arch/arm/mach-shmobile/include/mach/r8a7778.h | 1 +
 arch/arm/mach-shmobile/setup-r8a7778.c        | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/include/mach/r8a7778.h +1 -0
index 1d6fe97..dbe221a 100644
@@ -41,6 +41,7 @@ extern void r8a7778_init_delay(void);
 extern void r8a7778_init_irq_dt(void);
 extern void r8a7778_clock_init(void);
 extern void r8a7778_init_irq_extpin(int irlm);
+extern void r8a7778_init_irq_extpin_dt(int irlm);
 extern void r8a7778_pinmux_init(void);
 
 extern int r8a7778_usb_phy_power(bool enable);
arch/arm/mach-shmobile/setup-r8a7778.c +5 -1
index fa1b7e4..16d49aa 100644
@@ -476,7 +476,7 @@ static struct resource irqpin_resources[] __initdata = {
 	DEFINE_RES_IRQ(gic_iid(0x3e)), /* IRQ3 */
 };
 
-void __init r8a7778_init_irq_extpin(int irlm)
+void __init r8a7778_init_irq_extpin_dt(int irlm)
 {
 	void __iomem *icr0 = ioremap_nocache(0xfe780000, PAGE_SIZE);
 	unsigned long tmp;
@@ -494,7 +494,11 @@ void __init r8a7778_init_irq_extpin(int irlm)
 	tmp |= (1 << 21); /* LVLMODE = 1 */
 	iowrite32(tmp, icr0);
 	iounmap(icr0);
+}
 
+void __init r8a7778_init_irq_extpin(int irlm)
+{
+	r8a7778_init_irq_extpin_dt(irlm);
 	if (irlm)
 		platform_device_register_resndata(
 			&platform_bus, "renesas_intc_irqpin", -1,
Signature · 1 line
1.8.4
#18 lore raw

PATCH 13/14 ARM: shmobile: r8a7779: split r8a7779_init_irq_extpin() for DT

In reply to Simon Horman

From: Kuninori Morimoto <[email protected]>

r8a7779 INTC needs IRL pin mode settings to determine behavior of IRQ0 - IRQ3, and r8a7779_init_irq_extpin() is controlling it via irlm parameter.
But this function registers renesas_intc_irqpin driver if irlm was set, and this value depends on platform. This is not good for DT.
This patch splits r8a7779_init_irq_extpin() function into "mode settings" and "funtion register" parts

---
 arch/arm/mach-shmobile/include/mach/r8a7779.h | 1 +
 arch/arm/mach-shmobile/setup-r8a7779.c        | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/include/mach/r8a7779.h +1 -0
index 31e87b9..17af34e 100644
@@ -33,6 +33,7 @@ static inline struct r8a7779_pm_ch *to_r8a7779_ch(struct generic_pm_domain *d)
 
 extern void r8a7779_init_delay(void);
 extern void r8a7779_init_irq_extpin(int irlm);
+extern void r8a7779_init_irq_extpin_dt(int irlm);
 extern void r8a7779_init_irq_dt(void);
 extern void r8a7779_map_io(void);
 extern void r8a7779_earlytimer_init(void);
arch/arm/mach-shmobile/setup-r8a7779.c +5 -1
index eacb2f7..13049e9 100644
@@ -98,7 +98,7 @@ static struct resource irqpin0_resources[] __initdata = {
 	DEFINE_RES_IRQ(gic_spi(30)), /* IRQ3 */
 };
 
-void __init r8a7779_init_irq_extpin(int irlm)
+void __init r8a7779_init_irq_extpin_dt(int irlm)
 {
 	void __iomem *icr0 = ioremap_nocache(0xfe780000, PAGE_SIZE);
 	u32 tmp;
@@ -116,7 +116,11 @@ void __init r8a7779_init_irq_extpin(int irlm)
 	tmp |= (1 << 21); /* LVLMODE = 1 */
 	iowrite32(tmp, icr0);
 	iounmap(icr0);
+}
 
+void __init r8a7779_init_irq_extpin(int irlm)
+{
+	r8a7779_init_irq_extpin_dt(irlm);
 	if (irlm)
 		platform_device_register_resndata(
 			&platform_bus, "renesas_intc_irqpin", -1,
Signature · 1 line
1.8.4
#19 lore raw

PATCH 14/14 ARM: shmobile: r8a7791 SMP support

In reply to Simon Horman

From: Magnus Damm <[email protected]>

Tie in the APMU SMP code on r8a7791. When used together with the secondary CPU device node and smp_ops in the board specific code then this will allow use of the two Cortex-A15 cores in the r8a7791 SoC.

---
 arch/arm/mach-shmobile/Makefile               |  1 +
 arch/arm/mach-shmobile/include/mach/r8a7791.h |  1 +
 arch/arm/mach-shmobile/setup-r8a7791.c        |  1 +
 arch/arm/mach-shmobile/smp-r8a7791.c          | 62 +++++++++++++++++++++++++++
 4 files changed, 65 insertions(+)
 create mode 100644 arch/arm/mach-shmobile/smp-r8a7791.c
arch/arm/mach-shmobile/Makefile +1 -0
index 95e48d1..f2d40ed 100644
@@ -40,6 +40,7 @@ smp-y				:= platsmp.o headsmp.o
 smp-$(CONFIG_ARCH_SH73A0)	+= smp-sh73a0.o headsmp-scu.o platsmp-scu.o
 smp-$(CONFIG_ARCH_R8A7779)	+= smp-r8a7779.o headsmp-scu.o platsmp-scu.o
 smp-$(CONFIG_ARCH_R8A7790)	+= smp-r8a7790.o platsmp-apmu.o
+smp-$(CONFIG_ARCH_R8A7791)	+= smp-r8a7791.o platsmp-apmu.o
 smp-$(CONFIG_ARCH_EMEV2)	+= smp-emev2.o headsmp-scu.o platsmp-scu.o
 
 # IRQ objects
arch/arm/mach-shmobile/include/mach/r8a7791.h +1 -0
index 2a86a53..051ead3 100644
@@ -5,5 +5,6 @@ void r8a7791_add_standard_devices(void);
 void r8a7791_add_dt_devices(void);
 void r8a7791_clock_init(void);
 void r8a7791_init_early(void);
+extern struct smp_operations r8a7791_smp_ops;
 
 #endif /* __ASM_R8A7791_H__ */
arch/arm/mach-shmobile/setup-r8a7791.c +1 -0
index cb3859b..d9393d6 100644
@@ -176,6 +176,7 @@ static const char *r8a7791_boards_compat_dt[] __initdata = {
 };
 
 DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)")
+	.smp		= smp_ops(r8a7791_smp_ops),
 	.init_early	= r8a7791_init_early,
 	.init_time	= rcar_gen2_timer_init,
 	.dt_compat	= r8a7791_boards_compat_dt,
arch/arm/mach-shmobile/smp-r8a7791.c new file +62 -0

62 lines not on this page · raw message

Signature · 1 line
1.8.4
#20 lore raw
In reply to Simon Horman
Quoted 26 lines · Simon Horman

Hi Olof, Kevin and Arnd,

please consider this second round of Renesas ARM based SoC updates for v3.13.

This pull-request is based on a merge of the following, each of which you have already pulled. The reason for the merge is to eliminate conflicts.
* renesas-soc-for-v3.13
* renesas-smp-for-v3.13
* renesas-fixes4-for-v3.13

The following changes since commit 243b6db0588b1425cb020e764475e8e1c4eb40d9:

Merge tag 'renesas-fixes4-for-v3.12' into soc2-base (2013-10-08 09:44:08 +0900)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc2-for-v3.13

for you to fetch changes up to 687c27b07050c21a62c4c975777c89e698649a6b:

ARM: shmobile: r8a7791 SMP support (2013-10-08 09:53:02 +0900)

----------------------------------------------------------------
Second Round of Renesas ARM based SoC updates for v3.13

Quoted 8 lines

* SMP support for r8a7791 SoC
* r8a7779_init_irq_extpin() for DT for r8a7779 and r8a7778 SoCs
* Add HPB-DMAC to r8a7779 and r8a7778 SoCs
* Add r7s72100 SoC
* Make use of ARCH timer workaround on r8a7791 SoC
* Add IRQC platform device support to r8a7791 SoC
* Add I2C clocks and aliases for the DT mode for r8a7790 SoC
* Add MAC platform device to r8a73a4 SoC

Pulled into next/soc,

Thanks,

Kevin