* [PATCH 0/4] Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
@ 2016-02-16 15:31 ` Geert Uytterhoeven
0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2016-02-16 15:31 UTC (permalink / raw)
To: linux-arm-kernel
Hi Simon, Magnus,
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.
Patches:
- Patches 1 and 2 enable PM and PM_GENERIC_DOMAINS,
- Patch 3 removes the now unused legacy clock domain code for Renesas
ARM SoCs,
- Patch 4 relieves you from maintaining drivers/sh/, which is no
longer used on Renesas ARM SoCs, and returns it to the SuperH
people.
Notes:
- 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.
- Patch 3 does break booting R-Car Gen2 boards using pre-v4.3 DTSes
that don't have power-domains properties,
- Patch 3 may unbreak SuperH-based ARCH_SHMOBILE platforms, which were
probably broken since v4.4 by commit 0ba58de231066e47 ("drivers: sh:
Get rid of CONFIG_ARCH_SHMOBILE_MULTI"),
- Currently CONFIG_PM=n doesn't work anyway on r8a7795 as "drivers:
sh: Handle PM_GENERIC_DOMAINS_OF=n with new r8a7795 CPG/MSSR
driver" isn't upstream.
For your convenience, I've also pushed this series to
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git#topic/mandatory-pm-v1
Thanks for your comments!
Geert Uytterhoeven (4):
ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM
Domains
arm64: renesas: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM
Domains
drivers: sh: Stop using the legacy clock domain on ARM
MAINTAINERS: Drop drivers/sh/ for Renesas ARM
MAINTAINERS | 1 -
arch/arm/mach-shmobile/Kconfig | 13 ++++++++-----
arch/arm64/Kconfig.platforms | 3 ++-
drivers/Makefile | 1 -
drivers/sh/pm_runtime.c | 9 ---------
5 files changed, 10 insertions(+), 17 deletions(-)
--
1.9.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 0/4] Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
@ 2016-02-16 15:31 ` Geert Uytterhoeven
0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2016-02-16 15:31 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: linux-renesas-soc, linux-arm-kernel, linux-sh, linux-pm,
Geert Uytterhoeven
Hi Simon, Magnus,
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.
Patches:
- Patches 1 and 2 enable PM and PM_GENERIC_DOMAINS,
- Patch 3 removes the now unused legacy clock domain code for Renesas
ARM SoCs,
- Patch 4 relieves you from maintaining drivers/sh/, which is no
longer used on Renesas ARM SoCs, and returns it to the SuperH
people.
Notes:
- 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.
- Patch 3 does break booting R-Car Gen2 boards using pre-v4.3 DTSes
that don't have power-domains properties,
- Patch 3 may unbreak SuperH-based ARCH_SHMOBILE platforms, which were
probably broken since v4.4 by commit 0ba58de231066e47 ("drivers: sh:
Get rid of CONFIG_ARCH_SHMOBILE_MULTI"),
- Currently CONFIG_PM=n doesn't work anyway on r8a7795 as "drivers:
sh: Handle PM_GENERIC_DOMAINS_OF=n with new r8a7795 CPG/MSSR
driver" isn't upstream.
For your convenience, I've also pushed this series to
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git#topic/mandatory-pm-v1
Thanks for your comments!
Geert Uytterhoeven (4):
ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM
Domains
arm64: renesas: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM
Domains
drivers: sh: Stop using the legacy clock domain on ARM
MAINTAINERS: Drop drivers/sh/ for Renesas ARM
MAINTAINERS | 1 -
arch/arm/mach-shmobile/Kconfig | 13 ++++++++-----
arch/arm64/Kconfig.platforms | 3 ++-
drivers/Makefile | 1 -
drivers/sh/pm_runtime.c | 9 ---------
5 files changed, 10 insertions(+), 17 deletions(-)
--
1.9.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 0/4] Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
@ 2016-02-16 15:31 ` Geert Uytterhoeven
0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2016-02-16 15:31 UTC (permalink / raw)
To: linux-arm-kernel
Hi Simon, Magnus,
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.
Patches:
- Patches 1 and 2 enable PM and PM_GENERIC_DOMAINS,
- Patch 3 removes the now unused legacy clock domain code for Renesas
ARM SoCs,
- Patch 4 relieves you from maintaining drivers/sh/, which is no
longer used on Renesas ARM SoCs, and returns it to the SuperH
people.
Notes:
- 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.
- Patch 3 does break booting R-Car Gen2 boards using pre-v4.3 DTSes
that don't have power-domains properties,
- Patch 3 may unbreak SuperH-based ARCH_SHMOBILE platforms, which were
probably broken since v4.4 by commit 0ba58de231066e47 ("drivers: sh:
Get rid of CONFIG_ARCH_SHMOBILE_MULTI"),
- Currently CONFIG_PM=n doesn't work anyway on r8a7795 as "drivers:
sh: Handle PM_GENERIC_DOMAINS_OF=n with new r8a7795 CPG/MSSR
driver" isn't upstream.
For your convenience, I've also pushed this series to
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git#topic/mandatory-pm-v1
Thanks for your comments!
Geert Uytterhoeven (4):
ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM
Domains
arm64: renesas: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM
Domains
drivers: sh: Stop using the legacy clock domain on ARM
MAINTAINERS: Drop drivers/sh/ for Renesas ARM
MAINTAINERS | 1 -
arch/arm/mach-shmobile/Kconfig | 13 ++++++++-----
arch/arm64/Kconfig.platforms | 3 ++-
drivers/Makefile | 1 -
drivers/sh/pm_runtime.c | 9 ---------
5 files changed, 10 insertions(+), 17 deletions(-)
--
1.9.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/4] ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
2016-02-16 15:31 ` Geert Uytterhoeven
@ 2016-02-16 15:31 ` Geert Uytterhoeven
-1 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2016-02-16 15:31 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: linux-renesas-soc, linux-arm-kernel, linux-sh, linux-pm,
Geert Uytterhoeven
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>
---
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 cd5f171f83ce6420..2824b81f1a392d87 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
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 1/4] ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
@ 2016-02-16 15:31 ` Geert Uytterhoeven
0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2016-02-16 15:31 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: linux-renesas-soc, linux-arm-kernel, linux-sh, linux-pm,
Geert Uytterhoeven
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>
---
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 cd5f171f83ce6420..2824b81f1a392d87 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
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/4] arm64: renesas: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
2016-02-16 15:31 ` Geert Uytterhoeven
@ 2016-02-16 15:31 ` Geert Uytterhoeven
-1 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2016-02-16 15:31 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: linux-renesas-soc, linux-arm-kernel, linux-sh, linux-pm,
Geert Uytterhoeven
All supported Renesas ARM64 SoCs have clock and 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.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm64/Kconfig.platforms | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 21074f674bdeb707..2c0caac053e8c12a 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -76,7 +76,8 @@ config ARCH_RENESAS
bool "Renesas SoC Platforms"
select ARCH_SHMOBILE
select PINCTRL
- select PM_GENERIC_DOMAINS if PM
+ select PM
+ select PM_GENERIC_DOMAINS
help
This enables support for the ARMv8 based Renesas SoCs.
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/4] arm64: renesas: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
@ 2016-02-16 15:31 ` Geert Uytterhoeven
0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2016-02-16 15:31 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: linux-renesas-soc, linux-arm-kernel, linux-sh, linux-pm,
Geert Uytterhoeven
All supported Renesas ARM64 SoCs have clock and 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.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm64/Kconfig.platforms | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 21074f674bdeb707..2c0caac053e8c12a 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -76,7 +76,8 @@ config ARCH_RENESAS
bool "Renesas SoC Platforms"
select ARCH_SHMOBILE
select PINCTRL
- select PM_GENERIC_DOMAINS if PM
+ select PM
+ select PM_GENERIC_DOMAINS
help
This enables support for the ARMv8 based Renesas SoCs.
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/4] drivers: sh: Stop using the legacy clock domain on ARM
2016-02-16 15:31 ` Geert Uytterhoeven
(?)
@ 2016-02-16 15:31 ` Geert Uytterhoeven
-1 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2016-02-16 15:31 UTC (permalink / raw)
To: linux-arm-kernel
Now CONFIG_PM and CONFIG_PM_GENERIC_DOMAINS are enabled unconditionally
for Renesas ARM-based SoCs, the legacy clock domain is no longer used on
these SoCs.
Remove the related support code, and stop entering drivers/sh/ on ARM.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Notes:
- This does break booting R-Car Gen2 boards using pre-v4.3 DTSes that
don't have power-domains properties,
- This may unbreak SuperH-based ARCH_SHMOBILE platforms, which were
probably broken since v4.4 by commit 0ba58de231066e47 ("drivers: sh:
Get rid of CONFIG_ARCH_SHMOBILE_MULTI").
---
drivers/Makefile | 1 -
drivers/sh/pm_runtime.c | 9 ---------
2 files changed, 10 deletions(-)
diff --git a/drivers/Makefile b/drivers/Makefile
index 8f5d076baeb0e832..6afdb78e21382538 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -127,7 +127,6 @@ obj-$(CONFIG_SGI_SN) += sn/
obj-y += firmware/
obj-$(CONFIG_CRYPTO) += crypto/
obj-$(CONFIG_SUPERH) += sh/
-obj-$(CONFIG_ARCH_SHMOBILE) += sh/
ifndef CONFIG_ARCH_USES_GETTIMEOFFSET
obj-y += clocksource/
endif
diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c
index 91a003011acfacb2..c887ecdaf19b7c10 100644
--- a/drivers/sh/pm_runtime.c
+++ b/drivers/sh/pm_runtime.c
@@ -34,15 +34,6 @@ static struct pm_clk_notifier_block platform_bus_notifier = {
static int __init sh_pm_runtime_init(void)
{
- if (IS_ENABLED(CONFIG_ARCH_SHMOBILE)) {
- if (!of_find_compatible_node(NULL, NULL,
- "renesas,cpg-mstp-clocks"))
- return 0;
- if (IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS_OF) &&
- of_find_node_with_property(NULL, "#power-domain-cells"))
- return 0;
- }
-
pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/4] drivers: sh: Stop using the legacy clock domain on ARM
@ 2016-02-16 15:31 ` Geert Uytterhoeven
0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2016-02-16 15:31 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: linux-renesas-soc, linux-pm, Geert Uytterhoeven,
linux-arm-kernel, linux-sh
Now CONFIG_PM and CONFIG_PM_GENERIC_DOMAINS are enabled unconditionally
for Renesas ARM-based SoCs, the legacy clock domain is no longer used on
these SoCs.
Remove the related support code, and stop entering drivers/sh/ on ARM.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Notes:
- This does break booting R-Car Gen2 boards using pre-v4.3 DTSes that
don't have power-domains properties,
- This may unbreak SuperH-based ARCH_SHMOBILE platforms, which were
probably broken since v4.4 by commit 0ba58de231066e47 ("drivers: sh:
Get rid of CONFIG_ARCH_SHMOBILE_MULTI").
---
drivers/Makefile | 1 -
drivers/sh/pm_runtime.c | 9 ---------
2 files changed, 10 deletions(-)
diff --git a/drivers/Makefile b/drivers/Makefile
index 8f5d076baeb0e832..6afdb78e21382538 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -127,7 +127,6 @@ obj-$(CONFIG_SGI_SN) += sn/
obj-y += firmware/
obj-$(CONFIG_CRYPTO) += crypto/
obj-$(CONFIG_SUPERH) += sh/
-obj-$(CONFIG_ARCH_SHMOBILE) += sh/
ifndef CONFIG_ARCH_USES_GETTIMEOFFSET
obj-y += clocksource/
endif
diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c
index 91a003011acfacb2..c887ecdaf19b7c10 100644
--- a/drivers/sh/pm_runtime.c
+++ b/drivers/sh/pm_runtime.c
@@ -34,15 +34,6 @@ static struct pm_clk_notifier_block platform_bus_notifier = {
static int __init sh_pm_runtime_init(void)
{
- if (IS_ENABLED(CONFIG_ARCH_SHMOBILE)) {
- if (!of_find_compatible_node(NULL, NULL,
- "renesas,cpg-mstp-clocks"))
- return 0;
- if (IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS_OF) &&
- of_find_node_with_property(NULL, "#power-domain-cells"))
- return 0;
- }
-
pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/4] drivers: sh: Stop using the legacy clock domain on ARM
@ 2016-02-16 15:31 ` Geert Uytterhoeven
0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2016-02-16 15:31 UTC (permalink / raw)
To: linux-arm-kernel
Now CONFIG_PM and CONFIG_PM_GENERIC_DOMAINS are enabled unconditionally
for Renesas ARM-based SoCs, the legacy clock domain is no longer used on
these SoCs.
Remove the related support code, and stop entering drivers/sh/ on ARM.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Notes:
- This does break booting R-Car Gen2 boards using pre-v4.3 DTSes that
don't have power-domains properties,
- This may unbreak SuperH-based ARCH_SHMOBILE platforms, which were
probably broken since v4.4 by commit 0ba58de231066e47 ("drivers: sh:
Get rid of CONFIG_ARCH_SHMOBILE_MULTI").
---
drivers/Makefile | 1 -
drivers/sh/pm_runtime.c | 9 ---------
2 files changed, 10 deletions(-)
diff --git a/drivers/Makefile b/drivers/Makefile
index 8f5d076baeb0e832..6afdb78e21382538 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -127,7 +127,6 @@ obj-$(CONFIG_SGI_SN) += sn/
obj-y += firmware/
obj-$(CONFIG_CRYPTO) += crypto/
obj-$(CONFIG_SUPERH) += sh/
-obj-$(CONFIG_ARCH_SHMOBILE) += sh/
ifndef CONFIG_ARCH_USES_GETTIMEOFFSET
obj-y += clocksource/
endif
diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c
index 91a003011acfacb2..c887ecdaf19b7c10 100644
--- a/drivers/sh/pm_runtime.c
+++ b/drivers/sh/pm_runtime.c
@@ -34,15 +34,6 @@ static struct pm_clk_notifier_block platform_bus_notifier = {
static int __init sh_pm_runtime_init(void)
{
- if (IS_ENABLED(CONFIG_ARCH_SHMOBILE)) {
- if (!of_find_compatible_node(NULL, NULL,
- "renesas,cpg-mstp-clocks"))
- return 0;
- if (IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS_OF) &&
- of_find_node_with_property(NULL, "#power-domain-cells"))
- return 0;
- }
-
pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/4] MAINTAINERS: Drop drivers/sh/ for Renesas ARM
2016-02-16 15:31 ` Geert Uytterhoeven
@ 2016-02-16 15:31 ` Geert Uytterhoeven
-1 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2016-02-16 15:31 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: linux-renesas-soc, linux-arm-kernel, linux-sh, linux-pm,
Geert Uytterhoeven
None of the code under drivers/sh/ is used anymore on Renesas ARM.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
MAINTAINERS | 1 -
1 file changed, 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index cc2f753cb357a067..a1d03cb4cab49fae 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1558,7 +1558,6 @@ F: arch/arm/boot/dts/sh*
F: arch/arm/configs/shmobile_defconfig
F: arch/arm/include/debug/renesas-scif.S
F: arch/arm/mach-shmobile/
-F: drivers/sh/
ARM/SOCFPGA ARCHITECTURE
M: Dinh Nguyen <dinguyen@opensource.altera.com>
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/4] MAINTAINERS: Drop drivers/sh/ for Renesas ARM
@ 2016-02-16 15:31 ` Geert Uytterhoeven
0 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2016-02-16 15:31 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: linux-renesas-soc, linux-arm-kernel, linux-sh, linux-pm,
Geert Uytterhoeven
None of the code under drivers/sh/ is used anymore on Renesas ARM.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
MAINTAINERS | 1 -
1 file changed, 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index cc2f753cb357a067..a1d03cb4cab49fae 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1558,7 +1558,6 @@ F: arch/arm/boot/dts/sh*
F: arch/arm/configs/shmobile_defconfig
F: arch/arm/include/debug/renesas-scif.S
F: arch/arm/mach-shmobile/
-F: drivers/sh/
ARM/SOCFPGA ARCHITECTURE
M: Dinh Nguyen <dinguyen@opensource.altera.com>
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 0/4] Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
2016-02-16 15:31 ` Geert Uytterhoeven
(?)
@ 2016-02-17 12:18 ` Simon Horman
-1 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2016-02-17 12:18 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Feb 16, 2016 at 04:31:48PM +0100, Geert Uytterhoeven wrote:
> Hi Simon, Magnus,
>
> 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.
>
> Patches:
> - Patches 1 and 2 enable PM and PM_GENERIC_DOMAINS,
> - Patch 3 removes the now unused legacy clock domain code for Renesas
> ARM SoCs,
> - Patch 4 relieves you from maintaining drivers/sh/, which is no
> longer used on Renesas ARM SoCs, and returns it to the SuperH
> people.
>
> Notes:
> - 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.
> - Patch 3 does break booting R-Car Gen2 boards using pre-v4.3 DTSes
> that don't have power-domains properties,
> - Patch 3 may unbreak SuperH-based ARCH_SHMOBILE platforms, which were
> probably broken since v4.4 by commit 0ba58de231066e47 ("drivers: sh:
> Get rid of CONFIG_ARCH_SHMOBILE_MULTI"),
> - Currently CONFIG_PM=n doesn't work anyway on r8a7795 as "drivers:
> sh: Handle PM_GENERIC_DOMAINS_OF=n with new r8a7795 CPG/MSSR
> driver" isn't upstream.
>
> For your convenience, I've also pushed this series to
> git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git#topic/mandatory-pm-v1
>
> Thanks for your comments!
>
> Geert Uytterhoeven (4):
> ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM
> Domains
> arm64: renesas: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM
> Domains
Thanks, I have tentatively queued up the above two patches for v4.6.
With regards to the remaining two patches, I propose deferring them
for a few releases so that we can shake out any regressions that
may occur before making a compatibility change.
> drivers: sh: Stop using the legacy clock domain on ARM
> MAINTAINERS: Drop drivers/sh/ for Renesas ARM
>
> MAINTAINERS | 1 -
> arch/arm/mach-shmobile/Kconfig | 13 ++++++++-----
> arch/arm64/Kconfig.platforms | 3 ++-
> drivers/Makefile | 1 -
> drivers/sh/pm_runtime.c | 9 ---------
> 5 files changed, 10 insertions(+), 17 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 0/4] Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
@ 2016-02-17 12:18 ` Simon Horman
0 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2016-02-17 12:18 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Magnus Damm, linux-renesas-soc, linux-arm-kernel, linux-sh, linux-pm
On Tue, Feb 16, 2016 at 04:31:48PM +0100, Geert Uytterhoeven wrote:
> Hi Simon, Magnus,
>
> 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.
>
> Patches:
> - Patches 1 and 2 enable PM and PM_GENERIC_DOMAINS,
> - Patch 3 removes the now unused legacy clock domain code for Renesas
> ARM SoCs,
> - Patch 4 relieves you from maintaining drivers/sh/, which is no
> longer used on Renesas ARM SoCs, and returns it to the SuperH
> people.
>
> Notes:
> - 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.
> - Patch 3 does break booting R-Car Gen2 boards using pre-v4.3 DTSes
> that don't have power-domains properties,
> - Patch 3 may unbreak SuperH-based ARCH_SHMOBILE platforms, which were
> probably broken since v4.4 by commit 0ba58de231066e47 ("drivers: sh:
> Get rid of CONFIG_ARCH_SHMOBILE_MULTI"),
> - Currently CONFIG_PM=n doesn't work anyway on r8a7795 as "drivers:
> sh: Handle PM_GENERIC_DOMAINS_OF=n with new r8a7795 CPG/MSSR
> driver" isn't upstream.
>
> For your convenience, I've also pushed this series to
> git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git#topic/mandatory-pm-v1
>
> Thanks for your comments!
>
> Geert Uytterhoeven (4):
> ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM
> Domains
> arm64: renesas: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM
> Domains
Thanks, I have tentatively queued up the above two patches for v4.6.
With regards to the remaining two patches, I propose deferring them
for a few releases so that we can shake out any regressions that
may occur before making a compatibility change.
> drivers: sh: Stop using the legacy clock domain on ARM
> MAINTAINERS: Drop drivers/sh/ for Renesas ARM
>
> MAINTAINERS | 1 -
> arch/arm/mach-shmobile/Kconfig | 13 ++++++++-----
> arch/arm64/Kconfig.platforms | 3 ++-
> drivers/Makefile | 1 -
> drivers/sh/pm_runtime.c | 9 ---------
> 5 files changed, 10 insertions(+), 17 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 0/4] Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains
@ 2016-02-17 12:18 ` Simon Horman
0 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2016-02-17 12:18 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Feb 16, 2016 at 04:31:48PM +0100, Geert Uytterhoeven wrote:
> Hi Simon, Magnus,
>
> 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.
>
> Patches:
> - Patches 1 and 2 enable PM and PM_GENERIC_DOMAINS,
> - Patch 3 removes the now unused legacy clock domain code for Renesas
> ARM SoCs,
> - Patch 4 relieves you from maintaining drivers/sh/, which is no
> longer used on Renesas ARM SoCs, and returns it to the SuperH
> people.
>
> Notes:
> - 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.
> - Patch 3 does break booting R-Car Gen2 boards using pre-v4.3 DTSes
> that don't have power-domains properties,
> - Patch 3 may unbreak SuperH-based ARCH_SHMOBILE platforms, which were
> probably broken since v4.4 by commit 0ba58de231066e47 ("drivers: sh:
> Get rid of CONFIG_ARCH_SHMOBILE_MULTI"),
> - Currently CONFIG_PM=n doesn't work anyway on r8a7795 as "drivers:
> sh: Handle PM_GENERIC_DOMAINS_OF=n with new r8a7795 CPG/MSSR
> driver" isn't upstream.
>
> For your convenience, I've also pushed this series to
> git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git#topic/mandatory-pm-v1
>
> Thanks for your comments!
>
> Geert Uytterhoeven (4):
> ARM: shmobile: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM
> Domains
> arm64: renesas: Enable PM and PM_GENERIC_DOMAINS for SoCs with PM
> Domains
Thanks, I have tentatively queued up the above two patches for v4.6.
With regards to the remaining two patches, I propose deferring them
for a few releases so that we can shake out any regressions that
may occur before making a compatibility change.
> drivers: sh: Stop using the legacy clock domain on ARM
> MAINTAINERS: Drop drivers/sh/ for Renesas ARM
>
> MAINTAINERS | 1 -
> arch/arm/mach-shmobile/Kconfig | 13 ++++++++-----
> arch/arm64/Kconfig.platforms | 3 ++-
> drivers/Makefile | 1 -
> drivers/sh/pm_runtime.c | 9 ---------
> 5 files changed, 10 insertions(+), 17 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2016-02-17 12:18 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-16 15:31 [PATCH 0/4] Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains Geert Uytterhoeven
2016-02-16 15:31 ` Geert Uytterhoeven
2016-02-16 15:31 ` Geert Uytterhoeven
2016-02-16 15:31 ` [PATCH 1/4] ARM: shmobile: " Geert Uytterhoeven
2016-02-16 15:31 ` Geert Uytterhoeven
2016-02-16 15:31 ` [PATCH 2/4] arm64: renesas: " Geert Uytterhoeven
2016-02-16 15:31 ` Geert Uytterhoeven
2016-02-16 15:31 ` [PATCH 3/4] drivers: sh: Stop using the legacy clock domain on ARM Geert Uytterhoeven
2016-02-16 15:31 ` Geert Uytterhoeven
2016-02-16 15:31 ` Geert Uytterhoeven
2016-02-16 15:31 ` [PATCH 4/4] MAINTAINERS: Drop drivers/sh/ for Renesas ARM Geert Uytterhoeven
2016-02-16 15:31 ` Geert Uytterhoeven
2016-02-17 12:18 ` [PATCH 0/4] Enable PM and PM_GENERIC_DOMAINS for SoCs with PM Domains Simon Horman
2016-02-17 12:18 ` Simon Horman
2016-02-17 12:18 ` Simon Horman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.