[PATCH 5/6] powerpc: Remove unused functions

Sascha Hauer s.hauer at pengutronix.de
Tue Sep 15 03:03:04 EDT 2020


Some functions are unused in the code base and do not have a prototype
in any header file. Remove them.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/powerpc/mach-mpc5xxx/cpu.c      | 24 -------------------
 arch/powerpc/mach-mpc5xxx/traps.c    | 22 -----------------
 arch/powerpc/mach-mpc85xx/fsl_gpio.c | 35 ----------------------------
 arch/powerpc/mach-mpc85xx/speed.c    |  9 -------
 4 files changed, 90 deletions(-)

diff --git a/arch/powerpc/mach-mpc5xxx/cpu.c b/arch/powerpc/mach-mpc5xxx/cpu.c
index a85e1667bc..d8d4dfb2ce 100644
--- a/arch/powerpc/mach-mpc5xxx/cpu.c
+++ b/arch/powerpc/mach-mpc5xxx/cpu.c
@@ -33,30 +33,6 @@
 #include <asm-generic/memory_layout.h>
 #include <memory.h>
 
-int checkcpu (void)
-{
-	ulong clock = get_cpu_clock();
-	uint svr, pvr;
-
-	puts ("CPU:   ");
-
-	svr = get_svr();
-	pvr = get_pvr();
-	switch (SVR_VER (svr)) {
-	case SVR_MPC5200:
-		printf ("MPC5200");
-		break;
-	default:
-		printf ("MPC52??  (SVR %08x)", svr);
-		break;
-	}
-
-	printf (" v%d.%d, Core v%d.%d", SVR_MJREV (svr), SVR_MNREV (svr),
-		PVR_MAJ(pvr), PVR_MIN(pvr));
-	printf (" at %ld Hz\n", clock);
-	return 0;
-}
-
 /* ------------------------------------------------------------------------- */
 
 static int mpc5xxx_reserve_region(void)
diff --git a/arch/powerpc/mach-mpc5xxx/traps.c b/arch/powerpc/mach-mpc5xxx/traps.c
index b3cb5f8318..e93b5d6d75 100644
--- a/arch/powerpc/mach-mpc5xxx/traps.c
+++ b/arch/powerpc/mach-mpc5xxx/traps.c
@@ -168,19 +168,6 @@ ProgramCheckException(struct pt_regs *regs)
 	panic("Program Check Exception");
 }
 
-void
-SoftEmuException(struct pt_regs *regs)
-{
-#ifdef CONFIG_KGDB
-	if (debugger_exception_handler && (*debugger_exception_handler)(regs))
-		return;
-#endif
-	show_regs(regs);
-	print_backtrace((unsigned long *)regs->gpr[1]);
-	panic("Software Emulation Exception");
-}
-
-
 void
 UnknownException(struct pt_regs *regs)
 {
@@ -207,12 +194,3 @@ DebugException(struct pt_regs *regs)
   do_bedbug_breakpoint( regs );
 #endif
 }
-
-/* Probe an address by reading.  If not present, return -1, otherwise
- * return 0.
- */
-int
-addr_probe(uint *addr)
-{
-	return 0;
-}
diff --git a/arch/powerpc/mach-mpc85xx/fsl_gpio.c b/arch/powerpc/mach-mpc85xx/fsl_gpio.c
index 468c780ff8..85994dcf1b 100644
--- a/arch/powerpc/mach-mpc85xx/fsl_gpio.c
+++ b/arch/powerpc/mach-mpc85xx/fsl_gpio.c
@@ -28,39 +28,4 @@ void fsl_enable_gpiout(void)
 
 	out_be32(gpiocr, in_be32(gpiocr) | MPC85xx_GPIOCR_GPOUT);
 }
-
-void gpio_set_value(unsigned gpio, int val)
-{
-	void __iomem *gpout = IOMEM(MPC85xx_GUTS_ADDR + MPC85xx_GPOUTDR_OFFSET);
-	int gpoutdr;
-
-	if (gpio >= 8)
-		return;
-
-	gpoutdr = in_be32(gpout);
-	if (val)
-		gpoutdr |= MPC85xx_GPIOBIT(gpio);
-	else
-		gpoutdr &= ~MPC85xx_GPIOBIT(gpio);
-	out_be32(gpout, gpoutdr);
-}
-#else
-int gpio_direction_output(unsigned gpio, int val)
-{
-	void __iomem *gpior = IOMEM(MPC85xx_GPIO_ADDR);
-
-	if (gpio >= 16)
-		return -EINVAL;
-
-	if (val)
-		setbits_be32(gpior + MPC85xx_GPIO_GPDAT_OFFSET,
-				1 << (32 - gpio));
-	else
-		clrbits_be32(gpior + MPC85xx_GPIO_GPDAT_OFFSET,
-				1 << (32 - gpio));
-
-	setbits_be32(gpior + MPC85xx_GPIO_GPDIR_OFFSET, 1 << (32 - gpio));
-
-	return 0;
-}
 #endif
diff --git a/arch/powerpc/mach-mpc85xx/speed.c b/arch/powerpc/mach-mpc85xx/speed.c
index 7f3cfc4dcd..16ce72d846 100644
--- a/arch/powerpc/mach-mpc85xx/speed.c
+++ b/arch/powerpc/mach-mpc85xx/speed.c
@@ -85,15 +85,6 @@ void fsl_get_sys_info(struct sys_info *sysInfo)
 	}
 }
 
-unsigned long fsl_get_local_freq(void)
-{
-	struct sys_info sys_info;
-
-	fsl_get_sys_info(&sys_info);
-
-	return sys_info.freqLocalBus;
-}
-
 unsigned long fsl_get_bus_freq(ulong dummy)
 {
 	struct sys_info sys_info;
-- 
2.28.0




More information about the barebox mailing list