Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/52xx: Remove dead code, i.e. mpc52xx_get_xtal_freq()

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

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220507100147.5802-1-andriy.shevchenko@linux.intel.com

authored by

Andy Shevchenko and committed by
Michael Ellerman
6d056b72 882c835b

-38
-1
arch/powerpc/include/asm/mpc52xx.h
··· 274 274 extern int mpc5200_psc_ac97_gpio_reset(int psc_number); 275 275 extern void mpc52xx_map_common_devices(void); 276 276 extern int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv); 277 - extern unsigned int mpc52xx_get_xtal_freq(struct device_node *node); 278 277 extern void __noreturn mpc52xx_restart(char *cmd); 279 278 280 279 /* mpc52xx_gpt.c */
-37
arch/powerpc/platforms/52xx/mpc52xx_common.c
··· 204 204 EXPORT_SYMBOL(mpc52xx_set_psc_clkdiv); 205 205 206 206 /** 207 - * mpc52xx_get_xtal_freq - Get SYS_XTAL_IN frequency for a device 208 - * 209 - * @node: device node 210 - * 211 - * Returns the frequency of the external oscillator clock connected 212 - * to the SYS_XTAL_IN pin, or 0 if it cannot be determined. 213 - */ 214 - unsigned int mpc52xx_get_xtal_freq(struct device_node *node) 215 - { 216 - u32 val; 217 - unsigned int freq; 218 - 219 - if (!mpc52xx_cdm) 220 - return 0; 221 - 222 - freq = mpc5xxx_get_bus_frequency(node); 223 - if (!freq) 224 - return 0; 225 - 226 - if (in_8(&mpc52xx_cdm->ipb_clk_sel) & 0x1) 227 - freq *= 2; 228 - 229 - val = in_be32(&mpc52xx_cdm->rstcfg); 230 - if (val & (1 << 5)) 231 - freq *= 8; 232 - else 233 - freq *= 4; 234 - if (val & (1 << 6)) 235 - freq /= 12; 236 - else 237 - freq /= 16; 238 - 239 - return freq; 240 - } 241 - EXPORT_SYMBOL(mpc52xx_get_xtal_freq); 242 - 243 - /** 244 207 * mpc52xx_restart: ppc_md->restart hook for mpc5200 using the watchdog timer 245 208 */ 246 209 void __noreturn mpc52xx_restart(char *cmd)