diff mbox series

[RFT,12/16] memory: brcmstb_dpfe: Add separate entry for compile test

Message ID 20200724182328.3348-13-krzk@kernel.org (mailing list archive)
State Not Applicable
Headers show
Series memory: Further cleanups | expand

Commit Message

Krzysztof Kozlowski July 24, 2020, 6:23 p.m. UTC
Add separate entry for Broadcom STB DPFE driver, selected by platforms
by default.  This allows further customization and compile testing.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---

I have other changes around drivers/memory/Kconfig pending. Sending them
together would avoid conflicts.

---
 arch/arm/mach-bcm/Kconfig    |  1 +
 arch/arm64/Kconfig.platforms |  1 +
 drivers/memory/Kconfig       | 11 +++++++++++
 drivers/memory/Makefile      |  2 +-
 4 files changed, 14 insertions(+), 1 deletion(-)

Comments

Florian Fainelli July 24, 2020, 6:40 p.m. UTC | #1
On 7/24/20 11:23 AM, Krzysztof Kozlowski wrote:
> Add separate entry for Broadcom STB DPFE driver, selected by platforms
> by default.  This allows further customization and compile testing.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
> 
> I have other changes around drivers/memory/Kconfig pending. Sending them
> together would avoid conflicts.
> 
> ---
>  arch/arm/mach-bcm/Kconfig    |  1 +
>  arch/arm64/Kconfig.platforms |  1 +
>  drivers/memory/Kconfig       | 11 +++++++++++
>  drivers/memory/Makefile      |  2 +-
>  4 files changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
> index 1df0ee01ee02..b0c45238e69b 100644
> --- a/arch/arm/mach-bcm/Kconfig
> +++ b/arch/arm/mach-bcm/Kconfig
> @@ -208,6 +208,7 @@ config ARCH_BRCMSTB
>  	select ARM_GIC
>  	select ARM_ERRATA_798181 if SMP
>  	select HAVE_ARM_ARCH_TIMER
> +	select BRCMSTB_DPFE
>  	select BRCMSTB_L2_IRQ
>  	select BCM7120_L2_IRQ
>  	select ARCH_HAS_HOLES_MEMORYMODEL
> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
> index ddc3bf75257f..f7791ed0ed6d 100644
> --- a/arch/arm64/Kconfig.platforms
> +++ b/arch/arm64/Kconfig.platforms
> @@ -68,6 +68,7 @@ config ARCH_BRCMSTB
>  	bool "Broadcom Set-Top-Box SoCs"
>  	select ARCH_HAS_RESET_CONTROLLER
>  	select BCM7038_L1_IRQ
> +	select BRCMSTB_DPFE

The select is probably not warranted, see below.

>  	select BRCMSTB_L2_IRQ
>  	select GENERIC_IRQ_CHIP
>  	select PINCTRL
> diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
> index cd4fc93b50df..fef6f0873fda 100644
> --- a/drivers/memory/Kconfig
> +++ b/drivers/memory/Kconfig
> @@ -54,6 +54,17 @@ config ATMEL_EBI
>  	  tree is used. This bus supports NANDs, external ethernet controller,
>  	  SRAMs, ATA devices, etc.
>  
> +config BRCMSTB_DPFE
> +	bool "Broadcom STB DPFE driver" if COMPILE_TEST
> +	depends on ARCH_BRCMSTB || COMPILE_TEST

Can you make it default ARCH_BRCMSTB and remove the select above?

With that:

Acked-by: Florian Fainelli <f.fainelli@gmail.com>

> +	help
> +	  This driver provides access to the DPFE interface of Broadcom
> +	  STB SoCs. The firmware running on the DCPU inside the DDR PHY can
> +	  provide current information about the system's RAM, for instance
> +	  the DRAM refresh rate. This can be used as an indirect indicator
> +	  for the DRAM's temperature. Slower refresh rate means cooler RAM,
> +	  higher refresh rate means hotter RAM.
> +
>  config BT1_L2_CTL
>  	bool "Baikal-T1 CM2 L2-RAM Cache Control Block"
>  	depends on MIPS_BAIKAL_T1 || COMPILE_TEST
> diff --git a/drivers/memory/Makefile b/drivers/memory/Makefile
> index b4533ffff2bc..e71cf7b99641 100644
> --- a/drivers/memory/Makefile
> +++ b/drivers/memory/Makefile
> @@ -10,7 +10,7 @@ endif
>  obj-$(CONFIG_ARM_PL172_MPMC)	+= pl172.o
>  obj-$(CONFIG_ATMEL_SDRAMC)	+= atmel-sdramc.o
>  obj-$(CONFIG_ATMEL_EBI)		+= atmel-ebi.o
> -obj-$(CONFIG_ARCH_BRCMSTB)	+= brcmstb_dpfe.o
> +obj-$(CONFIG_BRCMSTB_DPFE)	+= brcmstb_dpfe.o
>  obj-$(CONFIG_BT1_L2_CTL)	+= bt1-l2-ctl.o
>  obj-$(CONFIG_TI_AEMIF)		+= ti-aemif.o
>  obj-$(CONFIG_TI_EMIF)		+= emif.o
>
Krzysztof Kozlowski July 24, 2020, 6:42 p.m. UTC | #2
On Fri, Jul 24, 2020 at 11:40:09AM -0700, Florian Fainelli wrote:
> On 7/24/20 11:23 AM, Krzysztof Kozlowski wrote:
> > Add separate entry for Broadcom STB DPFE driver, selected by platforms
> > by default.  This allows further customization and compile testing.
> > 
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > ---
> > 
> > I have other changes around drivers/memory/Kconfig pending. Sending them
> > together would avoid conflicts.
> > 
> > ---
> >  arch/arm/mach-bcm/Kconfig    |  1 +
> >  arch/arm64/Kconfig.platforms |  1 +
> >  drivers/memory/Kconfig       | 11 +++++++++++
> >  drivers/memory/Makefile      |  2 +-
> >  4 files changed, 14 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
> > index 1df0ee01ee02..b0c45238e69b 100644
> > --- a/arch/arm/mach-bcm/Kconfig
> > +++ b/arch/arm/mach-bcm/Kconfig
> > @@ -208,6 +208,7 @@ config ARCH_BRCMSTB
> >  	select ARM_GIC
> >  	select ARM_ERRATA_798181 if SMP
> >  	select HAVE_ARM_ARCH_TIMER
> > +	select BRCMSTB_DPFE
> >  	select BRCMSTB_L2_IRQ
> >  	select BCM7120_L2_IRQ
> >  	select ARCH_HAS_HOLES_MEMORYMODEL
> > diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
> > index ddc3bf75257f..f7791ed0ed6d 100644
> > --- a/arch/arm64/Kconfig.platforms
> > +++ b/arch/arm64/Kconfig.platforms
> > @@ -68,6 +68,7 @@ config ARCH_BRCMSTB
> >  	bool "Broadcom Set-Top-Box SoCs"
> >  	select ARCH_HAS_RESET_CONTROLLER
> >  	select BCM7038_L1_IRQ
> > +	select BRCMSTB_DPFE
> 
> The select is probably not warranted, see below.
> 
> >  	select BRCMSTB_L2_IRQ
> >  	select GENERIC_IRQ_CHIP
> >  	select PINCTRL
> > diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
> > index cd4fc93b50df..fef6f0873fda 100644
> > --- a/drivers/memory/Kconfig
> > +++ b/drivers/memory/Kconfig
> > @@ -54,6 +54,17 @@ config ATMEL_EBI
> >  	  tree is used. This bus supports NANDs, external ethernet controller,
> >  	  SRAMs, ATA devices, etc.
> >  
> > +config BRCMSTB_DPFE
> > +	bool "Broadcom STB DPFE driver" if COMPILE_TEST
> > +	depends on ARCH_BRCMSTB || COMPILE_TEST
> 
> Can you make it default ARCH_BRCMSTB and remove the select above?
> 
> With that:
> 
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>

Sure, I'll fix it up. Thanks for feedback.

Best regards,
Krzysztof
Krzysztof Kozlowski Aug. 17, 2020, 6:38 p.m. UTC | #3
On Fri, Jul 24, 2020 at 11:40:09AM -0700, Florian Fainelli wrote:
> On 7/24/20 11:23 AM, Krzysztof Kozlowski wrote:
> > Add separate entry for Broadcom STB DPFE driver, selected by platforms
> > by default.  This allows further customization and compile testing.
> > 
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > ---
> > 
> > I have other changes around drivers/memory/Kconfig pending. Sending them
> > together would avoid conflicts.
> > 
> > ---
> >  arch/arm/mach-bcm/Kconfig    |  1 +
> >  arch/arm64/Kconfig.platforms |  1 +
> >  drivers/memory/Kconfig       | 11 +++++++++++
> >  drivers/memory/Makefile      |  2 +-
> >  4 files changed, 14 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
> > index 1df0ee01ee02..b0c45238e69b 100644
> > --- a/arch/arm/mach-bcm/Kconfig
> > +++ b/arch/arm/mach-bcm/Kconfig
> > @@ -208,6 +208,7 @@ config ARCH_BRCMSTB
> >  	select ARM_GIC
> >  	select ARM_ERRATA_798181 if SMP
> >  	select HAVE_ARM_ARCH_TIMER
> > +	select BRCMSTB_DPFE
> >  	select BRCMSTB_L2_IRQ
> >  	select BCM7120_L2_IRQ
> >  	select ARCH_HAS_HOLES_MEMORYMODEL
> > diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
> > index ddc3bf75257f..f7791ed0ed6d 100644
> > --- a/arch/arm64/Kconfig.platforms
> > +++ b/arch/arm64/Kconfig.platforms
> > @@ -68,6 +68,7 @@ config ARCH_BRCMSTB
> >  	bool "Broadcom Set-Top-Box SoCs"
> >  	select ARCH_HAS_RESET_CONTROLLER
> >  	select BCM7038_L1_IRQ
> > +	select BRCMSTB_DPFE
> 
> The select is probably not warranted, see below.
> 
> >  	select BRCMSTB_L2_IRQ
> >  	select GENERIC_IRQ_CHIP
> >  	select PINCTRL
> > diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
> > index cd4fc93b50df..fef6f0873fda 100644
> > --- a/drivers/memory/Kconfig
> > +++ b/drivers/memory/Kconfig
> > @@ -54,6 +54,17 @@ config ATMEL_EBI
> >  	  tree is used. This bus supports NANDs, external ethernet controller,
> >  	  SRAMs, ATA devices, etc.
> >  
> > +config BRCMSTB_DPFE
> > +	bool "Broadcom STB DPFE driver" if COMPILE_TEST
> > +	depends on ARCH_BRCMSTB || COMPILE_TEST
> 
> Can you make it default ARCH_BRCMSTB and remove the select above?
> 
> With that:
> 
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>

Applied with mentioned change.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
index 1df0ee01ee02..b0c45238e69b 100644
--- a/arch/arm/mach-bcm/Kconfig
+++ b/arch/arm/mach-bcm/Kconfig
@@ -208,6 +208,7 @@  config ARCH_BRCMSTB
 	select ARM_GIC
 	select ARM_ERRATA_798181 if SMP
 	select HAVE_ARM_ARCH_TIMER
+	select BRCMSTB_DPFE
 	select BRCMSTB_L2_IRQ
 	select BCM7120_L2_IRQ
 	select ARCH_HAS_HOLES_MEMORYMODEL
diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index ddc3bf75257f..f7791ed0ed6d 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -68,6 +68,7 @@  config ARCH_BRCMSTB
 	bool "Broadcom Set-Top-Box SoCs"
 	select ARCH_HAS_RESET_CONTROLLER
 	select BCM7038_L1_IRQ
+	select BRCMSTB_DPFE
 	select BRCMSTB_L2_IRQ
 	select GENERIC_IRQ_CHIP
 	select PINCTRL
diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
index cd4fc93b50df..fef6f0873fda 100644
--- a/drivers/memory/Kconfig
+++ b/drivers/memory/Kconfig
@@ -54,6 +54,17 @@  config ATMEL_EBI
 	  tree is used. This bus supports NANDs, external ethernet controller,
 	  SRAMs, ATA devices, etc.
 
+config BRCMSTB_DPFE
+	bool "Broadcom STB DPFE driver" if COMPILE_TEST
+	depends on ARCH_BRCMSTB || COMPILE_TEST
+	help
+	  This driver provides access to the DPFE interface of Broadcom
+	  STB SoCs. The firmware running on the DCPU inside the DDR PHY can
+	  provide current information about the system's RAM, for instance
+	  the DRAM refresh rate. This can be used as an indirect indicator
+	  for the DRAM's temperature. Slower refresh rate means cooler RAM,
+	  higher refresh rate means hotter RAM.
+
 config BT1_L2_CTL
 	bool "Baikal-T1 CM2 L2-RAM Cache Control Block"
 	depends on MIPS_BAIKAL_T1 || COMPILE_TEST
diff --git a/drivers/memory/Makefile b/drivers/memory/Makefile
index b4533ffff2bc..e71cf7b99641 100644
--- a/drivers/memory/Makefile
+++ b/drivers/memory/Makefile
@@ -10,7 +10,7 @@  endif
 obj-$(CONFIG_ARM_PL172_MPMC)	+= pl172.o
 obj-$(CONFIG_ATMEL_SDRAMC)	+= atmel-sdramc.o
 obj-$(CONFIG_ATMEL_EBI)		+= atmel-ebi.o
-obj-$(CONFIG_ARCH_BRCMSTB)	+= brcmstb_dpfe.o
+obj-$(CONFIG_BRCMSTB_DPFE)	+= brcmstb_dpfe.o
 obj-$(CONFIG_BT1_L2_CTL)	+= bt1-l2-ctl.o
 obj-$(CONFIG_TI_AEMIF)		+= ti-aemif.o
 obj-$(CONFIG_TI_EMIF)		+= emif.o