diff mbox

[27/30] dmaengine: tegra-apb: enable COMPILE_TEST

Message ID 1473960849-23024-28-git-send-email-vinod.koul@intel.com (mailing list archive)
State Superseded
Headers show

Commit Message

Vinod Koul Sept. 15, 2016, 5:34 p.m. UTC
To get more coverage, enable COMPILE_TEST for this driver.

Cc: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 drivers/dma/Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Jon Hunter Sept. 15, 2016, 9:06 p.m. UTC | #1
Hi Vinod,

On 15/09/16 18:34, Vinod Koul wrote:
> To get more coverage, enable COMPILE_TEST for this driver.
> 
> Cc: Jon Hunter <jonathanh@nvidia.com>
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> ---
>  drivers/dma/Kconfig | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
> index 60341185a6b9..878277865ed0 100644
> --- a/drivers/dma/Kconfig
> +++ b/drivers/dma/Kconfig
> @@ -483,8 +483,9 @@ config TEGRA20_APB_DMA
>  	  or vice versa. It does not support memory to memory data transfer.
>  
>  config TEGRA210_ADMA
> -	bool "NVIDIA Tegra210 ADMA support"
> -	depends on ARCH_TEGRA_210_SOC
> +	bool "NVIDIA Tegra210 ADMA support" if COMPILE_TEST && !ARCH_TEGRA_210_SOC
> +	default ARCH_TEGRA_210_SOC
> +	depends on ARCH_ARM

This should be ...

	depends on ARM64

 ... because Tegra210 is ARM64 and not ARM and we will not be able to
enable for Tegra210 with the above ;-)

Also, can you correct the $subject as this is "tegra-adma" and not
"tegra-apb".

Cheers
Jon
Arnd Bergmann Sept. 16, 2016, 7:39 a.m. UTC | #2
On Thursday, September 15, 2016 10:06:05 PM CEST Jon Hunter wrote:
> On 15/09/16 18:34, Vinod Koul wrote:
> > To get more coverage, enable COMPILE_TEST for this driver.
> > 
> > Cc: Jon Hunter <jonathanh@nvidia.com>
> > Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> > ---
> >  drivers/dma/Kconfig | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
> > index 60341185a6b9..878277865ed0 100644
> > --- a/drivers/dma/Kconfig
> > +++ b/drivers/dma/Kconfig
> > @@ -483,8 +483,9 @@ config TEGRA20_APB_DMA
> >         or vice versa. It does not support memory to memory data transfer.
> >  
> >  config TEGRA210_ADMA
> > -     bool "NVIDIA Tegra210 ADMA support"
> > -     depends on ARCH_TEGRA_210_SOC
> > +     bool "NVIDIA Tegra210 ADMA support" if COMPILE_TEST && !ARCH_TEGRA_210_SOC
> > +     default ARCH_TEGRA_210_SOC
> > +     depends on ARCH_ARM
> 
> This should be ...
> 
>         depends on ARM64
> 
>  ... because Tegra210 is ARM64 and not ARM and we will not be able to
> enable for Tegra210 with the above 
> 
> Also, can you correct the $subject as this is "tegra-adma" and not
> "tegra-apb".
> 

Note that "ARCH_ARM" is not a valid Kconfig symbol, unlike "ARM" and "ARM64".

Is there anything preventing us from building the driver on x86?
It if builds on ARM but not x86, we should probably leave it
as "depends on ARM || ARM64", I think we do a lot more build coverage
testing on 32-bit still.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jon Hunter Sept. 16, 2016, 9:41 a.m. UTC | #3
On 16/09/16 08:39, Arnd Bergmann wrote:
> On Thursday, September 15, 2016 10:06:05 PM CEST Jon Hunter wrote:
>> On 15/09/16 18:34, Vinod Koul wrote:
>>> To get more coverage, enable COMPILE_TEST for this driver.
>>>
>>> Cc: Jon Hunter <jonathanh@nvidia.com>
>>> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
>>> ---
>>>  drivers/dma/Kconfig | 5 +++--
>>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
>>> index 60341185a6b9..878277865ed0 100644
>>> --- a/drivers/dma/Kconfig
>>> +++ b/drivers/dma/Kconfig
>>> @@ -483,8 +483,9 @@ config TEGRA20_APB_DMA
>>>         or vice versa. It does not support memory to memory data transfer.
>>>  
>>>  config TEGRA210_ADMA
>>> -     bool "NVIDIA Tegra210 ADMA support"
>>> -     depends on ARCH_TEGRA_210_SOC
>>> +     bool "NVIDIA Tegra210 ADMA support" if COMPILE_TEST && !ARCH_TEGRA_210_SOC
>>> +     default ARCH_TEGRA_210_SOC
>>> +     depends on ARCH_ARM
>>
>> This should be ...
>>
>>         depends on ARM64
>>
>>  ... because Tegra210 is ARM64 and not ARM and we will not be able to
>> enable for Tegra210 with the above 
>>
>> Also, can you correct the $subject as this is "tegra-adma" and not
>> "tegra-apb".
>>
> 
> Note that "ARCH_ARM" is not a valid Kconfig symbol, unlike "ARM" and "ARM64".
> 
> Is there anything preventing us from building the driver on x86?

Not that I can think of so probably simplest if we could drop it.

I think that we should also make the "select PM_CLK" to a "depends on
PM_CLK" otherwise we may get ...

warning: (ARM_GIC_PM && TEGRA_ACONNECT && TEGRA210_ADMA) selects PM_CLK
which has unmet direct dependencies (PM && HAVE_CLK)
warning: (ARM_GIC_PM && TEGRA_ACONNECT && TEGRA210_ADMA) selects PM_CLK
which has unmet direct dependencies (PM && HAVE_CLK)

Cheers
Jon
Vinod Koul Sept. 16, 2016, 2:27 p.m. UTC | #4
On Fri, Sep 16, 2016 at 10:41:14AM +0100, Jon Hunter wrote:
> > 
> > Note that "ARCH_ARM" is not a valid Kconfig symbol, unlike "ARM" and "ARM64".

Thanks, I will update that.. I will make it ARM and my guess it that it
should enable it on both ARM64 and ARM, is that the case?

> > 
> > Is there anything preventing us from building the driver on x86?

yes..


> Not that I can think of so probably simplest if we could drop it.

As I have mentioned in cover letter, omap and this didn't build. These two
have this depends.

> 
> I think that we should also make the "select PM_CLK" to a "depends on
> PM_CLK" otherwise we may get ...
> 
> warning: (ARM_GIC_PM && TEGRA_ACONNECT && TEGRA210_ADMA) selects PM_CLK
> which has unmet direct dependencies (PM && HAVE_CLK)
> warning: (ARM_GIC_PM && TEGRA_ACONNECT && TEGRA210_ADMA) selects PM_CLK
> which has unmet direct dependencies (PM && HAVE_CLK)

Yes this was first issue, which i did fix by adding depends, but compile
failed for other archs for these two. I dont recall the exact errors for
these two though.

If you guys fix that up, please send patches :)
Vinod Koul Sept. 20, 2016, 4:40 a.m. UTC | #5
On Fri, Sep 16, 2016 at 09:39:29AM +0200, Arnd Bergmann wrote:
> On Thursday, September 15, 2016 10:06:05 PM CEST Jon Hunter wrote:
> > On 15/09/16 18:34, Vinod Koul wrote:
> > > To get more coverage, enable COMPILE_TEST for this driver.
> > > 
> > > Cc: Jon Hunter <jonathanh@nvidia.com>
> > > Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> > > ---
> > >  drivers/dma/Kconfig | 5 +++--
> > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
> > > index 60341185a6b9..878277865ed0 100644
> > > --- a/drivers/dma/Kconfig
> > > +++ b/drivers/dma/Kconfig
> > > @@ -483,8 +483,9 @@ config TEGRA20_APB_DMA
> > >         or vice versa. It does not support memory to memory data transfer.
> > >  
> > >  config TEGRA210_ADMA
> > > -     bool "NVIDIA Tegra210 ADMA support"
> > > -     depends on ARCH_TEGRA_210_SOC
> > > +     bool "NVIDIA Tegra210 ADMA support" if COMPILE_TEST && !ARCH_TEGRA_210_SOC
> > > +     default ARCH_TEGRA_210_SOC
> > > +     depends on ARCH_ARM
> > 
> > This should be ...
> > 
> >         depends on ARM64
> > 
> >  ... because Tegra210 is ARM64 and not ARM and we will not be able to
> > enable for Tegra210 with the above 
> > 
> > Also, can you correct the $subject as this is "tegra-adma" and not
> > "tegra-apb".
> > 
> 
> Note that "ARCH_ARM" is not a valid Kconfig symbol, unlike "ARM" and "ARM64".

Okay so here is bit ugly syntax as we can enable COMPILE_TEST only for ARM
platforms. Better suggestions welcome..

config TEGRA210_ADMA
        bool "NVIDIA Tegra210 ADMA support"
        depends on ARCH_TEGRA_210_SOC || (ARM && COMPILE_TEST)
        select DMA_ENGINE
        select DMA_VIRTUAL_CHANNELS
        select PM_CLK


Thanks
diff mbox

Patch

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 60341185a6b9..878277865ed0 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -483,8 +483,9 @@  config TEGRA20_APB_DMA
 	  or vice versa. It does not support memory to memory data transfer.
 
 config TEGRA210_ADMA
-	bool "NVIDIA Tegra210 ADMA support"
-	depends on ARCH_TEGRA_210_SOC
+	bool "NVIDIA Tegra210 ADMA support" if COMPILE_TEST && !ARCH_TEGRA_210_SOC
+	default ARCH_TEGRA_210_SOC
+	depends on ARCH_ARM
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	select PM_CLK