linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] mips: bcm63xx: add support for clk_get_parent()
@ 2021-11-14 16:34 Randy Dunlap
  2021-11-14 16:40 ` Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Randy Dunlap @ 2021-11-14 16:34 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, kernel test robot, Artur Rojek, Paul Cercueil,
	linux-mips, Jonathan Cameron, Lars-Peter Clausen, linux-iio,
	Florian Fainelli, Andy Shevchenko, Russell King,
	bcm-kernel-feedback-list, Jonas Gorski

BCM63XX selects HAVE_LEGACY_CLK but does not provide/support
clk_get_parent(), so add a simple implementation of that
function so that callers of it will build without errors.

Fixes these build errors:

mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4770_adc_init_clk_div':
ingenic-adc.c:(.text+0xe4): undefined reference to `clk_get_parent'
mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4725b_adc_init_clk_div':
ingenic-adc.c:(.text+0x1b8): undefined reference to `clk_get_parent'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Artur Rojek <contact@artur-rojek.eu>
Cc: Paul Cercueil <paul@crapouillou.net>
Cc: linux-mips@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: Jonas Gorski <jonas.gorski@gmail.com>
---
v1 and v2 were:
[PATCH] iio/adc: ingenic: fix (MIPS) ingenic-adc build errors
Fixes: 1a78daea107d ("IIO: add Ingenic JZ47xx ADC driver.")

 arch/mips/bcm63xx/clk.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- linux-next-20211112.orig/arch/mips/bcm63xx/clk.c
+++ linux-next-20211112/arch/mips/bcm63xx/clk.c
@@ -381,6 +381,13 @@ void clk_disable(struct clk *clk)
 
 EXPORT_SYMBOL(clk_disable);
 
+struct clk *clk_get_parent(struct clk *clk)
+{
+	return NULL;
+}
+
+EXPORT_SYMBOL(clk_get_parent);
+
 unsigned long clk_get_rate(struct clk *clk)
 {
 	if (!clk)

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

* Re: [PATCH v3] mips: bcm63xx: add support for clk_get_parent()
  2021-11-14 16:34 [PATCH v3] mips: bcm63xx: add support for clk_get_parent() Randy Dunlap
@ 2021-11-14 16:40 ` Andy Shevchenko
  2021-11-15  0:18   ` Randy Dunlap
  2021-11-14 16:59 ` Jonathan Cameron
  2021-11-14 22:55 ` Russell King (Oracle)
  2 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2021-11-14 16:40 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Linux Kernel Mailing List, kernel test robot, Artur Rojek,
	Paul Cercueil, open list:BROADCOM NVRAM DRIVER, Jonathan Cameron,
	Lars-Peter Clausen, linux-iio, Florian Fainelli, Russell King,
	bcm-kernel-feedback-list, Jonas Gorski

On Sun, Nov 14, 2021 at 6:34 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> BCM63XX selects HAVE_LEGACY_CLK but does not provide/support
> clk_get_parent(), so add a simple implementation of that
> function so that callers of it will build without errors.
>
> Fixes these build errors:
>
> mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4770_adc_init_clk_div':
> ingenic-adc.c:(.text+0xe4): undefined reference to `clk_get_parent'
> mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4725b_adc_init_clk_div':
> ingenic-adc.c:(.text+0x1b8): undefined reference to `clk_get_parent'

Some nit-picks below.
Otherwise looks good to me,
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

Suggested-by?

> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Artur Rojek <contact@artur-rojek.eu>
> Cc: Paul Cercueil <paul@crapouillou.net>
> Cc: linux-mips@vger.kernel.org
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: linux-iio@vger.kernel.org
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: Jonas Gorski <jonas.gorski@gmail.com>
> ---
> v1 and v2 were:
> [PATCH] iio/adc: ingenic: fix (MIPS) ingenic-adc build errors

> Fixes: 1a78daea107d ("IIO: add Ingenic JZ47xx ADC driver.")

Not sure why it's here. What does (the location of) this tag mean?

>  arch/mips/bcm63xx/clk.c |    7 +++++++
>  1 file changed, 7 insertions(+)
>
> --- linux-next-20211112.orig/arch/mips/bcm63xx/clk.c
> +++ linux-next-20211112/arch/mips/bcm63xx/clk.c
> @@ -381,6 +381,13 @@ void clk_disable(struct clk *clk)
>
>  EXPORT_SYMBOL(clk_disable);
>
> +struct clk *clk_get_parent(struct clk *clk)
> +{
> +       return NULL;
> +}

> +

Perhaps it's not needed even if the rest have it (I mean blank line).

> +EXPORT_SYMBOL(clk_get_parent);
> +
>  unsigned long clk_get_rate(struct clk *clk)
>  {
>         if (!clk)

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH v3] mips: bcm63xx: add support for clk_get_parent()
  2021-11-14 16:34 [PATCH v3] mips: bcm63xx: add support for clk_get_parent() Randy Dunlap
  2021-11-14 16:40 ` Andy Shevchenko
@ 2021-11-14 16:59 ` Jonathan Cameron
  2021-11-14 23:58   ` Randy Dunlap
  2021-11-14 22:55 ` Russell King (Oracle)
  2 siblings, 1 reply; 6+ messages in thread
From: Jonathan Cameron @ 2021-11-14 16:59 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, kernel test robot, Artur Rojek, Paul Cercueil,
	linux-mips, Lars-Peter Clausen, linux-iio, Florian Fainelli,
	Andy Shevchenko, Russell King, bcm-kernel-feedback-list,
	Jonas Gorski

On Sun, 14 Nov 2021 08:34:44 -0800
Randy Dunlap <rdunlap@infradead.org> wrote:

> BCM63XX selects HAVE_LEGACY_CLK but does not provide/support
> clk_get_parent(), so add a simple implementation of that
> function so that callers of it will build without errors.
> 
> Fixes these build errors:
> 
> mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4770_adc_init_clk_div':
> ingenic-adc.c:(.text+0xe4): undefined reference to `clk_get_parent'
> mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4725b_adc_init_clk_div':
> ingenic-adc.c:(.text+0x1b8): undefined reference to `clk_get_parent'
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

I wonder a bit if it makes sense to fix only the ones we hit given there
look to be other missing definitions in this subarch.
clk_has_parent() for example appears to also be missing.

Do we have the same issue with mips/lantiq?

Jonathan


> Cc: Artur Rojek <contact@artur-rojek.eu>
> Cc: Paul Cercueil <paul@crapouillou.net>
> Cc: linux-mips@vger.kernel.org
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: linux-iio@vger.kernel.org
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: Jonas Gorski <jonas.gorski@gmail.com>
> ---
> v1 and v2 were:
> [PATCH] iio/adc: ingenic: fix (MIPS) ingenic-adc build errors
> Fixes: 1a78daea107d ("IIO: add Ingenic JZ47xx ADC driver.")
> 
>  arch/mips/bcm63xx/clk.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> --- linux-next-20211112.orig/arch/mips/bcm63xx/clk.c
> +++ linux-next-20211112/arch/mips/bcm63xx/clk.c
> @@ -381,6 +381,13 @@ void clk_disable(struct clk *clk)
>  
>  EXPORT_SYMBOL(clk_disable);
>  
> +struct clk *clk_get_parent(struct clk *clk)
> +{
> +	return NULL;
> +}
> +
> +EXPORT_SYMBOL(clk_get_parent);
> +
>  unsigned long clk_get_rate(struct clk *clk)
>  {
>  	if (!clk)


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

* Re: [PATCH v3] mips: bcm63xx: add support for clk_get_parent()
  2021-11-14 16:34 [PATCH v3] mips: bcm63xx: add support for clk_get_parent() Randy Dunlap
  2021-11-14 16:40 ` Andy Shevchenko
  2021-11-14 16:59 ` Jonathan Cameron
@ 2021-11-14 22:55 ` Russell King (Oracle)
  2 siblings, 0 replies; 6+ messages in thread
From: Russell King (Oracle) @ 2021-11-14 22:55 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, kernel test robot, Artur Rojek, Paul Cercueil,
	linux-mips, Jonathan Cameron, Lars-Peter Clausen, linux-iio,
	Florian Fainelli, Andy Shevchenko, bcm-kernel-feedback-list,
	Jonas Gorski

On Sun, Nov 14, 2021 at 08:34:44AM -0800, Randy Dunlap wrote:
> BCM63XX selects HAVE_LEGACY_CLK but does not provide/support
> clk_get_parent(), so add a simple implementation of that
> function so that callers of it will build without errors.
> 
> Fixes these build errors:
> 
> mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4770_adc_init_clk_div':
> ingenic-adc.c:(.text+0xe4): undefined reference to `clk_get_parent'
> mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4725b_adc_init_clk_div':
> ingenic-adc.c:(.text+0x1b8): undefined reference to `clk_get_parent'
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>

Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

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

* Re: [PATCH v3] mips: bcm63xx: add support for clk_get_parent()
  2021-11-14 16:59 ` Jonathan Cameron
@ 2021-11-14 23:58   ` Randy Dunlap
  0 siblings, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2021-11-14 23:58 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-kernel, kernel test robot, Artur Rojek, Paul Cercueil,
	linux-mips, Lars-Peter Clausen, linux-iio, Florian Fainelli,
	Andy Shevchenko, Russell King, bcm-kernel-feedback-list,
	Jonas Gorski

On 11/14/21 8:59 AM, Jonathan Cameron wrote:
> On Sun, 14 Nov 2021 08:34:44 -0800
> Randy Dunlap <rdunlap@infradead.org> wrote:
> 
>> BCM63XX selects HAVE_LEGACY_CLK but does not provide/support
>> clk_get_parent(), so add a simple implementation of that
>> function so that callers of it will build without errors.
>>
>> Fixes these build errors:
>>
>> mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4770_adc_init_clk_div':
>> ingenic-adc.c:(.text+0xe4): undefined reference to `clk_get_parent'
>> mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4725b_adc_init_clk_div':
>> ingenic-adc.c:(.text+0x1b8): undefined reference to `clk_get_parent'
>>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Reported-by: kernel test robot <lkp@intel.com>
> 
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> I wonder a bit if it makes sense to fix only the ones we hit given there
> look to be other missing definitions in this subarch.
> clk_has_parent() for example appears to also be missing.

I haven't seen any failures for clk_has_parent().

I'm not actively looking for build errors; I'm just fixing
reported problems (usually and in this case).
There are plenty of them being reported without me having
to go looking for more.

> Do we have the same issue with mips/lantiq?

Yes, now that you made me look. :)
Now I'll have to send a patch for that subarch also.

-- 
~Randy

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

* Re: [PATCH v3] mips: bcm63xx: add support for clk_get_parent()
  2021-11-14 16:40 ` Andy Shevchenko
@ 2021-11-15  0:18   ` Randy Dunlap
  0 siblings, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2021-11-15  0:18 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Linux Kernel Mailing List, kernel test robot, Artur Rojek,
	Paul Cercueil, open list:BROADCOM NVRAM DRIVER, Jonathan Cameron,
	Lars-Peter Clausen, linux-iio, Florian Fainelli, Russell King,
	bcm-kernel-feedback-list, Jonas Gorski

On 11/14/21 8:40 AM, Andy Shevchenko wrote:
> On Sun, Nov 14, 2021 at 6:34 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>> BCM63XX selects HAVE_LEGACY_CLK but does not provide/support
>> clk_get_parent(), so add a simple implementation of that
>> function so that callers of it will build without errors.
>>
>> Fixes these build errors:
>>
>> mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4770_adc_init_clk_div':
>> ingenic-adc.c:(.text+0xe4): undefined reference to `clk_get_parent'
>> mips-linux-ld: drivers/iio/adc/ingenic-adc.o: in function `jz4725b_adc_init_clk_div':
>> ingenic-adc.c:(.text+0x1b8): undefined reference to `clk_get_parent'
> 
> Some nit-picks below.
> Otherwise looks good to me,
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> 
> Suggested-by?

Yes, I'll add Russell for that.

>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Cc: Artur Rojek <contact@artur-rojek.eu>
>> Cc: Paul Cercueil <paul@crapouillou.net>
>> Cc: linux-mips@vger.kernel.org
>> Cc: Jonathan Cameron <jic23@kernel.org>
>> Cc: Lars-Peter Clausen <lars@metafoo.de>
>> Cc: linux-iio@vger.kernel.org
>> Cc: Florian Fainelli <f.fainelli@gmail.com>
>> Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
>> Cc: Russell King <linux@armlinux.org.uk>
>> Cc: bcm-kernel-feedback-list@broadcom.com
>> Cc: Jonas Gorski <jonas.gorski@gmail.com>
>> ---
>> v1 and v2 were:
>> [PATCH] iio/adc: ingenic: fix (MIPS) ingenic-adc build errors
> 
>> Fixes: 1a78daea107d ("IIO: add Ingenic JZ47xx ADC driver.")
> 
> Not sure why it's here. What does (the location of) this tag mean?

Yesterday I didn't see what Fixes: tag I should use,
but after looking again, it looks like I should use
Fixes: e7300d04bd08 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs."


> 
>>   arch/mips/bcm63xx/clk.c |    7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> --- linux-next-20211112.orig/arch/mips/bcm63xx/clk.c
>> +++ linux-next-20211112/arch/mips/bcm63xx/clk.c
>> @@ -381,6 +381,13 @@ void clk_disable(struct clk *clk)
>>
>>   EXPORT_SYMBOL(clk_disable);
>>
>> +struct clk *clk_get_parent(struct clk *clk)
>> +{
>> +       return NULL;
>> +}
> 
>> +
> 
> Perhaps it's not needed even if the rest have it (I mean blank line).

Sure, I'll drop it. It was for file consistency,
but it's not a big deal either way.

>> +EXPORT_SYMBOL(clk_get_parent);
>> +
>>   unsigned long clk_get_rate(struct clk *clk)
>>   {
>>          if (!clk)
> 

Thanks.
-- 
~Randy

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

end of thread, other threads:[~2021-11-15  0:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-14 16:34 [PATCH v3] mips: bcm63xx: add support for clk_get_parent() Randy Dunlap
2021-11-14 16:40 ` Andy Shevchenko
2021-11-15  0:18   ` Randy Dunlap
2021-11-14 16:59 ` Jonathan Cameron
2021-11-14 23:58   ` Randy Dunlap
2021-11-14 22:55 ` Russell King (Oracle)

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).