Skip to contentSkip to conversation

mips: bcm63xx: add support for clk_get_parent()

PATCH Applied Randy Dunlap 4 participants 5 messages Nov 15, 2021 – Nov 16, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 mips: bcm63xx: add support for clk_get_parent()

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'

Fixes e7300d04bd08 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs." )
Cc Artur Rojek <[email protected]>
Cc Paul Cercueil <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Russell King <[email protected]>
Cc Jonas Gorski <[email protected]>

---
v1 and v2 were:
[PATCH] iio/adc: ingenic: fix (MIPS) ingenic-adc build errors
(limiting this driver to MACH_INGENIC in Kconfig)
v3: add clk_get_parent() to arch/mips/bcm63xx/clk.c v4:
add Fixes:, Suggested-by:, Reviewed-by: Acked-by:
drop blank line between function and EXPORT_SYMBOL(); (Andy)

 arch/mips/bcm63xx/clk.c |    7 +++++++
 1 file changed, 7 insertions(+)
arch/mips/bcm63xx/clk.c +6 -0
@@ -381,6 +381,12 @@ 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)
Acked-by on v4 1/1
#1 lore raw
Quoted 21 lines · Randy Dunlap

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'

Fixes e7300d04bd08 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs." )
Cc Artur Rojek <[email protected]>
Cc Paul Cercueil <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
Quoted 8 lines
Signature · 1 line
Florian
#2 lore raw
In reply to Randy Dunlap

On Mon, Nov 15, 2021 at 2:42 AM Randy Dunlap <[email protected]> wrote:

Just couple of side notes on the same topic (dropped people from Cc, just MLs are left):

Quoted 10 lines
Cc Jonathan Cameron <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Russell King <[email protected]>

1/ git format-patch/git send-email will create the Cc list from all known tags, hence no need to repeat people in Cc.
2/ Consider to use --cc and --to to avoid burden on the git history (sometimes people want to see it on mobile devices).

For myself I wrote the script [1] to give me some smartness. Maybe you can find some ideas inside its implementation.

[1]: https://github.com/andy-shev/home-bin-tools/blob/master/ge2maintainer.sh

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 21 lines · Andy Shevchenko

On Mon, Nov 15, 2021 at 2:42 AM Randy Dunlap <[email protected]> wrote:

Just couple of side notes on the same topic (dropped people from Cc, just MLs are left):

Quoted 10 lines
Cc Jonathan Cameron <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Russell King <[email protected]>

1/ git format-patch/git send-email will create the Cc list from all known tags, hence no need to repeat people in Cc.
2/ Consider to use --cc and --to to avoid burden on the git history (sometimes people want to see it on mobile devices).

Quoted 4 lines

For myself I wrote the script [1] to give me some smartness. Maybe you can find some ideas inside its implementation.

[1]: https://github.com/andy-shev/home-bin-tools/blob/master/ge2maintainer.sh

OK, I'll look into that.

Thanks.

Signature · 1 line
~Randy
maintainer Applied
#4 lore raw
In reply to Randy Dunlap
Quoted 46 lines · Randy Dunlap

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'

Fixes e7300d04bd08 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs." )
Cc Artur Rojek <[email protected]>
Cc Paul Cercueil <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Russell King <[email protected]>
Cc Jonas Gorski <[email protected]>

---
v1 and v2 were:
[PATCH] iio/adc: ingenic: fix (MIPS) ingenic-adc build errors
(limiting this driver to MACH_INGENIC in Kconfig)
v3: add clk_get_parent() to arch/mips/bcm63xx/clk.c v4:
add Fixes:, Suggested-by:, Reviewed-by: Acked-by:
drop blank line between function and EXPORT_SYMBOL(); (Andy)

 arch/mips/bcm63xx/clk.c |    7 +++++++
 1 file changed, 7 insertions(+)
arch/mips/bcm63xx/clk.c +0 -0
@@ -381,6 +381,12 @@ void clk_disable(struct clk *clk)
 
 EXPORT_SYMBOL(clk_disable);

arch/mips/bcm63xx/clk.c void clk_disable(struct clk *clk) · line 392

Quoted 10 lines
arch/mips/bcm63xx/clk.c +6 -0
 
+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)

applied to mips-fixes.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]