* [GIT PULL v2] Renesas ARM Based SoC Updates for v4.6
@ 2016-02-24 1:21 Simon Horman
2016-02-24 1:21 ` [PATCH 1/6] ARM: shmobile: r8a7740: Migrate to generic l2c OF initialization Simon Horman
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Simon Horman @ 2016-02-24 1:21 UTC (permalink / raw)
To: linux-arm-kernel
Hi Olof, Hi Kevin, Hi Arnd,
Please consider these Renesas ARM based SoC updates for v4.6.
The following changes since commit 92e963f50fc74041b5e9e744c330dca48e04f08d:
Linux 4.5-rc1 (2016-01-24 13:06:47 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc-for-v4.6
for you to fetch changes up to 71d076ceb245f0d9a05e552bbebd5911660bd2ac:
ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains (2016-02-19 14:52:41 +0900)
----------------------------------------------------------------
Renesas ARM Based SoC Updates for v4.6
* Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
* Move emev2_smp_ops to emev2
* Remove legacy map_io callbacks on r8a7740 and emev2 SoCs
* Migrate to generic l2c OF initialization on r8a7740
----------------------------------------------------------------
Geert Uytterhoeven (6):
ARM: shmobile: r8a7740: Migrate to generic l2c OF initialization
ARM: shmobile: r8a7740: Remove mapping of L2 cache controller registers
ARM: shmobile: r8a7740: Remove legacy machine_desc.map_io() callback
ARM: shmobile: emev2: Remove legacy machine_desc.map_io() callback
ARM: shmobile: emev2: Move declaration of emev2_smp_ops to emev2.h
ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
arch/arm/mach-shmobile/Kconfig | 13 +++++++-----
arch/arm/mach-shmobile/emev2.h | 6 ++++++
arch/arm/mach-shmobile/setup-emev2.c | 22 ++-----------------
arch/arm/mach-shmobile/setup-r8a7740.c | 39 ++--------------------------------
arch/arm/mach-shmobile/smp-emev2.c | 2 ++
5 files changed, 20 insertions(+), 62 deletions(-)
create mode 100644 arch/arm/mach-shmobile/emev2.h
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/6] ARM: shmobile: r8a7740: Migrate to generic l2c OF initialization
2016-02-24 1:21 [GIT PULL v2] Renesas ARM Based SoC Updates for v4.6 Simon Horman
@ 2016-02-24 1:21 ` Simon Horman
2016-02-24 1:21 ` [PATCH 2/6] ARM: shmobile: r8a7740: Remove mapping of L2 cache controller registers Simon Horman
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2016-02-24 1:21 UTC (permalink / raw)
To: linux-arm-kernel
From: Geert Uytterhoeven <geert+renesas@glider.be>
Migrate the generic r8a7740 platform from calling l2x0_of_init() to the
generic l2c OF initialization.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/setup-r8a7740.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 0c8f80c5b04d..bf221e05c8dc 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -23,7 +23,6 @@
#include <asm/mach/map.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
-#include <asm/hardware/cache-l2x0.h>
#include "common.h"
@@ -110,10 +109,6 @@ static void __init r8a7740_generic_init(void)
{
r8a7740_meram_workaround();
-#ifdef CONFIG_CACHE_L2X0
- /* Shared attribute override enable, 32K*8way */
- l2x0_init(IOMEM(0xf0002000), 0x00400000, 0xc20f0fff);
-#endif
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
@@ -123,6 +118,8 @@ static const char *const r8a7740_boards_compat_dt[] __initconst = {
};
DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
+ .l2c_aux_val = 0,
+ .l2c_aux_mask = ~0,
.map_io = r8a7740_map_io,
.init_early = shmobile_init_delay,
.init_irq = r8a7740_init_irq_of,
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/6] ARM: shmobile: r8a7740: Remove mapping of L2 cache controller registers
2016-02-24 1:21 [GIT PULL v2] Renesas ARM Based SoC Updates for v4.6 Simon Horman
2016-02-24 1:21 ` [PATCH 1/6] ARM: shmobile: r8a7740: Migrate to generic l2c OF initialization Simon Horman
@ 2016-02-24 1:21 ` Simon Horman
2016-02-24 1:21 ` [PATCH 3/6] ARM: shmobile: r8a7740: Remove legacy machine_desc.map_io() callback Simon Horman
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2016-02-24 1:21 UTC (permalink / raw)
To: linux-arm-kernel
From: Geert Uytterhoeven <geert+renesas@glider.be>
Now all r8a7740-based platforms have been migrated to the generic l2c OF
initialization, it's no longer needed to map the L2 cache controller
registers from .map_io().
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/setup-r8a7740.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index bf221e05c8dc..3e71cd4168dd 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -37,18 +37,6 @@ static struct map_desc r8a7740_io_desc[] __initdata = {
.length = 160 << 20,
.type = MT_DEVICE_NONSHARED
},
-#ifdef CONFIG_CACHE_L2X0
- /*
- * for l2x0_init()
- * 0xf0100000-0xf0101000 -> 0xf0002000-0xf0003000
- */
- {
- .virtual = 0xf0002000,
- .pfn = __phys_to_pfn(0xf0100000),
- .length = PAGE_SIZE,
- .type = MT_DEVICE_NONSHARED
- },
-#endif
};
static void __init r8a7740_map_io(void)
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/6] ARM: shmobile: r8a7740: Remove legacy machine_desc.map_io() callback
2016-02-24 1:21 [GIT PULL v2] Renesas ARM Based SoC Updates for v4.6 Simon Horman
2016-02-24 1:21 ` [PATCH 1/6] ARM: shmobile: r8a7740: Migrate to generic l2c OF initialization Simon Horman
2016-02-24 1:21 ` [PATCH 2/6] ARM: shmobile: r8a7740: Remove mapping of L2 cache controller registers Simon Horman
@ 2016-02-24 1:21 ` Simon Horman
2016-02-24 1:21 ` [PATCH 4/6] ARM: shmobile: emev2: " Simon Horman
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2016-02-24 1:21 UTC (permalink / raw)
To: linux-arm-kernel
From: Geert Uytterhoeven <geert+renesas@glider.be>
Commit 37201ba5c99d0be8 ("ARM: shmobile: r8a7740: Migrate to generic l2c
OF initialization") removed the last user of the legacy "IOMEM()" macro
on r8a7740-based systems. Hence there's no longer a need to set up a
transparent mapping of system I/O registers. Remove the mapping and the
legacy machine_desc.map_io() callback.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/setup-r8a7740.c | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 3e71cd4168dd..db6dbfbaf9f1 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -26,25 +26,6 @@
#include "common.h"
-static struct map_desc r8a7740_io_desc[] __initdata = {
- /*
- * for CPGA/INTC/PFC
- * 0xe6000000-0xefffffff -> 0xe6000000-0xefffffff
- */
- {
- .virtual = 0xe6000000,
- .pfn = __phys_to_pfn(0xe6000000),
- .length = 160 << 20,
- .type = MT_DEVICE_NONSHARED
- },
-};
-
-static void __init r8a7740_map_io(void)
-{
- debug_ll_io_init();
- iotable_init(r8a7740_io_desc, ARRAY_SIZE(r8a7740_io_desc));
-}
-
/*
* r8a7740 chip has lasting errata on MERAM buffer.
* this is work-around for it.
@@ -108,7 +89,6 @@ static const char *const r8a7740_boards_compat_dt[] __initconst = {
DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
.l2c_aux_val = 0,
.l2c_aux_mask = ~0,
- .map_io = r8a7740_map_io,
.init_early = shmobile_init_delay,
.init_irq = r8a7740_init_irq_of,
.init_machine = r8a7740_generic_init,
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/6] ARM: shmobile: emev2: Remove legacy machine_desc.map_io() callback
2016-02-24 1:21 [GIT PULL v2] Renesas ARM Based SoC Updates for v4.6 Simon Horman
` (2 preceding siblings ...)
2016-02-24 1:21 ` [PATCH 3/6] ARM: shmobile: r8a7740: Remove legacy machine_desc.map_io() callback Simon Horman
@ 2016-02-24 1:21 ` Simon Horman
2016-02-24 1:21 ` [PATCH 5/6] ARM: shmobile: emev2: Move declaration of emev2_smp_ops to emev2.h Simon Horman
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2016-02-24 1:21 UTC (permalink / raw)
To: linux-arm-kernel
From: Geert Uytterhoeven <geert+renesas@glider.be>
Commit FIXME ("ARM: shmobile: Consolidate SCU mapping code") removed the
last user of the static mapping on emev2-based systems. Remove the
mapping and the legacy machine_desc.map_io() callback.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/setup-emev2.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
index 10b7cb5dcb3a..0829d0215c38 100644
--- a/arch/arm/mach-shmobile/setup-emev2.c
+++ b/arch/arm/mach-shmobile/setup-emev2.c
@@ -20,23 +20,6 @@
#include <asm/mach/map.h>
#include "common.h"
-static struct map_desc emev2_io_desc[] __initdata = {
-#ifdef CONFIG_SMP
- /* 2M mapping for SCU + L2 controller */
- {
- .virtual = 0xf0000000,
- .pfn = __phys_to_pfn(0x1e000000),
- .length = SZ_2M,
- .type = MT_DEVICE
- },
-#endif
-};
-
-static void __init emev2_map_io(void)
-{
- iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc));
-}
-
static const char *const emev2_boards_compat_dt[] __initconst = {
"renesas,emev2",
NULL,
@@ -46,7 +29,6 @@ extern const struct smp_operations emev2_smp_ops;
DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
.smp = smp_ops(emev2_smp_ops),
- .map_io = emev2_map_io,
.init_early = shmobile_init_delay,
.init_late = shmobile_init_late,
.dt_compat = emev2_boards_compat_dt,
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/6] ARM: shmobile: emev2: Move declaration of emev2_smp_ops to emev2.h
2016-02-24 1:21 [GIT PULL v2] Renesas ARM Based SoC Updates for v4.6 Simon Horman
` (3 preceding siblings ...)
2016-02-24 1:21 ` [PATCH 4/6] ARM: shmobile: emev2: " Simon Horman
@ 2016-02-24 1:21 ` Simon Horman
2016-02-24 1:21 ` [PATCH 6/6] ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains Simon Horman
2016-02-26 21:41 ` [GIT PULL v2] Renesas ARM Based SoC Updates for v4.6 Arnd Bergmann
6 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2016-02-24 1:21 UTC (permalink / raw)
To: linux-arm-kernel
From: Geert Uytterhoeven <geert+renesas@glider.be>
make C=1:
arch/arm/mach-shmobile/smp-emev2.c:51:29: warning: symbol 'emev2_smp_ops' was not declared. Should it be static?
To fix this, move the forward declaration of emev2_smp_ops to a header
file, and include it where appropriate.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/emev2.h | 6 ++++++
arch/arm/mach-shmobile/setup-emev2.c | 4 ++--
arch/arm/mach-shmobile/smp-emev2.c | 2 ++
3 files changed, 10 insertions(+), 2 deletions(-)
create mode 100644 arch/arm/mach-shmobile/emev2.h
diff --git a/arch/arm/mach-shmobile/emev2.h b/arch/arm/mach-shmobile/emev2.h
new file mode 100644
index 000000000000..916d25f6780e
--- /dev/null
+++ b/arch/arm/mach-shmobile/emev2.h
@@ -0,0 +1,6 @@
+#ifndef __ASM_EMEV2_H__
+#define __ASM_EMEV2_H__
+
+extern const struct smp_operations emev2_smp_ops;
+
+#endif /* __ASM_EMEV2_H__ */
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
index 0829d0215c38..3c99aaf65325 100644
--- a/arch/arm/mach-shmobile/setup-emev2.c
+++ b/arch/arm/mach-shmobile/setup-emev2.c
@@ -18,15 +18,15 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
+
#include "common.h"
+#include "emev2.h"
static const char *const emev2_boards_compat_dt[] __initconst = {
"renesas,emev2",
NULL,
};
-extern const struct smp_operations emev2_smp_ops;
-
DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
.smp = smp_ops(emev2_smp_ops),
.init_early = shmobile_init_delay,
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c
index adbac6963f2b..871220bf5870 100644
--- a/arch/arm/mach-shmobile/smp-emev2.c
+++ b/arch/arm/mach-shmobile/smp-emev2.c
@@ -21,7 +21,9 @@
#include <linux/delay.h>
#include <asm/smp_plat.h>
#include <asm/smp_scu.h>
+
#include "common.h"
+#include "emev2.h"
#define EMEV2_SCU_BASE 0x1e000000
#define EMEV2_SMU_BASE 0xe0110000
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/6] ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
2016-02-24 1:21 [GIT PULL v2] Renesas ARM Based SoC Updates for v4.6 Simon Horman
` (4 preceding siblings ...)
2016-02-24 1:21 ` [PATCH 5/6] ARM: shmobile: emev2: Move declaration of emev2_smp_ops to emev2.h Simon Horman
@ 2016-02-24 1:21 ` Simon Horman
2016-02-26 21:41 ` [GIT PULL v2] Renesas ARM Based SoC Updates for v4.6 Arnd Bergmann
6 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2016-02-24 1:21 UTC (permalink / raw)
To: linux-arm-kernel
From: Geert Uytterhoeven <geert+renesas@glider.be>
All supported Renesas ARM SoCs (except for Emma Mobile EV2) have clock
domains. Some SoCs also have power domains. To ensure proper operation
of on-SoC modules, module clocks must be ungated, and power domains must
be powered up when needed.
Currently the user can choose to build a kernel with power management
enabled or disabled:
- If CONFIG_PM=y, power domains and/or module clocks are handled
dynamically by Runtime PM and the generic power domain.
- If CONFIG_PM=n, power domains are assumed to be powered up by reset
state or by the boot loader, and module clocks are handled by the
legacy clock domain on driver (un)bind.
The latter is implemented using a platform bus notifier, which
applies not only to all on-SoC devices, but to all platform devices
present in the system.
To remove the dependency on implicit assumptions, and to get rid of the
peculiarities of the legacy clock domain, enable CONFIG_PM and
CONFIG_PM_GENERIC_DOMAINS unconditionally, for all Renesas ARM SoCs with
clock and/or power domains.
This does cause an increase in kernel size. Given bloat-o-meter reports
a modest increase of 26 KiB for an RZ/A1H kernel, this should not be a
problem, even when used on RZ/A1H with XIP and internal RAM only.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/Kconfig | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index cd5f171f83ce..2824b81f1a39 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -6,28 +6,30 @@ config ARCH_SHMOBILE_MULTI
config PM_RCAR
bool
- select PM_GENERIC_DOMAINS if PM
+ select PM
+ select PM_GENERIC_DOMAINS
config PM_RMOBILE
bool
+ select PM
select PM_GENERIC_DOMAINS
config ARCH_RCAR_GEN1
bool
- select PM_RCAR if PM || SMP
+ select PM_RCAR
select RENESAS_INTC_IRQPIN
select SYS_SUPPORTS_SH_TMU
config ARCH_RCAR_GEN2
bool
- select PM_RCAR if PM || SMP
+ select PM_RCAR
select RENESAS_IRQC
select SYS_SUPPORTS_SH_CMT
select PCI_DOMAINS if PCI
config ARCH_RMOBILE
bool
- select PM_RMOBILE if PM
+ select PM_RMOBILE
select SYS_SUPPORTS_SH_CMT
select SYS_SUPPORTS_SH_TMU
@@ -55,7 +57,8 @@ config ARCH_EMEV2
config ARCH_R7S72100
bool "RZ/A1H (R7S72100)"
- select PM_GENERIC_DOMAINS if PM
+ select PM
+ select PM_GENERIC_DOMAINS
select SYS_SUPPORTS_SH_MTU2
config ARCH_R8A73A4
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [GIT PULL v2] Renesas ARM Based SoC Updates for v4.6
2016-02-24 1:21 [GIT PULL v2] Renesas ARM Based SoC Updates for v4.6 Simon Horman
` (5 preceding siblings ...)
2016-02-24 1:21 ` [PATCH 6/6] ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains Simon Horman
@ 2016-02-26 21:41 ` Arnd Bergmann
6 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2016-02-26 21:41 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday 24 February 2016 10:21:25 Simon Horman wrote:
> Renesas ARM Based SoC Updates for v4.6
>
> * Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
> * Move emev2_smp_ops to emev2
> * Remove legacy map_io callbacks on r8a7740 and emev2 SoCs
> * Migrate to generic l2c OF initialization on r8a7740
>
Pulled into next/soc, thanks! I guess some of it could have been
part of the cleanup branch as well, but it seems fine either way.
Arnd
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-02-26 21:41 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-24 1:21 [GIT PULL v2] Renesas ARM Based SoC Updates for v4.6 Simon Horman
2016-02-24 1:21 ` [PATCH 1/6] ARM: shmobile: r8a7740: Migrate to generic l2c OF initialization Simon Horman
2016-02-24 1:21 ` [PATCH 2/6] ARM: shmobile: r8a7740: Remove mapping of L2 cache controller registers Simon Horman
2016-02-24 1:21 ` [PATCH 3/6] ARM: shmobile: r8a7740: Remove legacy machine_desc.map_io() callback Simon Horman
2016-02-24 1:21 ` [PATCH 4/6] ARM: shmobile: emev2: " Simon Horman
2016-02-24 1:21 ` [PATCH 5/6] ARM: shmobile: emev2: Move declaration of emev2_smp_ops to emev2.h Simon Horman
2016-02-24 1:21 ` [PATCH 6/6] ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains Simon Horman
2016-02-26 21:41 ` [GIT PULL v2] Renesas ARM Based SoC Updates for v4.6 Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox