diff mbox

dmaengine: Kconfig: Extend the dependency for MXS_DMA

Message ID CAOMZO5C4DuTt9vSrdOLfXhLbZ-rjJ0iKjtEyEDd4A4MSW0Wb=Q@mail.gmail.com (mailing list archive)
State Superseded
Headers show

Commit Message

Fabio Estevam June 6, 2017, 10:19 p.m. UTC
On Tue, Jun 6, 2017 at 5:32 PM, Stefan Agner <stefan@agner.ch> wrote:

> FWIW, I would prefer the HAVE_MXS_DMA solution, this also makes it less
> likely that new SoC forget to add MXS_DMA support since it will be
> inside arch/arm/mach-imx/Kconfig.

I think that a cleaner solution would be to do like this:


What do you think?
--
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

Comments

Stefan Agner June 6, 2017, 10:22 p.m. UTC | #1
On 2017-06-06 15:19, Fabio Estevam wrote:
> On Tue, Jun 6, 2017 at 5:32 PM, Stefan Agner <stefan@agner.ch> wrote:
> 
>> FWIW, I would prefer the HAVE_MXS_DMA solution, this also makes it less
>> likely that new SoC forget to add MXS_DMA support since it will be
>> inside arch/arm/mach-imx/Kconfig.
> 
> I think that a cleaner solution would be to do like this:
> 
> --- a/drivers/dma/Kconfig
> +++ b/drivers/dma/Kconfig
> @@ -371,7 +371,7 @@ config MV_XOR_V2
> 
>  config MXS_DMA
>         bool "MXS DMA support"
> -       depends on SOC_IMX23 || SOC_IMX28 || SOC_IMX6Q || SOC_IMX6UL
> +       depends on ARCH_MXS || ARCH_MXC
>         select STMP_DEVICE
>         select DMA_ENGINE
>         help
> 
> What do you think?

Not sure, is really every ARCH_MXS/MXC supporting DMA?

But then, is it a problem if we allow to enable a driver although not
available in a certain SoC?

--
Stefan
--
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
Fabio Estevam June 6, 2017, 10:30 p.m. UTC | #2
On Tue, Jun 6, 2017 at 7:22 PM, Stefan Agner <stefan@agner.ch> wrote:

> Not sure, is really every ARCH_MXS/MXC supporting DMA?

All ARCH_MXS (mx23 and mx28) support MXS DMA.

Not every ARCH_MXC supports MXS DMA. For example
mx27/25/31/35/50/51/53 do not have the mxs dma block.

> But then, is it a problem if we allow to enable a driver although not
> available in a certain SoC?

I don't think it is a problem.

Currently we do the same for the sdma driver.

IMX_SDMA also contains 'depends on ARCH_MXC' even though not all
ARCH_MXC has the the SDMA engine. mx27, for example does not have it,
so this proposal seems safe.
--
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
Vinod Koul June 7, 2017, 5:27 a.m. UTC | #3
On Tue, Jun 06, 2017 at 07:30:23PM -0300, Fabio Estevam wrote:
> On Tue, Jun 6, 2017 at 7:22 PM, Stefan Agner <stefan@agner.ch> wrote:
> 
> > Not sure, is really every ARCH_MXS/MXC supporting DMA?
> 
> All ARCH_MXS (mx23 and mx28) support MXS DMA.
> 
> Not every ARCH_MXC supports MXS DMA. For example
> mx27/25/31/35/50/51/53 do not have the mxs dma block.
> 
> > But then, is it a problem if we allow to enable a driver although not
> > available in a certain SoC?
> 
> I don't think it is a problem.

And if the SoC doesn't support, do you see an issue? The module should just
get init and keep quiet, it wont get probed.

> 
> Currently we do the same for the sdma driver.
> 
> IMX_SDMA also contains 'depends on ARCH_MXC' even though not all
> ARCH_MXC has the the SDMA engine. mx27, for example does not have it,
> so this proposal seems safe.
Fabio Estevam June 7, 2017, 12:42 p.m. UTC | #4
On Wed, Jun 7, 2017 at 2:27 AM, Vinod Koul <vinod.koul@intel.com> wrote:

> And if the SoC doesn't support, do you see an issue? The module should just
> get init and keep quiet, it wont get probed.

Correct, it should be not an issue. I sent a v2 with this approach.

It aligns with the other i.MX DMA engines (IMX_DMA and IMX_SDMA) where
we do 'depends on ARCH_MXC'.

Thanks
--
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
diff mbox

Patch

--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -371,7 +371,7 @@  config MV_XOR_V2

 config MXS_DMA
        bool "MXS DMA support"
-       depends on SOC_IMX23 || SOC_IMX28 || SOC_IMX6Q || SOC_IMX6UL
+       depends on ARCH_MXS || ARCH_MXC
        select STMP_DEVICE
        select DMA_ENGINE
        help