@@ -40,24 +40,6 @@ int checkcpu(void)
/* ------------------------------------------------------------------------- */
-void cpu_reset(void)
-{
- /* Interrupts off */
- disable_interrupts();
-
- /* jump to restart in flash */
- _reset_reloc();
-}
-
-int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
-{
- cpu_reset();
-
- return 1;
-}
-
-/* ------------------------------------------------------------------------- */
-
#ifdef CONFIG_GRETH
int cpu_eth_init(bd_t *bis)
{
@@ -41,25 +41,6 @@ int checkcpu(void)
return 0;
}
-/* ------------------------------------------------------------------------- */
-
-void cpu_reset(void)
-{
- /* Interrupts off */
- disable_interrupts();
-
- /* jump to restart in flash */
- _reset_reloc();
-}
-
-int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
-{
- cpu_reset();
-
- return 1;
-
-}
-
u64 flash_read64(void *addr)
{
return __raw_readq(addr);
@@ -445,4 +445,15 @@ void hang(void)
for (;;) ;
}
+int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
+{
+ /* Interrupts off */
+ disable_interrupts();
+
+ /* jump to restart in flash */
+ _reset_reloc();
+
+ return 1;
+}
+
/************************************************************************/
Both Sparc processor variants have the same do_reset() and reset_cpu() function implementations. Furthermore, the only caller of the reset_cpu() function on Sparc is do_reset(). To simplify and prepare for Sparc generic-restart support this patch removes 26 lines of code by merging the functions together and moving them into common code. Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com> Cc: Daniel Hellstrom <daniel@gaisler.com> --- arch/sparc/cpu/leon2/cpu.c | 18 ------------------ arch/sparc/cpu/leon3/cpu.c | 19 ------------------- arch/sparc/lib/board.c | 11 +++++++++++ 3 files changed, 11 insertions(+), 37 deletions(-)