Skip to contentSkip to conversation

clk: iproc: Make clocks visible options

PATCH Superseded Jon Mason 4 participants 6 messages Oct 22, 2015 – Oct 28, 2015

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jon Mason

author
#0 lore raw

PATCH 1/1 clk: iproc: Make clocks visible options

Make the clocks visible options that can be selected by anyone. This avoids the problems of:
1) Select is a reverse dependency and is hard for people to understand and can sometimes be a pain to track down
2) Build coverage goes down because configs are hidden
3) Code bloat

Patch suggested by Stephen Boyd

---
 arch/arm/mach-bcm/Kconfig |  1 -
 drivers/clk/bcm/Kconfig   | 35 ++++++++++++++++++++++++++++++++++-
 drivers/clk/bcm/Makefile  |  7 +++----
 3 files changed, 37 insertions(+), 6 deletions(-)
arch/arm/mach-bcm/Kconfig +0 -1
index 679798b..cacaaec 100644
@@ -14,7 +14,6 @@ config ARCH_BCM_IPROC
 	select HAVE_ARM_SCU if SMP
 	select HAVE_ARM_TWD if SMP
 	select ARM_GLOBAL_TIMER
-	select COMMON_CLK_IPROC
 	select CLKSRC_MMIO
 	select ARCH_REQUIRE_GPIOLIB
 	select ARM_AMBA
drivers/clk/bcm/Kconfig +34 -1
index 46ee475..0352ccf 100644
@@ -9,8 +9,41 @@ config CLK_BCM_KONA
 	  in the BCM281xx and BCM21664 families.
 
 config COMMON_CLK_IPROC
-	bool
+	bool "Broadcom iProc clock support"
+	depends on ARCH_BCM_IPROC
 	depends on COMMON_CLK
+	default ARCH_BCM_IPROC
 	help
 	  Enable common clock framework support for Broadcom SoCs
 	  based on the iProc architecture
+
+if COMMON_CLK_IPROC
+
+comment "Broadcom iProc clocks"
+
+config CLK_BCM_CYGNUS
+	bool "Broadcom Cygnus clock support"
+	depends on COMMON_CLK_IPROC
+	depends on ARCH_BCM_CYGNUS
+	default ARCH_BCM_CYGNUS
+	help
+	  Enable common clock framework support for the Broadcom Cygnus SoC
+
+config CLK_BCM_NSP
+	bool "Broadcom Northstar/Northstar Plus clock support"
+	depends on COMMON_CLK_IPROC
+	depends on ARCH_BCM_5301X || ARCH_BCM_NSP
+	default ARCH_BCM_5301X || ARCH_BCM_NSP
+	help
+	  Enable common clock framework support for the Broadcom Northstar and
+	  Northstar Plus SoCs
+
+config CLK_BCM_NS2
+	bool "Broadcom Northstar 2 clock support"
+	depends on ARM64
+	depends on COMMON_CLK_IPROC
+	default ARCH_BCM_IPROC
+	help
+	  Enable common clock framework support for the Broadcom Northstar 2 SoC
+
+endif
drivers/clk/bcm/Makefile +3 -4
index 2d1cbc5..05d5830 100644
@@ -3,7 +3,6 @@ obj-$(CONFIG_CLK_BCM_KONA)	+= clk-kona-setup.o
 obj-$(CONFIG_CLK_BCM_KONA)	+= clk-bcm281xx.o
 obj-$(CONFIG_CLK_BCM_KONA)	+= clk-bcm21664.o
 obj-$(CONFIG_COMMON_CLK_IPROC)	+= clk-iproc-armpll.o clk-iproc-pll.o clk-iproc-asiu.o
-obj-$(CONFIG_COMMON_CLK_IPROC)	+= clk-ns2.o
-obj-$(CONFIG_ARCH_BCM_CYGNUS)	+= clk-cygnus.o
-obj-$(CONFIG_ARCH_BCM_NSP)	+= clk-nsp.o
-obj-$(CONFIG_ARCH_BCM_5301X)	+= clk-nsp.o
+obj-$(CONFIG_CLK_BCM_CYGNUS)	+= clk-cygnus.o
+obj-$(CONFIG_CLK_BCM_NSP)	+= clk-nsp.o
+obj-$(CONFIG_CLK_BCM_NS2)	+= clk-ns2.o
Signature · 1 line
1.9.1
maintainer
#1 lore raw

Hi Jon,

comments inline.

Quoted 4 lines · Jon Mason

Make the clocks visible options that can be selected by anyone. This avoids the problems of:
1) Select is a reverse dependency and is hard for people to understand and can sometimes be a pain to track down

This doesn't make any sense to me - there are many selects in the system and this is one of them.

Quoted 17 lines

2) Build coverage goes down because configs are hidden
3) Code bloat

Patch suggested by Stephen Boyd

---
  arch/arm/mach-bcm/Kconfig |  1 -
  drivers/clk/bcm/Kconfig   | 35 ++++++++++++++++++++++++++++++++++-
  drivers/clk/bcm/Makefile  |  7 +++----
  3 files changed, 37 insertions(+), 6 deletions(-)
arch/arm/mach-bcm/Kconfig +0 -0
index 679798b..cacaaec 100644

arch/arm/mach-bcm/Kconfig config ARCH_BCM_IPROC · line 17

Quoted 4 lines
arch/arm/mach-bcm/Kconfig +0 -1
@@ -14,7 +14,6 @@ config ARCH_BCM_IPROC
  	select HAVE_ARM_SCU if SMP
  	select HAVE_ARM_TWD if SMP
  	select ARM_GLOBAL_TIMER
-	select COMMON_CLK_IPROC

Please leave as is

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 12

Quoted 13 lines
arch/arm/mach-bcm/Kconfig +0 -0
  	select CLKSRC_MMIO
  	select ARCH_REQUIRE_GPIOLIB
  	select ARM_AMBA
drivers/clk/bcm/Kconfig +1 -1
index 46ee475..0352ccf 100644
@@ -9,8 +9,41 @@ config CLK_BCM_KONA
  	  in the BCM281xx and BCM21664 families.
 
  config COMMON_CLK_IPROC
-	bool
+	bool "Broadcom iProc clock support"

Please leave as is

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 24

Quoted 12 lines
drivers/clk/bcm/Kconfig +8 -0
+	depends on ARCH_BCM_IPROC
  	depends on COMMON_CLK
+	default ARCH_BCM_IPROC
  	help
  	  Enable common clock framework support for Broadcom SoCs
  	  based on the iProc architecture
+
+if COMMON_CLK_IPROC
+
+comment "Broadcom iProc clocks"
+
+config CLK_BCM_CYGNUS

not needed

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 32

Quoted 8 lines
drivers/clk/bcm/Kconfig +8 -0
+	bool "Broadcom Cygnus clock support"
+	depends on COMMON_CLK_IPROC
+	depends on ARCH_BCM_CYGNUS
+	default ARCH_BCM_CYGNUS
+	help
+	  Enable common clock framework support for the Broadcom Cygnus SoC
+
+config CLK_BCM_NSP

not needed

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 43

Quoted 11 lines
drivers/clk/bcm/Kconfig +11 -0
+	bool "Broadcom Northstar/Northstar Plus clock support"
+	depends on COMMON_CLK_IPROC
+	depends on ARCH_BCM_5301X || ARCH_BCM_NSP
+	default ARCH_BCM_5301X || ARCH_BCM_NSP
+	help
+	  Enable common clock framework support for the Broadcom Northstar and
+	  Northstar Plus SoCs
+
+config CLK_BCM_NS2
+	bool "Broadcom Northstar 2 clock support"
+	depends on ARM64

|| COMPILE_TEST

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 44

Quoted 1 line
drivers/clk/bcm/Kconfig +1 -0
+	depends on COMMON_CLK_IPROC

select COMMON_CLK_IPROC

Quoted 10 lines
drivers/clk/bcm/Kconfig +5 -0
+	default ARCH_BCM_IPROC
+	help
+	  Enable common clock framework support for the Broadcom Northstar 2 SoC
+
+endif
drivers/clk/bcm/Makefile +0 -0
index 2d1cbc5..05d5830 100644

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 6

Quoted 4 lines
drivers/clk/bcm/Makefile +0 -1
@@ -3,7 +3,6 @@ obj-$(CONFIG_CLK_BCM_KONA)	+= clk-kona-setup.o
  obj-$(CONFIG_CLK_BCM_KONA)	+= clk-bcm281xx.o
  obj-$(CONFIG_CLK_BCM_KONA)	+= clk-bcm21664.o
  obj-$(CONFIG_COMMON_CLK_IPROC)	+= clk-iproc-armpll.o clk-iproc-pll.o clk-iproc-asiu.o
-obj-$(CONFIG_COMMON_CLK_IPROC)	+= clk-ns2.o

yes, change this one

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 7

Quoted 1 line
drivers/clk/bcm/Makefile +0 -1
-obj-$(CONFIG_ARCH_BCM_CYGNUS)	+= clk-cygnus.o

you can leave this

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 8

Quoted 1 line
drivers/clk/bcm/Makefile +0 -1
-obj-$(CONFIG_ARCH_BCM_NSP)	+= clk-nsp.o

you can leave this

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 9

Quoted 1 line
drivers/clk/bcm/Makefile +0 -1
-obj-$(CONFIG_ARCH_BCM_5301X)	+= clk-nsp.o

and this

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 6

Quoted 1 line
drivers/clk/bcm/Makefile +1 -0
+obj-$(CONFIG_CLK_BCM_CYGNUS)	+= clk-cygnus.o

no

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 7

Quoted 1 line
drivers/clk/bcm/Makefile +1 -0
+obj-$(CONFIG_CLK_BCM_NSP)	+= clk-nsp.o

no

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 8

Quoted 1 line
drivers/clk/bcm/Makefile +1 -0
+obj-$(CONFIG_CLK_BCM_NS2)	+= clk-ns2.o

yes needed

Quoted 1 line
author
#2 lore raw
Quoted 11 lines · Scott Branden

Hi Jon,

comments inline.

Quoted 4 lines · Jon Mason

Make the clocks visible options that can be selected by anyone. This avoids the problems of:
1) Select is a reverse dependency and is hard for people to understand and can sometimes be a pain to track down

This doesn't make any sense to me - there are many selects in the system and this is one of them.

This was specifically requested by Stephen Boyd, and the above are his words verbatum
https://lkml.org/lkml/2015/10/21/956

Thanks,
Jon

Quoted 101 lines
Quoted 17 lines

2) Build coverage goes down because configs are hidden
3) Code bloat

Patch suggested by Stephen Boyd

---
 arch/arm/mach-bcm/Kconfig |  1 -
 drivers/clk/bcm/Kconfig   | 35 ++++++++++++++++++++++++++++++++++-
 drivers/clk/bcm/Makefile  |  7 +++----
 3 files changed, 37 insertions(+), 6 deletions(-)
arch/arm/mach-bcm/Kconfig +0 -0
index 679798b..cacaaec 100644

arch/arm/mach-bcm/Kconfig config ARCH_BCM_IPROC · line 17

Quoted 4 lines
arch/arm/mach-bcm/Kconfig +0 -1
@@ -14,7 +14,6 @@ config ARCH_BCM_IPROC
 	select HAVE_ARM_SCU if SMP
 	select HAVE_ARM_TWD if SMP
 	select ARM_GLOBAL_TIMER
-	select COMMON_CLK_IPROC

Please leave as is

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 12

Quoted 13 lines
arch/arm/mach-bcm/Kconfig +0 -0
 	select CLKSRC_MMIO
 	select ARCH_REQUIRE_GPIOLIB
 	select ARM_AMBA
drivers/clk/bcm/Kconfig +1 -1
index 46ee475..0352ccf 100644
@@ -9,8 +9,41 @@ config CLK_BCM_KONA
 	  in the BCM281xx and BCM21664 families.
 
 config COMMON_CLK_IPROC
-	bool
+	bool "Broadcom iProc clock support"

Please leave as is

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 24

Quoted 12 lines
drivers/clk/bcm/Kconfig +8 -0
+	depends on ARCH_BCM_IPROC
 	depends on COMMON_CLK
+	default ARCH_BCM_IPROC
 	help
 	  Enable common clock framework support for Broadcom SoCs
 	  based on the iProc architecture
+
+if COMMON_CLK_IPROC
+
+comment "Broadcom iProc clocks"
+
+config CLK_BCM_CYGNUS

not needed

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 32

Quoted 8 lines
drivers/clk/bcm/Kconfig +8 -0
+	bool "Broadcom Cygnus clock support"
+	depends on COMMON_CLK_IPROC
+	depends on ARCH_BCM_CYGNUS
+	default ARCH_BCM_CYGNUS
+	help
+	  Enable common clock framework support for the Broadcom Cygnus SoC
+
+config CLK_BCM_NSP

not needed

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 43

Quoted 11 lines
drivers/clk/bcm/Kconfig +11 -0
+	bool "Broadcom Northstar/Northstar Plus clock support"
+	depends on COMMON_CLK_IPROC
+	depends on ARCH_BCM_5301X || ARCH_BCM_NSP
+	default ARCH_BCM_5301X || ARCH_BCM_NSP
+	help
+	  Enable common clock framework support for the Broadcom Northstar and
+	  Northstar Plus SoCs
+
+config CLK_BCM_NS2
+	bool "Broadcom Northstar 2 clock support"
+	depends on ARM64

|| COMPILE_TEST

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 44

Quoted 1 line
drivers/clk/bcm/Kconfig +1 -0
+	depends on COMMON_CLK_IPROC

select COMMON_CLK_IPROC

Quoted 10 lines
drivers/clk/bcm/Kconfig +5 -0
+	default ARCH_BCM_IPROC
+	help
+	  Enable common clock framework support for the Broadcom Northstar 2 SoC
+
+endif
drivers/clk/bcm/Makefile +0 -0
index 2d1cbc5..05d5830 100644

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 6

Quoted 4 lines
drivers/clk/bcm/Makefile +0 -1
@@ -3,7 +3,6 @@ obj-$(CONFIG_CLK_BCM_KONA)	+= clk-kona-setup.o
 obj-$(CONFIG_CLK_BCM_KONA)	+= clk-bcm281xx.o
 obj-$(CONFIG_CLK_BCM_KONA)	+= clk-bcm21664.o
 obj-$(CONFIG_COMMON_CLK_IPROC)	+= clk-iproc-armpll.o clk-iproc-pll.o clk-iproc-asiu.o
-obj-$(CONFIG_COMMON_CLK_IPROC)	+= clk-ns2.o

yes, change this one

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 7

Quoted 1 line
drivers/clk/bcm/Makefile +0 -1
-obj-$(CONFIG_ARCH_BCM_CYGNUS)	+= clk-cygnus.o

you can leave this

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 8

Quoted 1 line
drivers/clk/bcm/Makefile +0 -1
-obj-$(CONFIG_ARCH_BCM_NSP)	+= clk-nsp.o

you can leave this

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 9

Quoted 1 line
drivers/clk/bcm/Makefile +0 -1
-obj-$(CONFIG_ARCH_BCM_5301X)	+= clk-nsp.o

and this

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 6

Quoted 1 line
drivers/clk/bcm/Makefile +1 -0
+obj-$(CONFIG_CLK_BCM_CYGNUS)	+= clk-cygnus.o

no

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 7

Quoted 1 line
drivers/clk/bcm/Makefile +1 -0
+obj-$(CONFIG_CLK_BCM_NSP)	+= clk-nsp.o

no

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 8

Quoted 1 line
drivers/clk/bcm/Makefile +1 -0
+obj-$(CONFIG_CLK_BCM_NS2)	+= clk-ns2.o

yes needed

Quoted 1 line
#3 lore raw
Quoted 10 lines · Jon Mason
Quoted 9 lines · Scott Branden

Hi Jon,

comments inline.

Quoted 4 lines · Jon Mason

Make the clocks visible options that can be selected by anyone. This avoids the problems of:
1) Select is a reverse dependency and is hard for people to understand and can sometimes be a pain to track down

Quoted 6 lines
Quoted 2 lines

This doesn't make any sense to me - there are many selects in the system and this is one of them.

This was specifically requested by Stephen Boyd, and the above are his words verbatum
https://lkml.org/lkml/2015/10/21/956

I am soon going to introduce a new clock driver under drivers/clk/bcm/ which is going to need some Kconfig tweaks as well, it would be good if we reached consensus on this so Stephen can apply this.

Thanks!

Signature · 1 line
Florian
maintainer
#4 lore raw
In reply to Jon Mason

Hi Jon,

Quoted 10 lines · Jon Mason
Quoted 9 lines · Scott Branden

Hi Jon,

comments inline.

Quoted 4 lines · Jon Mason

Make the clocks visible options that can be selected by anyone. This avoids the problems of:
1) Select is a reverse dependency and is hard for people to understand and can sometimes be a pain to track down

Quoted 7 lines
Quoted 2 lines

This doesn't make any sense to me - there are many selects in the system and this is one of them.

This was specifically requested by Stephen Boyd, and the above are his words verbatum
https://lkml.org/lkml/2015/10/21/956

Yes, thanks. Not all of the comments are needed. If you look closer COMMON_CLK_IPROC should be a non-visible option. It is just an internal config option used in the Makefile only. There's no benefit to exposing an option here and adding another layer to the Kconfig hierarchy.

See my proposed (revised) changes below which remove the code bloat and allow build coverage to be increased. Even if you expose it there are additional changes you need to make to your patchset dealing with COMPILE_TEST

Quoted 32 lines

Thanks,
Jon

Quoted 29 lines
Quoted 29 lines

2) Build coverage goes down because configs are hidden
3) Code bloat

Patch suggested by Stephen Boyd

---
  arch/arm/mach-bcm/Kconfig |  1 -
  drivers/clk/bcm/Kconfig   | 35 ++++++++++++++++++++++++++++++++++-
  drivers/clk/bcm/Makefile  |  7 +++----
  3 files changed, 37 insertions(+), 6 deletions(-)
arch/arm/mach-bcm/Kconfig +0 -1
index 679798b..cacaaec 100644
@@ -14,7 +14,6 @@ config ARCH_BCM_IPROC
  	select HAVE_ARM_SCU if SMP
  	select HAVE_ARM_TWD if SMP
  	select ARM_GLOBAL_TIMER
-	select COMMON_CLK_IPROC
  	select CLKSRC_MMIO
  	select ARCH_REQUIRE_GPIOLIB
  	select ARM_AMBA
drivers/clk/bcm/Kconfig +0 -0
index 46ee475..0352ccf 100644
@@ -9,8 +9,41 @@ config CLK_BCM_KONA

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 12

Quoted 5 lines
drivers/clk/bcm/Kconfig +1 -1
 	  in the BCM281xx and BCM21664 families.
 
 config COMMON_CLK_IPROC
-	bool
+	bool "Broadcom iProc clock support"

Please leave as is

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 20

Quoted 8 lines
drivers/clk/bcm/Kconfig +4 -0
+	depends on ARCH_BCM_IPROC
 	depends on COMMON_CLK
+	default ARCH_BCM_IPROC
 	help
 	  Enable common clock framework support for Broadcom SoCs
 	  based on the iProc architecture
+
+if COMMON_CLK_IPROC

Remove all the changes above from patchset - not needed.

Quoted 3 lines
Quoted 3 lines

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 26

Quoted 3 lines
drivers/clk/bcm/Kconfig +3 -0
+config CLK_BCM_CYGNUS
+	bool "Broadcom Cygnus clock support"
+	depends on COMMON_CLK_IPROC

not needed - keep hidden and do this instead
select COMMON_CLK_IPROC

Quoted 1 line
Quoted 1 line

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 27

Quoted 1 line
drivers/clk/bcm/Kconfig +1 -0
+	depends on ARCH_BCM_CYGNUS

|| COMPILE_TEST

Quoted 8 lines
Quoted 8 lines

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 32

Quoted 5 lines
drivers/clk/bcm/Kconfig +5 -0
+	default ARCH_BCM_CYGNUS
+	help
+	  Enable common clock framework support for the Broadcom Cygnus SoC
+
+config CLK_BCM_NSP

not needed

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 19

Quoted 2 lines
drivers/clk/bcm/Kconfig +2 -0
+	bool "Broadcom Northstar/Northstar Plus clock support"
+	depends on COMMON_CLK_IPROC

not needed - keep hidden and do this instead
select COMMON_CLK_IPROC

Quoted 1 line
Quoted 1 line

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 35

Quoted 1 line
drivers/clk/bcm/Kconfig +1 -0
+	depends on ARCH_BCM_5301X || ARCH_BCM_NSP
|| COMPILE_TEST
>>> +	default ARCH_BCM_5301X || ARCH_BCM_NSP
Quoted 7 lines
Quoted 7 lines

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 43

Quoted 7 lines
drivers/clk/bcm/Kconfig +7 -0
+	help
+	  Enable common clock framework support for the Broadcom Northstar and
+	  Northstar Plus SoCs
+
+config CLK_BCM_NS2
+	bool "Broadcom Northstar 2 clock support"
+	depends on ARM64

|| COMPILE_TEST

Quoted 1 line
Quoted 1 line

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 28

Quoted 1 line
drivers/clk/bcm/Kconfig +1 -0
+	depends on COMMON_CLK_IPROC

not needed - keep hidden and do this instead
select COMMON_CLK_IPROC

Quoted 5 lines
Quoted 5 lines

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 49

Quoted 5 lines
drivers/clk/bcm/Kconfig +5 -0
+	default ARCH_BCM_IPROC
+	help
+	  Enable common clock framework support for the Broadcom Northstar 2 SoC
+
+endif

remove endif

Quoted 24 lines
Quoted 24 lines

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 6

Quoted 9 lines
drivers/clk/bcm/Makefile +0 -1
index 2d1cbc5..05d5830 100644
@@ -3,7 +3,6 @@ obj-$(CONFIG_CLK_BCM_KONA)	+= clk-kona-setup.o
  obj-$(CONFIG_CLK_BCM_KONA)	+= clk-bcm281xx.o
  obj-$(CONFIG_CLK_BCM_KONA)	+= clk-bcm21664.o
  obj-$(CONFIG_COMMON_CLK_IPROC)	+= clk-iproc-armpll.o clk-iproc-pll.o clk-iproc-asiu.o
-obj-$(CONFIG_COMMON_CLK_IPROC)	+= clk-ns2.o

yes, change this one

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 7

Quoted 1 line
drivers/clk/bcm/Makefile +0 -1
-obj-$(CONFIG_ARCH_BCM_CYGNUS)	+= clk-cygnus.o

you can leave this

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 8

Quoted 1 line
drivers/clk/bcm/Makefile +0 -1
-obj-$(CONFIG_ARCH_BCM_NSP)	+= clk-nsp.o

you can leave this

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 9

Quoted 1 line
drivers/clk/bcm/Makefile +0 -1
-obj-$(CONFIG_ARCH_BCM_5301X)	+= clk-nsp.o

and this

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 6

Quoted 1 line
drivers/clk/bcm/Makefile +1 -0
+obj-$(CONFIG_CLK_BCM_CYGNUS)	+= clk-cygnus.o

no

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 7

Quoted 1 line
drivers/clk/bcm/Makefile +1 -0
+obj-$(CONFIG_CLK_BCM_NSP)	+= clk-nsp.o

no

drivers/clk/bcm/Makefile obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o · line 8

Quoted 1 line
drivers/clk/bcm/Makefile +1 -0
+obj-$(CONFIG_CLK_BCM_NS2)	+= clk-ns2.o

yes needed

Quoted 1 line
#5 lore raw
In reply to Jon Mason

The thread didn't seem to finish, so here's some review.

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 13

Quoted 11 lines · Jon Mason
drivers/clk/bcm/Kconfig +2 -1
index 46ee475..0352ccf 100644
@@ -9,8 +9,41 @@ config CLK_BCM_KONA
 	  in the BCM281xx and BCM21664 families.
 
 config COMMON_CLK_IPROC
-	bool
+	bool "Broadcom iProc clock support"
+	depends on ARCH_BCM_IPROC

Plus || COMPILE_TEST?

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 18

Quoted 5 lines
drivers/clk/bcm/Kconfig +1 -0
 	depends on COMMON_CLK
+	default ARCH_BCM_IPROC
 	help
 	  Enable common clock framework support for Broadcom SoCs
 	  based on the iProc architecture

It's nice that we're grouping the different platforms under one umbrella config for the iProc architecture. That way we don't have to see it unless we're targeting the platform. We should probably do something similar for kona too in case anyone cares about code bloat there.

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 22

Quoted 4 lines
drivers/clk/bcm/Kconfig +4 -0
+
+if COMMON_CLK_IPROC
+
+comment "Broadcom iProc clocks"

Please remove this comment block and drop the depends on COMMON_CLK_IPROC in the configs below. The if section will keep things properly indented and avoid duplicating that depends on statement. Plus the comment pretty much duplicates what is already in the help for COMMON_CLK_IPROC.

We can make COMMON_CLK_IPROC into a hidden option and introduce a new grouping config if we really care about that case where the base support is built but there aren't any users. I'd rather not care though to simplify things.

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 27

Quoted 5 lines
drivers/clk/bcm/Kconfig +5 -0
+
+config CLK_BCM_CYGNUS
+	bool "Broadcom Cygnus clock support"
+	depends on COMMON_CLK_IPROC
+	depends on ARCH_BCM_CYGNUS

Plus || COMPILE_TEST?

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 35

Quoted 8 lines
drivers/clk/bcm/Kconfig +8 -0
+	default ARCH_BCM_CYGNUS
+	help
+	  Enable common clock framework support for the Broadcom Cygnus SoC
+
+config CLK_BCM_NSP
+	bool "Broadcom Northstar/Northstar Plus clock support"
+	depends on COMMON_CLK_IPROC
+	depends on ARCH_BCM_5301X || ARCH_BCM_NSP

Plus || COMPILE_TEST?

drivers/clk/bcm/Kconfig config CLK_BCM_KONA · line 43

Quoted 8 lines
drivers/clk/bcm/Kconfig +8 -0
+	default ARCH_BCM_5301X || ARCH_BCM_NSP
+	help
+	  Enable common clock framework support for the Broadcom Northstar and
+	  Northstar Plus SoCs
+
+config CLK_BCM_NS2
+	bool "Broadcom Northstar 2 clock support"
+	depends on ARM64

Plus || COMPILE_TEST?

Quoted 6 lines
drivers/clk/bcm/Kconfig +6 -0
+	depends on COMMON_CLK_IPROC
+	default ARCH_BCM_IPROC
+	help
+	  Enable common clock framework support for the Broadcom Northstar 2 SoC
+
+endif
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project