* [PATCH 1/9] ARM: shmobile: Add r8a7740 Maximum CPU Frequency to DTS
2014-05-16 0:58 [GIT PULL] Renesas ARM Based SoC Cleanups v3.16 Simon Horman
@ 2014-05-16 0:58 ` Simon Horman
2014-05-16 0:58 ` [PATCH 2/9] ARM: shmobile: Use r8a7740 DT CPU Frequency in common case Simon Horman
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2014-05-16 0:58 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm+renesas@opensource.se>
Add 800 MHz to the r8a7740 DTS to describe the maximum CPU frequency.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Tested-by: Geert Uytterhoeven <geert@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a7740.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
index 8280884..67c4b8b 100644
--- a/arch/arm/boot/dts/r8a7740.dtsi
+++ b/arch/arm/boot/dts/r8a7740.dtsi
@@ -22,6 +22,7 @@
compatible = "arm,cortex-a9";
device_type = "cpu";
reg = <0x0>;
+ clock-frequency = <800000000>;
};
};
--
1.8.5.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/9] ARM: shmobile: Use r8a7740 DT CPU Frequency in common case
2014-05-16 0:58 [GIT PULL] Renesas ARM Based SoC Cleanups v3.16 Simon Horman
2014-05-16 0:58 ` [PATCH 1/9] ARM: shmobile: Add r8a7740 Maximum CPU Frequency to DTS Simon Horman
@ 2014-05-16 0:58 ` Simon Horman
2014-05-16 0:58 ` [PATCH 3/9] ARM: shmobile: Use r8a7740 DT CPU Frequency for Armadillo DT Ref Simon Horman
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2014-05-16 0:58 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm+renesas@opensource.se>
Convert the common C-code-less r8a7740 DT board support
to use shmobile_init_delay() to be able to migrate away
from per-SoC delay setup functions.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Tested-by: Geert Uytterhoeven <geert@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/setup-r8a7740.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 8f3c681..d1ce3ca 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -935,7 +935,7 @@ static const char *r8a7740_boards_compat_dt[] __initdata = {
DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
.map_io = r8a7740_map_io,
- .init_early = r8a7740_init_delay,
+ .init_early = shmobile_init_delay,
.init_irq = r8a7740_init_irq_of,
.init_machine = r8a7740_generic_init,
.dt_compat = r8a7740_boards_compat_dt,
--
1.8.5.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/9] ARM: shmobile: Use r8a7740 DT CPU Frequency for Armadillo DT Ref
2014-05-16 0:58 [GIT PULL] Renesas ARM Based SoC Cleanups v3.16 Simon Horman
2014-05-16 0:58 ` [PATCH 1/9] ARM: shmobile: Add r8a7740 Maximum CPU Frequency to DTS Simon Horman
2014-05-16 0:58 ` [PATCH 2/9] ARM: shmobile: Use r8a7740 DT CPU Frequency in common case Simon Horman
@ 2014-05-16 0:58 ` Simon Horman
2014-05-16 0:58 ` [PATCH 4/9] ARM: shmobile: Remove unused r8a7740_init_delay() Simon Horman
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2014-05-16 0:58 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm+renesas@opensource.se>
Convert the Armadillo r8a7740 DT reference board support
to use shmobile_init_delay() to be able to migrate away
from per-SoC delay setup functions.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Tested-by: Geert Uytterhoeven <geert@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-armadillo800eva-reference.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
index 57d1a78..57d246e 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
@@ -187,7 +187,7 @@ static const char *eva_boards_compat_dt[] __initdata = {
DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva-reference")
.map_io = r8a7740_map_io,
- .init_early = r8a7740_init_delay,
+ .init_early = shmobile_init_delay,
.init_irq = r8a7740_init_irq_of,
.init_machine = eva_init,
.init_late = shmobile_init_late,
--
1.8.5.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/9] ARM: shmobile: Remove unused r8a7740_init_delay()
2014-05-16 0:58 [GIT PULL] Renesas ARM Based SoC Cleanups v3.16 Simon Horman
` (2 preceding siblings ...)
2014-05-16 0:58 ` [PATCH 3/9] ARM: shmobile: Use r8a7740 DT CPU Frequency for Armadillo DT Ref Simon Horman
@ 2014-05-16 0:58 ` Simon Horman
2014-05-16 0:58 ` [PATCH 5/9] ARM: shmobile: Use r8a7791 DT CPU Frequency in common case Simon Horman
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2014-05-16 0:58 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm+renesas@opensource.se>
Remove the now unused r8a7740_init_delay() function.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Tested-by: Geert Uytterhoeven <geert@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/include/mach/r8a7740.h | 1 -
arch/arm/mach-shmobile/setup-r8a7740.c | 5 -----
2 files changed, 6 deletions(-)
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/include/mach/r8a7740.h
index d07932f..5e3c9ec 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7740.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7740.h
@@ -47,7 +47,6 @@ enum {
};
extern void r8a7740_meram_workaround(void);
-extern void r8a7740_init_delay(void);
extern void r8a7740_init_irq_of(void);
extern void r8a7740_map_io(void);
extern void r8a7740_add_early_devices(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index d1ce3ca..eaec043 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -887,11 +887,6 @@ void __init r8a7740_add_standard_devices_dt(void)
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
-void __init r8a7740_init_delay(void)
-{
- shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
-};
-
void __init r8a7740_init_irq_of(void)
{
void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10);
--
1.8.5.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/9] ARM: shmobile: Use r8a7791 DT CPU Frequency in common case
2014-05-16 0:58 [GIT PULL] Renesas ARM Based SoC Cleanups v3.16 Simon Horman
` (3 preceding siblings ...)
2014-05-16 0:58 ` [PATCH 4/9] ARM: shmobile: Remove unused r8a7740_init_delay() Simon Horman
@ 2014-05-16 0:58 ` Simon Horman
2014-05-16 0:58 ` [PATCH 6/9] ARM: shmobile: Use r8a7791 DT CPU Frequency for Koelsch Simon Horman
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2014-05-16 0:58 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm+renesas@opensource.se>
Convert the common C-code-less r8a7791 DT board support
to use shmobile_init_delay() to be able to migrate away
from per-SoC delay setup functions.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/setup-r8a7791.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
index a7e4966..2c84e74 100644
--- a/arch/arm/mach-shmobile/setup-r8a7791.c
+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
@@ -225,7 +225,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_early = shmobile_init_delay,
.init_time = rcar_gen2_timer_init,
.dt_compat = r8a7791_boards_compat_dt,
MACHINE_END
--
1.8.5.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 6/9] ARM: shmobile: Use r8a7791 DT CPU Frequency for Koelsch
2014-05-16 0:58 [GIT PULL] Renesas ARM Based SoC Cleanups v3.16 Simon Horman
` (4 preceding siblings ...)
2014-05-16 0:58 ` [PATCH 5/9] ARM: shmobile: Use r8a7791 DT CPU Frequency in common case Simon Horman
@ 2014-05-16 0:58 ` Simon Horman
2014-05-16 0:58 ` [PATCH 7/9] ARM: shmobile: Remove unused r8a7791_init_early() Simon Horman
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2014-05-16 0:58 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm+renesas@opensource.se>
Convert the Koelsch board support to use shmobile_init_delay()
to be able to migrate away from per-SoC delay setup functions.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-koelsch-reference.c | 2 +-
arch/arm/mach-shmobile/board-koelsch.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
index a3fd302..ff33d9c 100644
--- a/arch/arm/mach-shmobile/board-koelsch-reference.c
+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
@@ -139,7 +139,7 @@ static const char * const koelsch_boards_compat_dt[] __initconst = {
DT_MACHINE_START(KOELSCH_DT, "koelsch")
.smp = smp_ops(r8a7791_smp_ops),
- .init_early = r8a7791_init_early,
+ .init_early = shmobile_init_delay,
.init_time = rcar_gen2_timer_init,
.init_machine = koelsch_add_standard_devices,
.init_late = shmobile_init_late,
diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
index 5a034ff..3cd8008 100644
--- a/arch/arm/mach-shmobile/board-koelsch.c
+++ b/arch/arm/mach-shmobile/board-koelsch.c
@@ -522,7 +522,7 @@ static const char * const koelsch_boards_compat_dt[] __initconst = {
DT_MACHINE_START(KOELSCH_DT, "koelsch")
.smp = smp_ops(r8a7791_smp_ops),
- .init_early = r8a7791_init_early,
+ .init_early = shmobile_init_delay,
.init_time = rcar_gen2_timer_init,
.init_machine = koelsch_init,
.init_late = shmobile_init_late,
--
1.8.5.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 7/9] ARM: shmobile: Remove unused r8a7791_init_early()
2014-05-16 0:58 [GIT PULL] Renesas ARM Based SoC Cleanups v3.16 Simon Horman
` (5 preceding siblings ...)
2014-05-16 0:58 ` [PATCH 6/9] ARM: shmobile: Use r8a7791 DT CPU Frequency for Koelsch Simon Horman
@ 2014-05-16 0:58 ` Simon Horman
2014-05-16 0:58 ` [PATCH 8/9] ARM: shmobile: Use shmobile_init_late() on r8a7740 Simon Horman
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2014-05-16 0:58 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm+renesas@opensource.se>
Remove the now unused r8a7791_init_early() function.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/include/mach/r8a7791.h | 1 -
arch/arm/mach-shmobile/setup-r8a7791.c | 7 -------
2 files changed, 8 deletions(-)
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7791.h b/arch/arm/mach-shmobile/include/mach/r8a7791.h
index 200fa69..664274c 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7791.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7791.h
@@ -5,7 +5,6 @@ void r8a7791_add_standard_devices(void);
void r8a7791_add_dt_devices(void);
void r8a7791_clock_init(void);
void r8a7791_pinmux_init(void);
-void r8a7791_init_early(void);
extern struct smp_operations r8a7791_smp_ops;
#endif /* __ASM_R8A7791_H__ */
diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
index 2c84e74..949580a 100644
--- a/arch/arm/mach-shmobile/setup-r8a7791.c
+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
@@ -210,13 +210,6 @@ void __init r8a7791_add_standard_devices(void)
r8a7791_register_thermal();
}
-void __init r8a7791_init_early(void)
-{
-#ifndef CONFIG_ARM_ARCH_TIMER
- shmobile_setup_delay(1500, 2, 4); /* Cortex-A15 @ 1500MHz */
-#endif
-}
-
#ifdef CONFIG_USE_OF
static const char *r8a7791_boards_compat_dt[] __initdata = {
"renesas,r8a7791",
--
1.8.5.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 8/9] ARM: shmobile: Use shmobile_init_late() on r8a7740
2014-05-16 0:58 [GIT PULL] Renesas ARM Based SoC Cleanups v3.16 Simon Horman
` (6 preceding siblings ...)
2014-05-16 0:58 ` [PATCH 7/9] ARM: shmobile: Remove unused r8a7791_init_early() Simon Horman
@ 2014-05-16 0:58 ` Simon Horman
2014-05-16 0:58 ` [PATCH 9/9] ARM: shmobile: Set clock frequency in HZ from OF nodes Simon Horman
2014-05-20 6:07 ` [GIT PULL] Renesas ARM Based SoC Cleanups v3.16 Olof Johansson
9 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2014-05-16 0:58 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm+renesas@opensource.se>
Hook up ->init_late for r8a7740 to initialize Suspend-to-RAM
and CPUIdle in case of C-code less board support for r8a7740.
Signed-off-by: Magnus Damm <damm+renesas@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-r8a7740.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index eaec043..7bdc51c 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -933,6 +933,7 @@ DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
.init_early = shmobile_init_delay,
.init_irq = r8a7740_init_irq_of,
.init_machine = r8a7740_generic_init,
+ .init_late = shmobile_init_late,
.dt_compat = r8a7740_boards_compat_dt,
MACHINE_END
--
1.8.5.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 9/9] ARM: shmobile: Set clock frequency in HZ from OF nodes
2014-05-16 0:58 [GIT PULL] Renesas ARM Based SoC Cleanups v3.16 Simon Horman
` (7 preceding siblings ...)
2014-05-16 0:58 ` [PATCH 8/9] ARM: shmobile: Use shmobile_init_late() on r8a7740 Simon Horman
@ 2014-05-16 0:58 ` Simon Horman
2014-05-20 6:07 ` [GIT PULL] Renesas ARM Based SoC Cleanups v3.16 Olof Johansson
9 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2014-05-16 0:58 UTC (permalink / raw)
To: linux-arm-kernel
shmobile_init_delay() looks for OF "clock-frequency" to determine
the delay which is set by calling shmobile_setup_delay().
Unfortunately this seems to be incorrect in detail as
"clock-frequency" node values are in HZ whereas the frequency
argument to shmobile_setup_delay() is in MHz.
Provide a variant of shmobile_setup_delay() that accepts HZ to
correct this problem.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/timer.c | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c
index ccecde9..68bc0b8 100644
--- a/arch/arm/mach-shmobile/timer.c
+++ b/arch/arm/mach-shmobile/timer.c
@@ -23,6 +23,23 @@
#include <linux/delay.h>
#include <linux/of_address.h>
+void __init shmobile_setup_delay_hz(unsigned int max_cpu_core_hz,
+ unsigned int mult, unsigned int div)
+{
+ /* calculate a worst-case loops-per-jiffy value
+ * based on maximum cpu core hz setting and the
+ * __delay() implementation in arch/arm/lib/delay.S
+ *
+ * this will result in a longer delay than expected
+ * when the cpu core runs on lower frequencies.
+ */
+
+ unsigned int value = HZ * div / mult;
+
+ if (!preset_lpj)
+ preset_lpj = max_cpu_core_hz / value;
+}
+
void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz,
unsigned int mult, unsigned int div)
{
@@ -58,12 +75,12 @@ void __init shmobile_init_delay(void)
if (max_freq) {
if (of_find_compatible_node(NULL, NULL, "arm,cortex-a8"))
- shmobile_setup_delay(max_freq, 1, 3);
+ shmobile_setup_delay_hz(max_freq, 1, 3);
else if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9"))
- shmobile_setup_delay(max_freq, 1, 3);
+ shmobile_setup_delay_hz(max_freq, 1, 3);
else if (of_find_compatible_node(NULL, NULL, "arm,cortex-a15"))
if (!IS_ENABLED(CONFIG_ARM_ARCH_TIMER))
- shmobile_setup_delay(max_freq, 2, 4);
+ shmobile_setup_delay_hz(max_freq, 2, 4);
}
}
--
1.8.5.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [GIT PULL] Renesas ARM Based SoC Cleanups v3.16
2014-05-16 0:58 [GIT PULL] Renesas ARM Based SoC Cleanups v3.16 Simon Horman
` (8 preceding siblings ...)
2014-05-16 0:58 ` [PATCH 9/9] ARM: shmobile: Set clock frequency in HZ from OF nodes Simon Horman
@ 2014-05-20 6:07 ` Olof Johansson
9 siblings, 0 replies; 11+ messages in thread
From: Olof Johansson @ 2014-05-20 6:07 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, May 16, 2014 at 09:58:46AM +0900, Simon Horman wrote:
> Hi Olof, Hi Kevin, Hi Arnd,
>
> Please consider these Renesas ARM based SoC cleanups v3.16.
>
> This pull request is based on Renesas ARM Based SoC Updates for v3.16,
> tagged as renesas-soc-for-v3.16, which you have already pulled.
>
>
> This series includes dependencies that do not fit easily into the usual
> inter-branch dependencies and as such I have grouped them together in a
> single branch.
>
>
> The following changes since commit e35db38d66d1e4007cfc1bb90a05e11b4aaee2a8:
>
> ARM: shmobile: r8a7778/bockw: Move "select RENESAS_INTC_IRQPIN" under SoC (2014-04-14 11:28:43 +0900)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc-cleanup-for-v3.16
>
> for you to fetch changes up to f492b81777c93b33afe892b424e022022b5bc297:
>
> ARM: shmobile: Set clock frequency in HZ from OF nodes (2014-05-14 14:02:21 +0900)
Merged, thanks.
-Olof
^ permalink raw reply [flat|nested] 11+ messages in thread