2023-09-15 10:40:57

by Ulf Hansson

[permalink] [raw]
Subject: [PATCH v2 05/17] pmdomain: bcm: Move Kconfig options to the pmdomain subsystem

The Kconfig options belongs closer to the corresponding implementations,
hence let's move them from the soc subsystem to the pmdomain subsystem.

Cc: Florian Fainelli <[email protected]>
Cc: Ray Jui <[email protected]>
Cc: Scott Branden <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
---
drivers/pmdomain/Kconfig | 1 +
drivers/pmdomain/bcm/Kconfig | 46 ++++++++++++++++++++++++++++++++++++
drivers/soc/bcm/Kconfig | 42 --------------------------------
3 files changed, 47 insertions(+), 42 deletions(-)
create mode 100644 drivers/pmdomain/bcm/Kconfig

diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
index 482d9e970e14..ddc05d6af100 100644
--- a/drivers/pmdomain/Kconfig
+++ b/drivers/pmdomain/Kconfig
@@ -4,5 +4,6 @@ menu "PM Domains"
source "drivers/pmdomain/actions/Kconfig"
source "drivers/pmdomain/amlogic/Kconfig"
source "drivers/pmdomain/apple/Kconfig"
+source "drivers/pmdomain/bcm/Kconfig"

endmenu
diff --git a/drivers/pmdomain/bcm/Kconfig b/drivers/pmdomain/bcm/Kconfig
new file mode 100644
index 000000000000..9311e90b7707
--- /dev/null
+++ b/drivers/pmdomain/bcm/Kconfig
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-2.0-only
+menu "Broadcom PM Domains"
+
+config BCM2835_POWER
+ bool "BCM2835 power domain driver"
+ depends on ARCH_BCM2835 || (COMPILE_TEST && OF)
+ default y if ARCH_BCM2835
+ select PM_GENERIC_DOMAINS if PM
+ select RESET_CONTROLLER
+ help
+ This enables support for the BCM2835 power domains and reset
+ controller. Any usage of power domains by the Raspberry Pi
+ firmware means that Linux usage of the same power domain
+ must be accessed using the RASPBERRYPI_POWER driver
+
+config RASPBERRYPI_POWER
+ bool "Raspberry Pi power domain driver"
+ depends on ARCH_BCM2835 || (COMPILE_TEST && OF)
+ depends on RASPBERRYPI_FIRMWARE=y
+ select PM_GENERIC_DOMAINS if PM
+ help
+ This enables support for the RPi power domains which can be enabled
+ or disabled via the RPi firmware.
+
+config BCM_PMB
+ bool "Broadcom PMB (Power Management Bus) driver"
+ depends on ARCH_BCMBCA || (COMPILE_TEST && OF)
+ default ARCH_BCMBCA
+ select PM_GENERIC_DOMAINS if PM
+ help
+ This enables support for the Broadcom's PMB (Power Management Bus) that
+ is used for disabling and enabling SoC devices.
+
+if SOC_BCM63XX
+
+config BCM63XX_POWER
+ bool "BCM63xx power domain driver"
+ depends on BMIPS_GENERIC || (COMPILE_TEST && OF)
+ select PM_GENERIC_DOMAINS if PM
+ help
+ This enables support for the BCM63xx power domains controller on
+ BCM6318, BCM6328, BCM6362 and BCM63268 SoCs.
+
+endif # SOC_BCM63XX
+
+endmenu
diff --git a/drivers/soc/bcm/Kconfig b/drivers/soc/bcm/Kconfig
index f96906795fa6..406617aa3056 100644
--- a/drivers/soc/bcm/Kconfig
+++ b/drivers/soc/bcm/Kconfig
@@ -1,27 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
menu "Broadcom SoC drivers"

-config BCM2835_POWER
- bool "BCM2835 power domain driver"
- depends on ARCH_BCM2835 || (COMPILE_TEST && OF)
- default y if ARCH_BCM2835
- select PM_GENERIC_DOMAINS if PM
- select RESET_CONTROLLER
- help
- This enables support for the BCM2835 power domains and reset
- controller. Any usage of power domains by the Raspberry Pi
- firmware means that Linux usage of the same power domain
- must be accessed using the RASPBERRYPI_POWER driver
-
-config RASPBERRYPI_POWER
- bool "Raspberry Pi power domain driver"
- depends on ARCH_BCM2835 || (COMPILE_TEST && OF)
- depends on RASPBERRYPI_FIRMWARE=y
- select PM_GENERIC_DOMAINS if PM
- help
- This enables support for the RPi power domains which can be enabled
- or disabled via the RPi firmware.
-
config SOC_BCM63XX
bool "Broadcom 63xx SoC drivers"
depends on BMIPS_GENERIC || COMPILE_TEST
@@ -42,27 +21,6 @@ config SOC_BRCMSTB

If unsure, say N.

-config BCM_PMB
- bool "Broadcom PMB (Power Management Bus) driver"
- depends on ARCH_BCMBCA || (COMPILE_TEST && OF)
- default ARCH_BCMBCA
- select PM_GENERIC_DOMAINS if PM
- help
- This enables support for the Broadcom's PMB (Power Management Bus) that
- is used for disabling and enabling SoC devices.
-
-if SOC_BCM63XX
-
-config BCM63XX_POWER
- bool "BCM63xx power domain driver"
- depends on BMIPS_GENERIC || (COMPILE_TEST && OF)
- select PM_GENERIC_DOMAINS if PM
- help
- This enables support for the BCM63xx power domains controller on
- BCM6318, BCM6328, BCM6362 and BCM63268 SoCs.
-
-endif # SOC_BCM63XX
-
source "drivers/soc/bcm/brcmstb/Kconfig"

endmenu
--
2.34.1


2023-09-15 15:40:11

by Philippe Mathieu-Daudé

[permalink] [raw]
Subject: Re: [PATCH v2 05/17] pmdomain: bcm: Move Kconfig options to the pmdomain subsystem

On 15/9/23 11:19, Ulf Hansson wrote:
> The Kconfig options belongs closer to the corresponding implementations,
> hence let's move them from the soc subsystem to the pmdomain subsystem.
>
> Cc: Florian Fainelli <[email protected]>
> Cc: Ray Jui <[email protected]>
> Cc: Scott Branden <[email protected]>
> Cc: <[email protected]>
> Cc: <[email protected]>
> Signed-off-by: Ulf Hansson <[email protected]>
> ---
> drivers/pmdomain/Kconfig | 1 +
> drivers/pmdomain/bcm/Kconfig | 46 ++++++++++++++++++++++++++++++++++++
> drivers/soc/bcm/Kconfig | 42 --------------------------------
> 3 files changed, 47 insertions(+), 42 deletions(-)
> create mode 100644 drivers/pmdomain/bcm/Kconfig

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>

2023-09-15 17:46:21

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH v2 05/17] pmdomain: bcm: Move Kconfig options to the pmdomain subsystem

On 9/15/23 02:19, Ulf Hansson wrote:
> The Kconfig options belongs closer to the corresponding implementations,
> hence let's move them from the soc subsystem to the pmdomain subsystem.
>
> Cc: Florian Fainelli <[email protected]>
> Cc: Ray Jui <[email protected]>
> Cc: Scott Branden <[email protected]>
> Cc: <[email protected]>
> Cc: <[email protected]>
> Signed-off-by: Ulf Hansson <[email protected]>
> ---
> drivers/pmdomain/Kconfig | 1 +
> drivers/pmdomain/bcm/Kconfig | 46 ++++++++++++++++++++++++++++++++++++
> drivers/soc/bcm/Kconfig | 42 --------------------------------
> 3 files changed, 47 insertions(+), 42 deletions(-)
> create mode 100644 drivers/pmdomain/bcm/Kconfig
>
> diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
> index 482d9e970e14..ddc05d6af100 100644
> --- a/drivers/pmdomain/Kconfig
> +++ b/drivers/pmdomain/Kconfig
> @@ -4,5 +4,6 @@ menu "PM Domains"
> source "drivers/pmdomain/actions/Kconfig"
> source "drivers/pmdomain/amlogic/Kconfig"
> source "drivers/pmdomain/apple/Kconfig"
> +source "drivers/pmdomain/bcm/Kconfig"
>
> endmenu
> diff --git a/drivers/pmdomain/bcm/Kconfig b/drivers/pmdomain/bcm/Kconfig
> new file mode 100644
> index 000000000000..9311e90b7707
> --- /dev/null
> +++ b/drivers/pmdomain/bcm/Kconfig
> @@ -0,0 +1,46 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +menu "Broadcom PM Domains"
> +
> +config BCM2835_POWER
> + bool "BCM2835 power domain driver"
> + depends on ARCH_BCM2835 || (COMPILE_TEST && OF)
> + default y if ARCH_BCM2835
> + select PM_GENERIC_DOMAINS if PM
> + select RESET_CONTROLLER
> + help
> + This enables support for the BCM2835 power domains and reset
> + controller. Any usage of power domains by the Raspberry Pi
> + firmware means that Linux usage of the same power domain
> + must be accessed using the RASPBERRYPI_POWER driver
> +
> +config RASPBERRYPI_POWER
> + bool "Raspberry Pi power domain driver"
> + depends on ARCH_BCM2835 || (COMPILE_TEST && OF)
> + depends on RASPBERRYPI_FIRMWARE=y
> + select PM_GENERIC_DOMAINS if PM
> + help
> + This enables support for the RPi power domains which can be enabled
> + or disabled via the RPi firmware.
> +
> +config BCM_PMB
> + bool "Broadcom PMB (Power Management Bus) driver"
> + depends on ARCH_BCMBCA || (COMPILE_TEST && OF)
> + default ARCH_BCMBCA
> + select PM_GENERIC_DOMAINS if PM
> + help
> + This enables support for the Broadcom's PMB (Power Management Bus) that
> + is used for disabling and enabling SoC devices.
> +
> +if SOC_BCM63XX
> +
> +config BCM63XX_POWER
> + bool "BCM63xx power domain driver"
> + depends on BMIPS_GENERIC || (COMPILE_TEST && OF)
> + select PM_GENERIC_DOMAINS if PM
> + help
> + This enables support for the BCM63xx power domains controller on
> + BCM6318, BCM6328, BCM6362 and BCM63268 SoCs.
> +
> +endif # SOC_BCM63XX

That is confusing, SOC_BCM63XX remains defined in
drivers/soc/bcm/Kconfig, but we now made BCM63XX_POWER's visibility
conditional upon a Kconfig symbol defined elsewhere, I would just drop
the "if" condition completely.
--
Florian


Attachments:
smime.p7s (4.12 kB)
S/MIME Cryptographic Signature