* [PATCH 01/10] ARM: shmobile: Introduce r8a7791_add_standard_devices()
2013-10-01 8:11 [PATCH 00/10] ARM: shmobile: r8a7791 SoC and Koelsch update V2 Magnus Damm
@ 2013-10-01 8:11 ` Magnus Damm
2013-10-03 2:36 ` Simon Horman
2013-10-01 8:12 ` [PATCH 02/10] ARM: shmobile: Use r8a7791_add_standard_devices() on Koelsch Magnus Damm
` (8 subsequent siblings)
9 siblings, 1 reply; 21+ messages in thread
From: Magnus Damm @ 2013-10-01 8:11 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
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.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/mach-shmobile/include/mach/r8a7791.h | 1 +
arch/arm/mach-shmobile/setup-r8a7791.c | 5 +++++
2 files changed, 6 insertions(+)
--- 0001/arch/arm/mach-shmobile/include/mach/r8a7791.h
+++ work/arch/arm/mach-shmobile/include/mach/r8a7791.h 2013-10-01 16:23:46.000000000 +0900
@@ -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);
--- 0001/arch/arm/mach-shmobile/setup-r8a7791.c
+++ work/arch/arm/mach-shmobile/setup-r8a7791.c 2013-10-01 16:24:35.000000000 +0900
@@ -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
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 01/10] ARM: shmobile: Introduce r8a7791_add_standard_devices()
2013-10-01 8:11 ` [PATCH 01/10] ARM: shmobile: Introduce r8a7791_add_standard_devices() Magnus Damm
@ 2013-10-03 2:36 ` Simon Horman
0 siblings, 0 replies; 21+ messages in thread
From: Simon Horman @ 2013-10-03 2:36 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 01, 2013 at 05:11:53PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
>
> 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.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
Thanks, I have queued this up in the soc3 branch.
It should make it into v3.13 but if not I'll rename the branch
soc after rebasing it on v3.13-rcX which will then be targeted at v3.14.
> ---
>
> arch/arm/mach-shmobile/include/mach/r8a7791.h | 1 +
> arch/arm/mach-shmobile/setup-r8a7791.c | 5 +++++
> 2 files changed, 6 insertions(+)
>
> --- 0001/arch/arm/mach-shmobile/include/mach/r8a7791.h
> +++ work/arch/arm/mach-shmobile/include/mach/r8a7791.h 2013-10-01 16:23:46.000000000 +0900
> @@ -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);
> --- 0001/arch/arm/mach-shmobile/setup-r8a7791.c
> +++ work/arch/arm/mach-shmobile/setup-r8a7791.c 2013-10-01 16:24:35.000000000 +0900
> @@ -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
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 02/10] ARM: shmobile: Use r8a7791_add_standard_devices() on Koelsch
2013-10-01 8:11 [PATCH 00/10] ARM: shmobile: r8a7791 SoC and Koelsch update V2 Magnus Damm
2013-10-01 8:11 ` [PATCH 01/10] ARM: shmobile: Introduce r8a7791_add_standard_devices() Magnus Damm
@ 2013-10-01 8:12 ` Magnus Damm
2013-10-03 4:20 ` Simon Horman
2013-10-01 8:12 ` [PATCH 03/10] ARM: shmobile: r8a7791 IRQC platform device support Magnus Damm
` (7 subsequent siblings)
9 siblings, 1 reply; 21+ messages in thread
From: Magnus Damm @ 2013-10-01 8:12 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
Use r8a7791_add_standard_devices() on Koelsch to let
the C version of the board code add on-chip devices.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/mach-shmobile/board-koelsch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 0001/arch/arm/mach-shmobile/board-koelsch.c
+++ work/arch/arm/mach-shmobile/board-koelsch.c 2013-10-01 16:25:46.000000000 +0900
@@ -29,7 +29,7 @@
static void __init koelsch_add_standard_devices(void)
{
r8a7791_clock_init();
- r8a7791_add_dt_devices();
+ r8a7791_add_standard_devices();
}
static const char * const koelsch_boards_compat_dt[] __initconst = {
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 02/10] ARM: shmobile: Use r8a7791_add_standard_devices() on Koelsch
2013-10-01 8:12 ` [PATCH 02/10] ARM: shmobile: Use r8a7791_add_standard_devices() on Koelsch Magnus Damm
@ 2013-10-03 4:20 ` Simon Horman
0 siblings, 0 replies; 21+ messages in thread
From: Simon Horman @ 2013-10-03 4:20 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 01, 2013 at 05:12:02PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Use r8a7791_add_standard_devices() on Koelsch to let
> the C version of the board code add on-chip devices.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
>
> arch/arm/mach-shmobile/board-koelsch.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- 0001/arch/arm/mach-shmobile/board-koelsch.c
> +++ work/arch/arm/mach-shmobile/board-koelsch.c 2013-10-01 16:25:46.000000000 +0900
> @@ -29,7 +29,7 @@
> static void __init koelsch_add_standard_devices(void)
> {
> r8a7791_clock_init();
> - r8a7791_add_dt_devices();
> + r8a7791_add_standard_devices();
> }
>
> static const char * const koelsch_boards_compat_dt[] __initconst = {
>
Thanks, I have queued this up in the boards3 branch.
It should make it into v3.13 but if not I'll rename the branch
soc after rebasing it on v3.13-rcX which will then be targeted at v3.14.
The boards3 branch includes boards code previously queued up for v3.13
and a merge with soc changes previously queued up for v3.13. The reason
for the merge is to provide various build and run-time dependencies
including the r8a7791 SoC code which this board code uses.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 03/10] ARM: shmobile: r8a7791 IRQC platform device support
2013-10-01 8:11 [PATCH 00/10] ARM: shmobile: r8a7791 SoC and Koelsch update V2 Magnus Damm
2013-10-01 8:11 ` [PATCH 01/10] ARM: shmobile: Introduce r8a7791_add_standard_devices() Magnus Damm
2013-10-01 8:12 ` [PATCH 02/10] ARM: shmobile: Use r8a7791_add_standard_devices() on Koelsch Magnus Damm
@ 2013-10-01 8:12 ` Magnus Damm
2013-10-03 2:37 ` Simon Horman
2013-10-01 8:12 ` [PATCH 04/10] ARM: shmobile: r8a7791 IRQC device tree node Magnus Damm
` (6 subsequent siblings)
9 siblings, 1 reply; 21+ messages in thread
From: Magnus Damm @ 2013-10-01 8:12 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
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.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/mach-shmobile/setup-r8a7791.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
--- 0002/arch/arm/mach-shmobile/setup-r8a7791.c
+++ work/arch/arm/mach-shmobile/setup-r8a7791.c 2013-10-01 16:45:32.000000000 +0900
@@ -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_resou
&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)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 04/10] ARM: shmobile: r8a7791 IRQC device tree node
2013-10-01 8:11 [PATCH 00/10] ARM: shmobile: r8a7791 SoC and Koelsch update V2 Magnus Damm
` (2 preceding siblings ...)
2013-10-01 8:12 ` [PATCH 03/10] ARM: shmobile: r8a7791 IRQC platform device support Magnus Damm
@ 2013-10-01 8:12 ` Magnus Damm
2013-10-03 2:43 ` Simon Horman
2013-10-01 8:12 ` [PATCH 05/10] ARM: shmobile: r8a7791 Arch timer " Magnus Damm
` (5 subsequent siblings)
9 siblings, 1 reply; 21+ messages in thread
From: Magnus Damm @ 2013-10-01 8:12 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
Enable a r8a7791 IRQC block by adding a device tree
node for the IRQC hardware and pins IRQ0 to IRQ9.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/boot/dts/r8a7791.dtsi | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
--- 0001/arch/arm/boot/dts/r8a7791.dtsi
+++ work/arch/arm/boot/dts/r8a7791.dtsi 2013-10-01 16:29:00.000000000 +0900
@@ -38,4 +38,22 @@
<0 0xf1006000 0 0x2000>;
interrupts = <1 9 0xf04>;
};
+
+ irqc0: interrupt-controller@e61c0000 {
+ compatible = "renesas,irqc";
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ reg = <0 0xe61c0000 0 0x200>;
+ interrupt-parent = <&gic>;
+ interrupts = <0 0 4>,
+ <0 1 4>,
+ <0 2 4>,
+ <0 3 4>,
+ <0 12 4>,
+ <0 13 4>,
+ <0 14 4>,
+ <0 15 4>,
+ <0 16 4>,
+ <0 17 4>;
+ };
};
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 04/10] ARM: shmobile: r8a7791 IRQC device tree node
2013-10-01 8:12 ` [PATCH 04/10] ARM: shmobile: r8a7791 IRQC device tree node Magnus Damm
@ 2013-10-03 2:43 ` Simon Horman
0 siblings, 0 replies; 21+ messages in thread
From: Simon Horman @ 2013-10-03 2:43 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 01, 2013 at 05:12:29PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Enable a r8a7791 IRQC block by adding a device tree
> node for the IRQC hardware and pins IRQ0 to IRQ9.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
Thanks, I have queued this up in the dt3 branch.
It should make it into v3.13 but if not I'll rename the branch
dt after rebasing it on v3.13-rcX which will then be targeted at v3.14.
The dt3 branch is a merge of other dt changes queued up for v3.13
with renesas-soc-for-v3.13, which I sent a pull request for a few
days ago. The reason for the merge is to provide the dts for the
r8a7791 SoC which is changed by this patch.
It might have been better to merge the dt for the r8a7791 SoC
in a separate patch in the dt branch. But it wasn't.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 05/10] ARM: shmobile: r8a7791 Arch timer device tree node
2013-10-01 8:11 [PATCH 00/10] ARM: shmobile: r8a7791 SoC and Koelsch update V2 Magnus Damm
` (3 preceding siblings ...)
2013-10-01 8:12 ` [PATCH 04/10] ARM: shmobile: r8a7791 IRQC device tree node Magnus Damm
@ 2013-10-01 8:12 ` Magnus Damm
2013-10-03 2:44 ` Simon Horman
2013-10-01 8:12 ` [PATCH 06/10] ARM: shmobile: r8a7791 Arch timer workaround Magnus Damm
` (4 subsequent siblings)
9 siblings, 1 reply; 21+ messages in thread
From: Magnus Damm @ 2013-10-01 8:12 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
Add r8a7791 arch timer device tree information.
This needs to be used together with r8a7791 support
code that ties in the R-Car Gen2 arch timer workarounds.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/boot/dts/r8a7791.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
--- 0005/arch/arm/boot/dts/r8a7791.dtsi
+++ work/arch/arm/boot/dts/r8a7791.dtsi 2013-10-01 16:30:54.000000000 +0900
@@ -39,6 +39,14 @@
interrupts = <1 9 0xf04>;
};
+ timer {
+ compatible = "arm,armv7-timer";
+ interrupts = <1 13 0xf08>,
+ <1 14 0xf08>,
+ <1 11 0xf08>,
+ <1 10 0xf08>;
+ };
+
irqc0: interrupt-controller@e61c0000 {
compatible = "renesas,irqc";
#interrupt-cells = <2>;
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 05/10] ARM: shmobile: r8a7791 Arch timer device tree node
2013-10-01 8:12 ` [PATCH 05/10] ARM: shmobile: r8a7791 Arch timer " Magnus Damm
@ 2013-10-03 2:44 ` Simon Horman
0 siblings, 0 replies; 21+ messages in thread
From: Simon Horman @ 2013-10-03 2:44 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 01, 2013 at 05:12:38PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Add r8a7791 arch timer device tree information.
>
> This needs to be used together with r8a7791 support
> code that ties in the R-Car Gen2 arch timer workarounds.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
>
> arch/arm/boot/dts/r8a7791.dtsi | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> --- 0005/arch/arm/boot/dts/r8a7791.dtsi
> +++ work/arch/arm/boot/dts/r8a7791.dtsi 2013-10-01 16:30:54.000000000 +0900
> @@ -39,6 +39,14 @@
> interrupts = <1 9 0xf04>;
> };
>
> + timer {
> + compatible = "arm,armv7-timer";
> + interrupts = <1 13 0xf08>,
> + <1 14 0xf08>,
> + <1 11 0xf08>,
> + <1 10 0xf08>;
> + };
> +
> irqc0: interrupt-controller@e61c0000 {
> compatible = "renesas,irqc";
> #interrupt-cells = <2>;
Thanks, I have queued this up in the dt3 branch.
It should make it into v3.13 but if not I'll rename the branch
dt after rebasing it on v3.13-rcX which will then be targeted at v3.14.
The dt3 branch is a merge of other dt changes queued up for v3.13
with renesas-soc-for-v3.13, which I sent a pull request for a few
days ago. The reason for the merge is to provide the dts for the
r8a7791 SoC which is changed by this patch.
It might have been better to merge the dt for the r8a7791 SoC
in a separate patch in the dt branch. But it wasn't.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 06/10] ARM: shmobile: r8a7791 Arch timer workaround
2013-10-01 8:11 [PATCH 00/10] ARM: shmobile: r8a7791 SoC and Koelsch update V2 Magnus Damm
` (4 preceding siblings ...)
2013-10-01 8:12 ` [PATCH 05/10] ARM: shmobile: r8a7791 Arch timer " Magnus Damm
@ 2013-10-01 8:12 ` Magnus Damm
2013-10-03 3:45 ` Simon Horman
2013-10-01 8:12 ` [PATCH 07/10] ARM: shmobile: Use arch timer on Koelsch Magnus Damm
` (3 subsequent siblings)
9 siblings, 1 reply; 21+ messages in thread
From: Magnus Damm @ 2013-10-01 8:12 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
Make use of the R-Car Gen2 arch timer workaround on r8a7791.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/mach-shmobile/Makefile | 2 +-
arch/arm/mach-shmobile/setup-r8a7791.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
--- 0001/arch/arm/mach-shmobile/Makefile
+++ work/arch/arm/mach-shmobile/Makefile 2013-10-01 16:32:25.000000000 +0900
@@ -16,7 +16,7 @@ obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7
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
--- 0004/arch/arm/mach-shmobile/setup-r8a7791.c
+++ work/arch/arm/mach-shmobile/setup-r8a7791.c 2013-10-01 16:34:15.000000000 +0900
@@ -27,6 +27,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) \
@@ -175,6 +176,7 @@ static const char *r8a7791_boards_compat
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 */
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 06/10] ARM: shmobile: r8a7791 Arch timer workaround
2013-10-01 8:12 ` [PATCH 06/10] ARM: shmobile: r8a7791 Arch timer workaround Magnus Damm
@ 2013-10-03 3:45 ` Simon Horman
0 siblings, 0 replies; 21+ messages in thread
From: Simon Horman @ 2013-10-03 3:45 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 01, 2013 at 05:12:48PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Make use of the R-Car Gen2 arch timer workaround on r8a7791.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
Thanks, I have queued this up in the soc3 branch.
It should make it into v3.13 but if not I'll rename the branch
soc after rebasing it on v3.13-rcX which will then be targeted at v3.14.
The soc3 branch includes soc code previously queued up for v3.13
and a merge with renesas-smp-for-v3.13 which I sent a pull request for
a few days ago. The reason for the merge is to reduce conflicts.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 07/10] ARM: shmobile: Use arch timer on Koelsch
2013-10-01 8:11 [PATCH 00/10] ARM: shmobile: r8a7791 SoC and Koelsch update V2 Magnus Damm
` (5 preceding siblings ...)
2013-10-01 8:12 ` [PATCH 06/10] ARM: shmobile: r8a7791 Arch timer workaround Magnus Damm
@ 2013-10-01 8:12 ` Magnus Damm
2013-10-03 4:21 ` Simon Horman
2013-10-01 8:13 ` [PATCH 08/10] ARM: shmobile: r8a7791 SMP device tree node Magnus Damm
` (2 subsequent siblings)
9 siblings, 1 reply; 21+ messages in thread
From: Magnus Damm @ 2013-10-01 8:12 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
Make use of the R-Car Gen2 arch timer workaround on Koelsch.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/mach-shmobile/board-koelsch.c | 2 ++
1 file changed, 2 insertions(+)
--- 0003/arch/arm/mach-shmobile/board-koelsch.c
+++ work/arch/arm/mach-shmobile/board-koelsch.c 2013-10-01 16:35:52.000000000 +0900
@@ -23,6 +23,7 @@
#include <linux/platform_device.h>
#include <mach/common.h>
#include <mach/r8a7791.h>
+#include <mach/rcar-gen2.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -40,5 +41,6 @@ static const char * const koelsch_boards
DT_MACHINE_START(KOELSCH_DT, "koelsch")
.init_early = r8a7791_init_early,
.init_machine = koelsch_add_standard_devices,
+ .init_time = rcar_gen2_timer_init,
.dt_compat = koelsch_boards_compat_dt,
MACHINE_END
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 07/10] ARM: shmobile: Use arch timer on Koelsch
2013-10-01 8:12 ` [PATCH 07/10] ARM: shmobile: Use arch timer on Koelsch Magnus Damm
@ 2013-10-03 4:21 ` Simon Horman
0 siblings, 0 replies; 21+ messages in thread
From: Simon Horman @ 2013-10-03 4:21 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 01, 2013 at 05:12:57PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Make use of the R-Car Gen2 arch timer workaround on Koelsch.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
>
> arch/arm/mach-shmobile/board-koelsch.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- 0003/arch/arm/mach-shmobile/board-koelsch.c
> +++ work/arch/arm/mach-shmobile/board-koelsch.c 2013-10-01 16:35:52.000000000 +0900
> @@ -23,6 +23,7 @@
> #include <linux/platform_device.h>
> #include <mach/common.h>
> #include <mach/r8a7791.h>
> +#include <mach/rcar-gen2.h>
> #include <asm/mach-types.h>
> #include <asm/mach/arch.h>
>
> @@ -40,5 +41,6 @@ static const char * const koelsch_boards
> DT_MACHINE_START(KOELSCH_DT, "koelsch")
> .init_early = r8a7791_init_early,
> .init_machine = koelsch_add_standard_devices,
> + .init_time = rcar_gen2_timer_init,
> .dt_compat = koelsch_boards_compat_dt,
> MACHINE_END
Thanks, I have queued this up in the boards3 branch.
It should make it into v3.13 but if not I'll rename the branch
soc after rebasing it on v3.13-rcX which will then be targeted at v3.14.
The boards3 branch includes boards code previously queued up for v3.13
and a merge with soc changes previously queued up for v3.13. The reason
for the merge is to provide various build and run-time dependencies
including the rcar_gen2_timer_init code which this patch uses.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 08/10] ARM: shmobile: r8a7791 SMP device tree node
2013-10-01 8:11 [PATCH 00/10] ARM: shmobile: r8a7791 SoC and Koelsch update V2 Magnus Damm
` (6 preceding siblings ...)
2013-10-01 8:12 ` [PATCH 07/10] ARM: shmobile: Use arch timer on Koelsch Magnus Damm
@ 2013-10-01 8:13 ` Magnus Damm
2013-10-03 3:46 ` Simon Horman
2013-10-01 8:13 ` [PATCH 09/10] ARM: shmobile: r8a7791 SMP support Magnus Damm
2013-10-01 8:13 ` [PATCH 10/10] ARM: shmobile: Use SMP on Koelsch Magnus Damm
9 siblings, 1 reply; 21+ messages in thread
From: Magnus Damm @ 2013-10-01 8:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
Add a device node for the r8a7791 secondary CPU core.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/boot/dts/r8a7791.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
--- 0006/arch/arm/boot/dts/r8a7791.dtsi
+++ work/arch/arm/boot/dts/r8a7791.dtsi 2013-10-01 16:37:38.000000000 +0900
@@ -25,6 +25,13 @@
reg = <0>;
clock-frequency = <1300000000>;
};
+
+ cpu1: cpu@1 {
+ device_type = "cpu";
+ compatible = "arm,cortex-a15";
+ reg = <1>;
+ clock-frequency = <1300000000>;
+ };
};
gic: interrupt-controller@f1001000 {
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 08/10] ARM: shmobile: r8a7791 SMP device tree node
2013-10-01 8:13 ` [PATCH 08/10] ARM: shmobile: r8a7791 SMP device tree node Magnus Damm
@ 2013-10-03 3:46 ` Simon Horman
0 siblings, 0 replies; 21+ messages in thread
From: Simon Horman @ 2013-10-03 3:46 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 01, 2013 at 05:13:07PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Add a device node for the r8a7791 secondary CPU core.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
>
> arch/arm/boot/dts/r8a7791.dtsi | 7 +++++++
> 1 file changed, 7 insertions(+)
Thanks, I have queued this up in the dt3 branch.
It should make it into v3.13 but if not I'll rename the branch
dt after rebasing it on v3.13-rcX which will then be targeted at v3.14.
The dt3 branch is a merge of other dt changes queued up for v3.13
with renesas-soc-for-v3.13, which I sent a pull request for a few
days ago. The reason for the merge is to provide the dts for the
r8a7791 SoC which is changed by patches this patch.
It might have been better to merge the dt for the r8a7791 SoC
in a separate patch in the dt branch. But it wasn't.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 09/10] ARM: shmobile: r8a7791 SMP support
2013-10-01 8:11 [PATCH 00/10] ARM: shmobile: r8a7791 SoC and Koelsch update V2 Magnus Damm
` (7 preceding siblings ...)
2013-10-01 8:13 ` [PATCH 08/10] ARM: shmobile: r8a7791 SMP device tree node Magnus Damm
@ 2013-10-01 8:13 ` Magnus Damm
2013-10-03 3:47 ` Simon Horman
2013-10-01 8:13 ` [PATCH 10/10] ARM: shmobile: Use SMP on Koelsch Magnus Damm
9 siblings, 1 reply; 21+ messages in thread
From: Magnus Damm @ 2013-10-01 8:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
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.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
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(+)
--- 0007/arch/arm/mach-shmobile/Makefile
+++ work/arch/arm/mach-shmobile/Makefile 2013-10-01 16:38:50.000000000 +0900
@@ -38,6 +38,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
--- 0002/arch/arm/mach-shmobile/include/mach/r8a7791.h
+++ work/arch/arm/mach-shmobile/include/mach/r8a7791.h 2013-10-01 16:38:50.000000000 +0900
@@ -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__ */
--- 0007/arch/arm/mach-shmobile/setup-r8a7791.c
+++ work/arch/arm/mach-shmobile/setup-r8a7791.c 2013-10-01 16:38:50.000000000 +0900
@@ -175,6 +175,7 @@ static const char *r8a7791_boards_compat
};
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,
--- /dev/null
+++ work/arch/arm/mach-shmobile/smp-r8a7791.c 2013-10-01 16:38:50.000000000 +0900
@@ -0,0 +1,62 @@
+/*
+ * SMP support for r8a7791
+ *
+ * Copyright (C) 2013 Renesas Solutions Corp.
+ * Copyright (C) 2013 Magnus Damm
+ *
+ * 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
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/smp.h>
+#include <linux/io.h>
+#include <asm/smp_plat.h>
+#include <mach/common.h>
+#include <mach/r8a7791.h>
+
+#define RST 0xe6160000
+#define CA15BAR 0x0020
+#define CA15RESCNT 0x0040
+#define RAM 0xe6300000
+
+static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
+{
+ void __iomem *p;
+ u32 bar;
+
+ /* let APMU code install data related to shmobile_boot_vector */
+ shmobile_smp_apmu_prepare_cpus(max_cpus);
+
+ /* RAM for jump stub, because BAR requires 256KB aligned address */
+ p = ioremap_nocache(RAM, shmobile_boot_size);
+ memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size);
+ iounmap(p);
+
+ /* setup reset vectors */
+ p = ioremap_nocache(RST, 0x63);
+ bar = (RAM >> 8) & 0xfffffc00;
+ writel_relaxed(bar, p + CA15BAR);
+ writel_relaxed(bar | 0x10, p + CA15BAR);
+
+ /* enable clocks to all CPUs */
+ writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000,
+ p + CA15RESCNT);
+ iounmap(p);
+}
+
+struct smp_operations r8a7791_smp_ops __initdata = {
+ .smp_prepare_cpus = r8a7791_smp_prepare_cpus,
+ .smp_boot_secondary = shmobile_smp_apmu_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+ .cpu_disable = shmobile_smp_cpu_disable,
+ .cpu_die = shmobile_smp_apmu_cpu_die,
+ .cpu_kill = shmobile_smp_apmu_cpu_kill,
+#endif
+};
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 09/10] ARM: shmobile: r8a7791 SMP support
2013-10-01 8:13 ` [PATCH 09/10] ARM: shmobile: r8a7791 SMP support Magnus Damm
@ 2013-10-03 3:47 ` Simon Horman
0 siblings, 0 replies; 21+ messages in thread
From: Simon Horman @ 2013-10-03 3:47 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 01, 2013 at 05:13:16PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
>
> 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.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
>
> 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(+)
Thanks, I have queued this up in the soc3 branch.
It should make it into v3.13 but if not I'll rename the branch
soc after rebasing it on v3.13-rcX which will then be targeted at v3.14.
The soc3 branch includes soc code previously queued up for v3.13
and a merge with renesas-smp-for-v3.13 which I sent a pull request for
a few days ago. The reason for the merge is to reduce conflicts.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 10/10] ARM: shmobile: Use SMP on Koelsch
2013-10-01 8:11 [PATCH 00/10] ARM: shmobile: r8a7791 SoC and Koelsch update V2 Magnus Damm
` (8 preceding siblings ...)
2013-10-01 8:13 ` [PATCH 09/10] ARM: shmobile: r8a7791 SMP support Magnus Damm
@ 2013-10-01 8:13 ` Magnus Damm
2013-10-03 4:22 ` Simon Horman
9 siblings, 1 reply; 21+ messages in thread
From: Magnus Damm @ 2013-10-01 8:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
Enable r8a7791 SMP support code on the Koelsch board.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/mach-shmobile/board-koelsch.c | 1 +
1 file changed, 1 insertion(+)
--- 0008/arch/arm/mach-shmobile/board-koelsch.c
+++ work/arch/arm/mach-shmobile/board-koelsch.c 2013-10-01 16:40:07.000000000 +0900
@@ -39,6 +39,7 @@ static const char * const koelsch_boards
};
DT_MACHINE_START(KOELSCH_DT, "koelsch")
+ .smp = smp_ops(r8a7791_smp_ops),
.init_early = r8a7791_init_early,
.init_machine = koelsch_add_standard_devices,
.init_time = rcar_gen2_timer_init,
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 10/10] ARM: shmobile: Use SMP on Koelsch
2013-10-01 8:13 ` [PATCH 10/10] ARM: shmobile: Use SMP on Koelsch Magnus Damm
@ 2013-10-03 4:22 ` Simon Horman
0 siblings, 0 replies; 21+ messages in thread
From: Simon Horman @ 2013-10-03 4:22 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 01, 2013 at 05:13:26PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Enable r8a7791 SMP support code on the Koelsch board.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
>
> arch/arm/mach-shmobile/board-koelsch.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- 0008/arch/arm/mach-shmobile/board-koelsch.c
> +++ work/arch/arm/mach-shmobile/board-koelsch.c 2013-10-01 16:40:07.000000000 +0900
> @@ -39,6 +39,7 @@ static const char * const koelsch_boards
> };
>
> DT_MACHINE_START(KOELSCH_DT, "koelsch")
> + .smp = smp_ops(r8a7791_smp_ops),
> .init_early = r8a7791_init_early,
> .init_machine = koelsch_add_standard_devices,
> .init_time = rcar_gen2_timer_init,
Thanks, I have queued this up in the boards3 branch.
It should make it into v3.13 but if not I'll rename the branch
soc after rebasing it on v3.13-rcX which will then be targeted at v3.14.
The boards3 branch includes boards code previously queued up for v3.13
and a merge with soc changes previously queued up for v3.13. The reason
for the merge is to provide various build and run-time dependencies
including the r8a7791 SoC code which this patch uses.
^ permalink raw reply [flat|nested] 21+ messages in thread