linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc: litex: Properly depend on HAS_IOMEM
@ 2021-01-27  3:36 David Gow
  2021-01-27 12:27 ` Stafford Horne
  0 siblings, 1 reply; 4+ messages in thread
From: David Gow @ 2021-01-27  3:36 UTC (permalink / raw)
  To: Pawel Czarnecki, Stafford Horne, Mateusz Holenko; +Cc: David Gow, linux-kernel

The LiteX SOC controller driver makes use of IOMEM functions like
devm_platform_ioremap_resource(), which are only available if
CONFIG_HAS_IOMEM is defined.

This causes the driver not to be enable under make ARCH=um allyesconfig,
even though it won't build.

By adding a dependency on HAS_IOMEM, the driver will not be enabled on
architectures which don't support it.

Fixes: 22447a99c97e ("drivers/soc/litex: add LiteX SoC Controller driver")
Signed-off-by: David Gow <davidgow@google.com>
---
 drivers/soc/litex/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/litex/Kconfig b/drivers/soc/litex/Kconfig
index 7c6b009b6f6c..7a7c38282e11 100644
--- a/drivers/soc/litex/Kconfig
+++ b/drivers/soc/litex/Kconfig
@@ -8,6 +8,7 @@ config LITEX
 config LITEX_SOC_CONTROLLER
 	tristate "Enable LiteX SoC Controller driver"
 	depends on OF || COMPILE_TEST
+	depends on HAS_IOMEM
 	select LITEX
 	help
 	  This option enables the SoC Controller Driver which verifies
-- 
2.30.0.280.ga3ce27912f-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] soc: litex: Properly depend on HAS_IOMEM
  2021-01-27  3:36 [PATCH] soc: litex: Properly depend on HAS_IOMEM David Gow
@ 2021-01-27 12:27 ` Stafford Horne
  2021-01-27 16:49   ` David Gow
  0 siblings, 1 reply; 4+ messages in thread
From: Stafford Horne @ 2021-01-27 12:27 UTC (permalink / raw)
  To: David Gow; +Cc: Pawel Czarnecki, Mateusz Holenko, linux-kernel

On Tue, Jan 26, 2021 at 07:36:04PM -0800, David Gow wrote:
> The LiteX SOC controller driver makes use of IOMEM functions like
> devm_platform_ioremap_resource(), which are only available if
> CONFIG_HAS_IOMEM is defined.
> 
> This causes the driver not to be enable under make ARCH=um allyesconfig,
> even though it won't build.

Is this wording correct?  I suspect it causes to driver TO BE enabled.

> 
> By adding a dependency on HAS_IOMEM, the driver will not be enabled on
> architectures which don't support it.
> 
> Fixes: 22447a99c97e ("drivers/soc/litex: add LiteX SoC Controller driver")
> Signed-off-by: David Gow <davidgow@google.com>a

This looks ok to me.  I can queue it for 5.11 fixes, if you can help with the
wording above.

-Stafford

> ---
>  drivers/soc/litex/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/soc/litex/Kconfig b/drivers/soc/litex/Kconfig
> index 7c6b009b6f6c..7a7c38282e11 100644
> --- a/drivers/soc/litex/Kconfig
> +++ b/drivers/soc/litex/Kconfig
> @@ -8,6 +8,7 @@ config LITEX
>  config LITEX_SOC_CONTROLLER
>  	tristate "Enable LiteX SoC Controller driver"
>  	depends on OF || COMPILE_TEST
> +	depends on HAS_IOMEM
>  	select LITEX
>  	help
>  	  This option enables the SoC Controller Driver which verifies
> -- 
> 2.30.0.280.ga3ce27912f-goog
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] soc: litex: Properly depend on HAS_IOMEM
  2021-01-27 12:27 ` Stafford Horne
@ 2021-01-27 16:49   ` David Gow
  2021-01-27 23:17     ` Stafford Horne
  0 siblings, 1 reply; 4+ messages in thread
From: David Gow @ 2021-01-27 16:49 UTC (permalink / raw)
  To: Stafford Horne
  Cc: Pawel Czarnecki, Mateusz Holenko, Linux Kernel Mailing List

On Wed, Jan 27, 2021 at 8:27 PM Stafford Horne <shorne@gmail.com> wrote:
>
> On Tue, Jan 26, 2021 at 07:36:04PM -0800, David Gow wrote:
> > The LiteX SOC controller driver makes use of IOMEM functions like
> > devm_platform_ioremap_resource(), which are only available if
> > CONFIG_HAS_IOMEM is defined.
> >
> > This causes the driver not to be enable under make ARCH=um allyesconfig,
> > even though it won't build.
>
> Is this wording correct?  I suspect it causes to driver TO BE enabled.
>

Whoops! Yes: that should be "causes the driver to be enabled" -- sorry
about that.

Let me know if you want me to re-send it with the fixed wording, or if
you just want to fix that yourself.

> >
> > By adding a dependency on HAS_IOMEM, the driver will not be enabled on
> > architectures which don't support it.
> >
> > Fixes: 22447a99c97e ("drivers/soc/litex: add LiteX SoC Controller driver")
> > Signed-off-by: David Gow <davidgow@google.com>a
>
> This looks ok to me.  I can queue it for 5.11 fixes, if you can help with the
> wording above.

Thanks: that'd be great!

Cheers,
-- David

>
> -Stafford
>
> > ---
> >  drivers/soc/litex/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/soc/litex/Kconfig b/drivers/soc/litex/Kconfig
> > index 7c6b009b6f6c..7a7c38282e11 100644
> > --- a/drivers/soc/litex/Kconfig
> > +++ b/drivers/soc/litex/Kconfig
> > @@ -8,6 +8,7 @@ config LITEX
> >  config LITEX_SOC_CONTROLLER
> >       tristate "Enable LiteX SoC Controller driver"
> >       depends on OF || COMPILE_TEST
> > +     depends on HAS_IOMEM
> >       select LITEX
> >       help
> >         This option enables the SoC Controller Driver which verifies
> > --
> > 2.30.0.280.ga3ce27912f-goog
> >

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] soc: litex: Properly depend on HAS_IOMEM
  2021-01-27 16:49   ` David Gow
@ 2021-01-27 23:17     ` Stafford Horne
  0 siblings, 0 replies; 4+ messages in thread
From: Stafford Horne @ 2021-01-27 23:17 UTC (permalink / raw)
  To: David Gow; +Cc: Pawel Czarnecki, Mateusz Holenko, Linux Kernel Mailing List

On Thu, Jan 28, 2021 at 12:49:56AM +0800, David Gow wrote:
> On Wed, Jan 27, 2021 at 8:27 PM Stafford Horne <shorne@gmail.com> wrote:
> >
> > On Tue, Jan 26, 2021 at 07:36:04PM -0800, David Gow wrote:
> > > The LiteX SOC controller driver makes use of IOMEM functions like
> > > devm_platform_ioremap_resource(), which are only available if
> > > CONFIG_HAS_IOMEM is defined.
> > >
> > > This causes the driver not to be enable under make ARCH=um allyesconfig,
> > > even though it won't build.
> >
> > Is this wording correct?  I suspect it causes to driver TO BE enabled.
> >
> 
> Whoops! Yes: that should be "causes the driver to be enabled" -- sorry
> about that.
> 
> Let me know if you want me to re-send it with the fixed wording, or if
> you just want to fix that yourself.

OK, I'll fix it.

> > >
> > > By adding a dependency on HAS_IOMEM, the driver will not be enabled on
> > > architectures which don't support it.
> > >
> > > Fixes: 22447a99c97e ("drivers/soc/litex: add LiteX SoC Controller driver")
> > > Signed-off-by: David Gow <davidgow@google.com>a
> >
> > This looks ok to me.  I can queue it for 5.11 fixes, if you can help with the
> > wording above.
> 
> Thanks: that'd be great!

No problem.

-Stafford


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-27 23:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27  3:36 [PATCH] soc: litex: Properly depend on HAS_IOMEM David Gow
2021-01-27 12:27 ` Stafford Horne
2021-01-27 16:49   ` David Gow
2021-01-27 23:17     ` Stafford Horne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).