public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: lan966x: Depend on CONFIG_IOMEM
@ 2022-02-24  3:59 David Gow
  2022-02-24  8:03 ` Anton Ivanov
  2022-02-25  0:53 ` Stephen Boyd
  0 siblings, 2 replies; 4+ messages in thread
From: David Gow @ 2022-02-24  3:59 UTC (permalink / raw)
  To: Stephen Boyd, Michael Turquette
  Cc: David Gow, linux-clk, linux-kernel, linux-um

The lan966x clk driver depends on IOMEM functions, in particular
devm_platform_ioremap_resource(), but doesn't state a formal dependency
on it in Kconfig.

Add such a dependency, which prevents this driver from being enabled
on UML configurations without IOMEM.

This fixes the following build failure:

/usr/bin/ld: drivers/clk/clk-lan966x.o: in function `lan966x_clk_probe':
clk-lan966x.c:(.text+0x294): undefined reference to `devm_platform_ioremap_resource'
/usr/bin/ld: clk-lan966x.c:(.text+0x3aa): undefined reference to `devm_ioremap_resource'
collect2: error: ld returned 1 exit status

Signed-off-by: David Gow <davidgow@google.com>
---
 drivers/clk/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 3cdf33470a75..7b5db8a9eb4f 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -231,6 +231,7 @@ config COMMON_CLK_GEMINI
 
 config COMMON_CLK_LAN966X
 	bool "Generic Clock Controller driver for LAN966X SoC"
+	depends on IOMEM
 	help
 	  This driver provides support for Generic Clock Controller(GCK) on
 	  LAN966X SoC. GCK generates and supplies clock to various peripherals
-- 
2.35.1.473.g83b2b277ed-goog


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

* Re: [PATCH] clk: lan966x: Depend on CONFIG_IOMEM
  2022-02-24  3:59 [PATCH] clk: lan966x: Depend on CONFIG_IOMEM David Gow
@ 2022-02-24  8:03 ` Anton Ivanov
  2022-02-25  0:53 ` Stephen Boyd
  1 sibling, 0 replies; 4+ messages in thread
From: Anton Ivanov @ 2022-02-24  8:03 UTC (permalink / raw)
  To: David Gow, Stephen Boyd, Michael Turquette
  Cc: linux-clk, linux-kernel, linux-um



On 24/02/2022 03:59, David Gow wrote:
> The lan966x clk driver depends on IOMEM functions, in particular
> devm_platform_ioremap_resource(), but doesn't state a formal dependency
> on it in Kconfig.
> 
> Add such a dependency, which prevents this driver from being enabled
> on UML configurations without IOMEM.
> 
> This fixes the following build failure:
> 
> /usr/bin/ld: drivers/clk/clk-lan966x.o: in function `lan966x_clk_probe':
> clk-lan966x.c:(.text+0x294): undefined reference to `devm_platform_ioremap_resource'
> /usr/bin/ld: clk-lan966x.c:(.text+0x3aa): undefined reference to `devm_ioremap_resource'
> collect2: error: ld returned 1 exit status
> 
> Signed-off-by: David Gow <davidgow@google.com>
> ---
>   drivers/clk/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 3cdf33470a75..7b5db8a9eb4f 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -231,6 +231,7 @@ config COMMON_CLK_GEMINI
>   
>   config COMMON_CLK_LAN966X
>   	bool "Generic Clock Controller driver for LAN966X SoC"
> +	depends on IOMEM
>   	help
>   	  This driver provides support for Generic Clock Controller(GCK) on
>   	  LAN966X SoC. GCK generates and supplies clock to various peripherals
> 

Acked-By: anton ivanov <anton.ivanov@cambridgegreys.com>

-- 
Anton R. Ivanov
https://www.kot-begemot.co.uk/

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

* Re: [PATCH] clk: lan966x: Depend on CONFIG_IOMEM
  2022-02-24  3:59 [PATCH] clk: lan966x: Depend on CONFIG_IOMEM David Gow
  2022-02-24  8:03 ` Anton Ivanov
@ 2022-02-25  0:53 ` Stephen Boyd
  2022-02-25  4:14   ` David Gow
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Boyd @ 2022-02-25  0:53 UTC (permalink / raw)
  To: David Gow, Michael Turquette; +Cc: David Gow, linux-clk, linux-kernel, linux-um

Quoting David Gow (2022-02-23 19:59:02)
> The lan966x clk driver depends on IOMEM functions, in particular
> devm_platform_ioremap_resource(), but doesn't state a formal dependency
> on it in Kconfig.
> 
> Add such a dependency, which prevents this driver from being enabled
> on UML configurations without IOMEM.
> 
> This fixes the following build failure:
> 
> /usr/bin/ld: drivers/clk/clk-lan966x.o: in function `lan966x_clk_probe':
> clk-lan966x.c:(.text+0x294): undefined reference to `devm_platform_ioremap_resource'
> /usr/bin/ld: clk-lan966x.c:(.text+0x3aa): undefined reference to `devm_ioremap_resource'
> collect2: error: ld returned 1 exit status
> 
> Signed-off-by: David Gow <davidgow@google.com>
> ---
>  drivers/clk/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 3cdf33470a75..7b5db8a9eb4f 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -231,6 +231,7 @@ config COMMON_CLK_GEMINI
>  
>  config COMMON_CLK_LAN966X
>         bool "Generic Clock Controller driver for LAN966X SoC"
> +       depends on IOMEM

What is CONFIG_IOMEM? This is superseded by
https://lore.kernel.org/r/20220219141536.460812-1-horatiu.vultur@microchip.com

>         help
>           This driver provides support for Generic Clock Controller(GCK) on
>           LAN966X SoC. GCK generates and supplies clock to various peripherals

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

* Re: [PATCH] clk: lan966x: Depend on CONFIG_IOMEM
  2022-02-25  0:53 ` Stephen Boyd
@ 2022-02-25  4:14   ` David Gow
  0 siblings, 0 replies; 4+ messages in thread
From: David Gow @ 2022-02-25  4:14 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Michael Turquette, linux-clk, Linux Kernel Mailing List, linux-um

[-- Attachment #1: Type: text/plain, Size: 1735 bytes --]

On Fri, Feb 25, 2022 at 8:53 AM Stephen Boyd <sboyd@kernel.org> wrote:
>
> Quoting David Gow (2022-02-23 19:59:02)
> > The lan966x clk driver depends on IOMEM functions, in particular
> > devm_platform_ioremap_resource(), but doesn't state a formal dependency
> > on it in Kconfig.
> >
> > Add such a dependency, which prevents this driver from being enabled
> > on UML configurations without IOMEM.
> >
> > This fixes the following build failure:
> >
> > /usr/bin/ld: drivers/clk/clk-lan966x.o: in function `lan966x_clk_probe':
> > clk-lan966x.c:(.text+0x294): undefined reference to `devm_platform_ioremap_resource'
> > /usr/bin/ld: clk-lan966x.c:(.text+0x3aa): undefined reference to `devm_ioremap_resource'
> > collect2: error: ld returned 1 exit status
> >
> > Signed-off-by: David Gow <davidgow@google.com>
> > ---
> >  drivers/clk/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> > index 3cdf33470a75..7b5db8a9eb4f 100644
> > --- a/drivers/clk/Kconfig
> > +++ b/drivers/clk/Kconfig
> > @@ -231,6 +231,7 @@ config COMMON_CLK_GEMINI
> >
> >  config COMMON_CLK_LAN966X
> >         bool "Generic Clock Controller driver for LAN966X SoC"
> > +       depends on IOMEM
>
> What is CONFIG_IOMEM? This is superseded by
> https://lore.kernel.org/r/20220219141536.460812-1-horatiu.vultur@microchip.com
>

Whoops, thanks! If I had a nickel every time I forgot the "HAS" in
"CONFIG_HAS_IOMEM"...

This patch indeed is no-longer needed in clk-fixes, so let's abandon it here.

Cheers,
-- David


> >         help
> >           This driver provides support for Generic Clock Controller(GCK) on
> >           LAN966X SoC. GCK generates and supplies clock to various peripherals

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4003 bytes --]

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

end of thread, other threads:[~2022-02-25  4:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-24  3:59 [PATCH] clk: lan966x: Depend on CONFIG_IOMEM David Gow
2022-02-24  8:03 ` Anton Ivanov
2022-02-25  0:53 ` Stephen Boyd
2022-02-25  4:14   ` David Gow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox