Patchwork powerpc: make Freescale QE support a selectable Kconfig option

login
register
mail settings
Submitter Timur Tabi
Date Oct. 2, 2008, 3:27 p.m.
Message ID <1222961277-6166-1-git-send-email-timur@freescale.com>
Download mbox | patch
Permalink /patch/2506/
State Changes Requested
Delegated to: Kumar Gala
Headers show

Comments

Timur Tabi - Oct. 2, 2008, 3:27 p.m.
Modify the Kconfig so that Freescale QUICC Engine (QE) support is a selectable
option, thereby allowing users to compile kernels without any QE support.

The drawback is that QE support is now disabled by default on platforms that
have a QE, and so a defconfig is needed to enable QE and QE devices (like
UCC GETH).  Fortunately, all the current relevant defconfigs do that already.

Signed-off-by: Timur Tabi <timur@freescale.com>
---

This patch should be applied to Kumar's branch for 2.6.28 patches.

 arch/powerpc/platforms/83xx/Kconfig |    4 ----
 arch/powerpc/platforms/Kconfig      |    3 ++-
 2 files changed, 2 insertions(+), 5 deletions(-)
Kumar Gala - Oct. 3, 2008, 5:12 a.m.
On Oct 2, 2008, at 10:27 AM, Timur Tabi wrote:

> Modify the Kconfig so that Freescale QUICC Engine (QE) support is a  
> selectable
> option, thereby allowing users to compile kernels without any QE  
> support.
>
> The drawback is that QE support is now disabled by default on  
> platforms that
> have a QE, and so a defconfig is needed to enable QE and QE devices  
> (like
> UCC GETH).  Fortunately, all the current relevant defconfigs do that  
> already.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
>
> This patch should be applied to Kumar's branch for 2.6.28 patches.
>
> arch/powerpc/platforms/83xx/Kconfig |    4 ----
> arch/powerpc/platforms/Kconfig      |    3 ++-
> 2 files changed, 2 insertions(+), 5 deletions(-)

What about the 85xx/Kconfig users?

- k
Anton Vorontsov - Oct. 3, 2008, 7:04 a.m.
On Thu, Oct 02, 2008 at 10:27:57AM -0500, Timur Tabi wrote:
> Modify the Kconfig so that Freescale QUICC Engine (QE) support is a selectable
> option, thereby allowing users to compile kernels without any QE support.
> 
> The drawback is that QE support is now disabled by default on platforms that
> have a QE, and so a defconfig is needed to enable QE and QE devices (like
> UCC GETH).  Fortunately, all the current relevant defconfigs do that already.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---

[...]
>  config MPC836x_RDK
>  	bool "Freescale/Logic MPC836x RDK"
>  	select DEFAULT_UIMAGE
> -	select QUICC_ENGINE
>  	select QE_GPIO

IIRC selects do not honor any dependencies, i.e. you should delete
the QE_GPIO too.

>  	select FSL_GTM
>  	select FSL_LBC
> diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
> index 9578c45..6cf517f 100644
> --- a/arch/powerpc/platforms/Kconfig
> +++ b/arch/powerpc/platforms/Kconfig
> @@ -239,7 +239,8 @@ config TAU_AVERAGE
>  	  If in doubt, say N here.
>  
>  config QUICC_ENGINE
> -	bool
> +	bool "Freescale QUICC Engine (QE) Support"
> +	depends on FSL_SOC
>  	select PPC_LIB_RHEAP
>  	select CRC32
>  	help
> -- 
> 1.5.5
Kumar Gala - Oct. 3, 2008, 7:58 a.m.
On Oct 3, 2008, at 2:04 AM, Anton Vorontsov wrote:

> On Thu, Oct 02, 2008 at 10:27:57AM -0500, Timur Tabi wrote:
>> Modify the Kconfig so that Freescale QUICC Engine (QE) support is a  
>> selectable
>> option, thereby allowing users to compile kernels without any QE  
>> support.
>>
>> The drawback is that QE support is now disabled by default on  
>> platforms that
>> have a QE, and so a defconfig is needed to enable QE and QE devices  
>> (like
>> UCC GETH).  Fortunately, all the current relevant defconfigs do  
>> that already.
>>
>> Signed-off-by: Timur Tabi <timur@freescale.com>
>> ---
>
> [...]
>> config MPC836x_RDK
>> 	bool "Freescale/Logic MPC836x RDK"
>> 	select DEFAULT_UIMAGE
>> -	select QUICC_ENGINE
>> 	select QE_GPIO
>
> IIRC selects do not honor any dependencies, i.e. you should delete
> the QE_GPIO too.

Is QE_GPIO need by the board?  or you just enabled it to have it?

- k
Anton Vorontsov - Oct. 3, 2008, 8:48 a.m.
On Fri, Oct 03, 2008 at 02:58:57AM -0500, Kumar Gala wrote:
>
> On Oct 3, 2008, at 2:04 AM, Anton Vorontsov wrote:
>
>> On Thu, Oct 02, 2008 at 10:27:57AM -0500, Timur Tabi wrote:
>>> Modify the Kconfig so that Freescale QUICC Engine (QE) support is a  
>>> selectable
>>> option, thereby allowing users to compile kernels without any QE  
>>> support.
>>>
>>> The drawback is that QE support is now disabled by default on  
>>> platforms that
>>> have a QE, and so a defconfig is needed to enable QE and QE devices  
>>> (like
>>> UCC GETH).  Fortunately, all the current relevant defconfigs do that 
>>> already.
>>>
>>> Signed-off-by: Timur Tabi <timur@freescale.com>
>>> ---
>>
>> [...]
>>> config MPC836x_RDK
>>> 	bool "Freescale/Logic MPC836x RDK"
>>> 	select DEFAULT_UIMAGE
>>> -	select QUICC_ENGINE
>>> 	select QE_GPIO
>>
>> IIRC selects do not honor any dependencies, i.e. you should delete
>> the QE_GPIO too.
>
> Is QE_GPIO need by the board?  or you just enabled it to have it?

Well... This select is a relic from the time when we were discussing
how to register QE GPIOs: using board files or using a dedicated
arch_initcall. We seemed to agree on arch_initcall, but in the end
you applied 'board file' approach. ;-)

http://www.mail-archive.com/linuxppc-dev@ozlabs.org/msg19147.html

Later I sent you an update that eliminated the need of the QE_GPIO
select:

http://www.mail-archive.com/linuxppc-dev@ozlabs.org/msg19147.html

But nobody recalled to remove the 'select QE_GPIO' after that...
Anton Vorontsov - Oct. 3, 2008, 9:08 a.m.
On Fri, Oct 03, 2008 at 12:48:49PM +0400, Anton Vorontsov wrote:
> On Fri, Oct 03, 2008 at 02:58:57AM -0500, Kumar Gala wrote:
> >
> > On Oct 3, 2008, at 2:04 AM, Anton Vorontsov wrote:
> >
> >> On Thu, Oct 02, 2008 at 10:27:57AM -0500, Timur Tabi wrote:
> >>> Modify the Kconfig so that Freescale QUICC Engine (QE) support is a  
> >>> selectable
> >>> option, thereby allowing users to compile kernels without any QE  
> >>> support.
> >>>
> >>> The drawback is that QE support is now disabled by default on  
> >>> platforms that
> >>> have a QE, and so a defconfig is needed to enable QE and QE devices  
> >>> (like
> >>> UCC GETH).  Fortunately, all the current relevant defconfigs do that 
> >>> already.
> >>>
> >>> Signed-off-by: Timur Tabi <timur@freescale.com>
> >>> ---
> >>
> >> [...]
> >>> config MPC836x_RDK
> >>> 	bool "Freescale/Logic MPC836x RDK"
> >>> 	select DEFAULT_UIMAGE
> >>> -	select QUICC_ENGINE
> >>> 	select QE_GPIO
> >>
> >> IIRC selects do not honor any dependencies, i.e. you should delete
> >> the QE_GPIO too.
> >
> > Is QE_GPIO need by the board?  or you just enabled it to have it?

Btw, as for the need.. yes, it was needed to support the FHCI. But
now the FHCI would just depend on it, which is better approach anyway.
Timur Tabi - Oct. 3, 2008, 3:43 p.m.
Anton Vorontsov wrote:

> Btw, as for the need.. yes, it was needed to support the FHCI. But
> now the FHCI would just depend on it, which is better approach anyway.

I also noticed that "QE GPIO support" is a top-level Kconfig option, instead of
under Device Drivers -> GPIO.  Is that intentional?
Anton Vorontsov - Oct. 3, 2008, 4:05 p.m.
On Fri, Oct 03, 2008 at 10:43:50AM -0500, Timur Tabi wrote:
> Anton Vorontsov wrote:
> 
> > Btw, as for the need.. yes, it was needed to support the FHCI. But
> > now the FHCI would just depend on it, which is better approach anyway.
> 
> I also noticed that "QE GPIO support" is a top-level Kconfig option, instead of
> under Device Drivers -> GPIO.  Is that intentional?

Yup. David said that platform GPIO controllers should not go into the
drivers/gpio/, their place is in the arch/.

Thanks,
Timur Tabi - Oct. 3, 2008, 4:09 p.m.
Anton Vorontsov wrote:

> Yup. David said that platform GPIO controllers should not go into the
> drivers/gpio/, their place is in the arch/.

Then when I do "make menuconfig", why doesn't that option appear under "Platform
support"?  This is what I see now:

[*] Networking support  --->
    Device Drivers  --->
    File systems  --->
[*] QE GPIO support
    Library routines  --->
    Kernel hacking  --->
Kumar Gala - Oct. 3, 2008, 4:18 p.m.
On Oct 3, 2008, at 11:09 AM, Timur Tabi wrote:

> Anton Vorontsov wrote:
>
>> Yup. David said that platform GPIO controllers should not go into the
>> drivers/gpio/, their place is in the arch/.
>
> Then when I do "make menuconfig", why doesn't that option appear  
> under "Platform
> support"?  This is what I see now:
>
> [*] Networking support  --->
>    Device Drivers  --->
>    File systems  --->
> [*] QE GPIO support
>    Library routines  --->
>    Kernel hacking  --->

I'm moving it under platform like the 8xxx GPIO config

- k

Patch

diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index 6159c5d..4a6cc78 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -19,7 +19,6 @@  config MPC831x_RDB
 config MPC832x_MDS
 	bool "Freescale MPC832x MDS"
 	select DEFAULT_UIMAGE
-	select QUICC_ENGINE
 	select PPC_MPC832x
 	help
 	  This option enables support for the MPC832x MDS evaluation board.
@@ -27,7 +26,6 @@  config MPC832x_MDS
 config MPC832x_RDB
 	bool "Freescale MPC832x RDB"
 	select DEFAULT_UIMAGE
-	select QUICC_ENGINE
 	select PPC_MPC832x
 	help
 	  This option enables support for the MPC8323 RDB board.
@@ -57,14 +55,12 @@  config MPC834x_ITX
 config MPC836x_MDS
 	bool "Freescale MPC836x MDS"
 	select DEFAULT_UIMAGE
-	select QUICC_ENGINE
 	help
 	  This option enables support for the MPC836x MDS Processor Board.
 
 config MPC836x_RDK
 	bool "Freescale/Logic MPC836x RDK"
 	select DEFAULT_UIMAGE
-	select QUICC_ENGINE
 	select QE_GPIO
 	select FSL_GTM
 	select FSL_LBC
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 9578c45..6cf517f 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -239,7 +239,8 @@  config TAU_AVERAGE
 	  If in doubt, say N here.
 
 config QUICC_ENGINE
-	bool
+	bool "Freescale QUICC Engine (QE) Support"
+	depends on FSL_SOC
 	select PPC_LIB_RHEAP
 	select CRC32
 	help