From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 5/6] powerpc: Remove unused functions
Date: Tue, 15 Sep 2020 09:03:04 +0200 [thread overview]
Message-ID: <20200915070305.15763-6-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20200915070305.15763-1-s.hauer@pengutronix.de>
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@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
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-09-15 7:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-15 7:02 [PATCH 0/6] powerpc: Fix compiler warnings Sascha Hauer
2020-09-15 7:03 ` [PATCH 1/6] powerpc: Add prototypes to header file Sascha Hauer
2020-09-15 7:03 ` [PATCH 2/6] powerpc: Add missing includes Sascha Hauer
2020-09-15 7:03 ` [PATCH 3/6] powerpc: Make locally used functions static Sascha Hauer
2020-09-15 7:03 ` [PATCH 4/6] powerpc: Add prototypes for functions called from assembly Sascha Hauer
2020-09-15 7:03 ` Sascha Hauer [this message]
2020-09-15 7:03 ` [PATCH 6/6] powerpc: Add function prototypes for exception handlers Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200915070305.15763-6-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox