linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/4] powerpc/52xx: Remove dead code, i.e. mpc52xx_get_xtal_freq()
@ 2022-05-04 13:44 Andy Shevchenko
  2022-05-04 13:44 ` [PATCH v1 2/4] powerpc/mpc5xxx: Switch mpc5xxx_get_bus_frequency() to use fwnode Andy Shevchenko
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-05-04 13:44 UTC (permalink / raw)
  To: Andy Shevchenko, Sergey Shtylyov, Damien Le Moal, Wolfram Sang,
	Chris Packham, Marc Kleine-Budde, David S. Miller,
	Jakub Kicinski, Greg Kroah-Hartman, Jiri Slaby, linuxppc-dev,
	linux-kernel, linux-ide, linux-i2c, linux-can, netdev, linux-spi,
	linux-serial
  Cc: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras,
	Anatolij Gustschin, Wolfgang Grandegger, Eric Dumazet,
	Paolo Abeni, Pantelis Antoniou, Mark Brown

It seems mpc52xx_get_xtal_freq() is not used anywhere. Remove dead code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 arch/powerpc/include/asm/mpc52xx.h           |  1 -
 arch/powerpc/platforms/52xx/mpc52xx_common.c | 37 --------------------
 2 files changed, 38 deletions(-)

diff --git a/arch/powerpc/include/asm/mpc52xx.h b/arch/powerpc/include/asm/mpc52xx.h
index ce1e0aabaa64..ddd80aae1e32 100644
--- a/arch/powerpc/include/asm/mpc52xx.h
+++ b/arch/powerpc/include/asm/mpc52xx.h
@@ -274,7 +274,6 @@ extern void mpc52xx_declare_of_platform_devices(void);
 extern int mpc5200_psc_ac97_gpio_reset(int psc_number);
 extern void mpc52xx_map_common_devices(void);
 extern int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv);
-extern unsigned int mpc52xx_get_xtal_freq(struct device_node *node);
 extern void __noreturn mpc52xx_restart(char *cmd);
 
 /* mpc52xx_gpt.c */
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 565e3a83dc9e..4a39e1cb2263 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -203,43 +203,6 @@ int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv)
 }
 EXPORT_SYMBOL(mpc52xx_set_psc_clkdiv);
 
-/**
- * mpc52xx_get_xtal_freq - Get SYS_XTAL_IN frequency for a device
- *
- * @node: device node
- *
- * Returns the frequency of the external oscillator clock connected
- * to the SYS_XTAL_IN pin, or 0 if it cannot be determined.
- */
-unsigned int mpc52xx_get_xtal_freq(struct device_node *node)
-{
-	u32 val;
-	unsigned int freq;
-
-	if (!mpc52xx_cdm)
-		return 0;
-
-	freq = mpc5xxx_get_bus_frequency(node);
-	if (!freq)
-		return 0;
-
-	if (in_8(&mpc52xx_cdm->ipb_clk_sel) & 0x1)
-		freq *= 2;
-
-	val  = in_be32(&mpc52xx_cdm->rstcfg);
-	if (val & (1 << 5))
-		freq *= 8;
-	else
-		freq *= 4;
-	if (val & (1 << 6))
-		freq /= 12;
-	else
-		freq /= 16;
-
-	return freq;
-}
-EXPORT_SYMBOL(mpc52xx_get_xtal_freq);
-
 /**
  * mpc52xx_restart: ppc_md->restart hook for mpc5200 using the watchdog timer
  */
-- 
2.35.1


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

end of thread, other threads:[~2022-05-05  1:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04 13:44 [PATCH v1 1/4] powerpc/52xx: Remove dead code, i.e. mpc52xx_get_xtal_freq() Andy Shevchenko
2022-05-04 13:44 ` [PATCH v1 2/4] powerpc/mpc5xxx: Switch mpc5xxx_get_bus_frequency() to use fwnode Andy Shevchenko
2022-05-04 14:08   ` Marc Kleine-Budde
2022-05-04 14:14   ` Damien Le Moal
2022-05-04 15:03   ` Mark Brown
2022-05-04 20:11   ` Wolfram Sang
2022-05-04 22:27   ` kernel test robot
2022-05-04 23:52   ` Chris Packham
2022-05-05  1:03   ` kernel test robot
2022-05-04 13:44 ` [PATCH v1 3/4] powerpc/52xx: Get rid of of_node assignment Andy Shevchenko
2022-05-04 13:44 ` [PATCH v1 4/4] powerpc/52xx: Convert to use fwnode API Andy Shevchenko
2022-05-04 20:09 ` [PATCH v1 1/4] powerpc/52xx: Remove dead code, i.e. mpc52xx_get_xtal_freq() Wolfram Sang

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