diff mbox

[v2,8/8] staging: fsl-mc: allow the driver compile multi-arch

Message ID 20170718133723.12709-9-laurentiu.tudor@nxp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Laurentiu Tudor July 18, 2017, 1:37 p.m. UTC
From: Laurentiu Tudor <laurentiu.tudor@nxp.com>

Drop dependency on ARCH_LAYERSCAPE (which in turn depends on ARM64),
thus leaving this driver compile on other architectures.
Also, other drivers depending on the bus are updated to depend
on ARCH_LAYERSCAPE until they'll also be made multi-arch.
This was compiled tested on:
 - booke powerpc (corenet{32,64}_smp_defconfig)
 - x86 (i386_defconfig, x86_64_defconfig, needs CONFIG_OF)
 - arm64 (defconfig)

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
---
Notes:
    -v2
      -no changes

 drivers/staging/fsl-dpaa2/Kconfig  | 2 +-
 drivers/staging/fsl-mc/bus/Kconfig | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Arnd Bergmann July 18, 2017, 2:25 p.m. UTC | #1
On Tue, Jul 18, 2017 at 3:37 PM,  <laurentiu.tudor@nxp.com> wrote:

> --- a/drivers/staging/fsl-dpaa2/Kconfig
> +++ b/drivers/staging/fsl-dpaa2/Kconfig
> @@ -4,7 +4,7 @@
>
>  config FSL_DPAA2
>         bool "Freescale DPAA2 devices"
> -       depends on FSL_MC_BUS
> +       depends on FSL_MC_BUS && ARCH_LAYERSCAPE
>         ---help---
>           Build drivers for Freescale DataPath Acceleration
>           Architecture (DPAA2) family of SoCs.

I would probably leave the dependency in there conditionally, like

         depends on ARCH_LAYERSCAPE || COMPILE_TEST

That way, we can build the driver on all architectures with "make allmodconfig"
or "make randconfig", but regular users that disable COMPILE_TEST
won't be bothered by the extra config options unless they have the
right hardware.

       Arnd
Laurentiu Tudor July 18, 2017, 2:36 p.m. UTC | #2
Hi Arnd,

On 07/18/2017 05:25 PM, Arnd Bergmann wrote:
> On Tue, Jul 18, 2017 at 3:37 PM,  <laurentiu.tudor@nxp.com> wrote:
>
>> --- a/drivers/staging/fsl-dpaa2/Kconfig
>> +++ b/drivers/staging/fsl-dpaa2/Kconfig
>> @@ -4,7 +4,7 @@
>>
>>   config FSL_DPAA2
>>          bool "Freescale DPAA2 devices"
>> -       depends on FSL_MC_BUS
>> +       depends on FSL_MC_BUS && ARCH_LAYERSCAPE
>>          ---help---
>>            Build drivers for Freescale DataPath Acceleration
>>            Architecture (DPAA2) family of SoCs.
>
> I would probably leave the dependency in there conditionally, like
>
>           depends on ARCH_LAYERSCAPE || COMPILE_TEST
>
> That way, we can build the driver on all architectures with "make allmodconfig"
> or "make randconfig", but regular users that disable COMPILE_TEST
> won't be bothered by the extra config options unless they have the
> right hardware.
>

Good point, I'll take care of it. But don't you mean COMPILE_TEST be 
added on the actual MC_BUS config, like so:

  config FSL_MC_BUS
  	bool "QorIQ DPAA2 fsl-mc bus driver"
-	depends on OF && ARCH_LAYERSCAPE
+	depends on OF && (ARCH_LAYERSCAPE || COMPILE_TEST)
  	select GENERIC_MSI_IRQ_DOMAIN
?

The other drivers that depend on the MC_BUS won't compile on other 
architectures.

---
Thanks & Best Regards, Laurentiu
Arnd Bergmann July 18, 2017, 2:39 p.m. UTC | #3
On Tue, Jul 18, 2017 at 4:36 PM, Laurentiu Tudor
<laurentiu.tudor@nxp.com> wrote:

> Good point, I'll take care of it. But don't you mean COMPILE_TEST be
> added on the actual MC_BUS config, like so:
>
>   config FSL_MC_BUS
>         bool "QorIQ DPAA2 fsl-mc bus driver"
> -       depends on OF && ARCH_LAYERSCAPE
> +       depends on OF && (ARCH_LAYERSCAPE || COMPILE_TEST)
>         select GENERIC_MSI_IRQ_DOMAIN
> ?
>
> The other drivers that depend on the MC_BUS won't compile on other
> architectures.

I was thinking of adding it to all three, but you are right we only needed
it for the bus.

        Arnd
diff mbox

Patch

diff --git a/drivers/staging/fsl-dpaa2/Kconfig b/drivers/staging/fsl-dpaa2/Kconfig
index 730fd6d..dfff675 100644
--- a/drivers/staging/fsl-dpaa2/Kconfig
+++ b/drivers/staging/fsl-dpaa2/Kconfig
@@ -4,7 +4,7 @@ 
 
 config FSL_DPAA2
 	bool "Freescale DPAA2 devices"
-	depends on FSL_MC_BUS
+	depends on FSL_MC_BUS && ARCH_LAYERSCAPE
 	---help---
 	  Build drivers for Freescale DataPath Acceleration
 	  Architecture (DPAA2) family of SoCs.
diff --git a/drivers/staging/fsl-mc/bus/Kconfig b/drivers/staging/fsl-mc/bus/Kconfig
index a10aaf0..c0acc97 100644
--- a/drivers/staging/fsl-mc/bus/Kconfig
+++ b/drivers/staging/fsl-mc/bus/Kconfig
@@ -8,7 +8,7 @@ 
 
 config FSL_MC_BUS
 	bool "QorIQ DPAA2 fsl-mc bus driver"
-	depends on OF && ARCH_LAYERSCAPE
+	depends on OF
 	select GENERIC_MSI_IRQ_DOMAIN
 	help
 	  Driver to enable the bus infrastructure for the QorIQ DPAA2
@@ -18,7 +18,7 @@  config FSL_MC_BUS
 
 config FSL_MC_DPIO
         tristate "QorIQ DPAA2 DPIO driver"
-        depends on FSL_MC_BUS
+        depends on FSL_MC_BUS && ARCH_LAYERSCAPE
         help
 	  Driver for the DPAA2 DPIO object.  A DPIO provides queue and
 	  buffer management facilities for software to interact with