@@ -59,13 +59,6 @@ int cleanup_before_linux(void)
return 0;
}
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-{
- disable_interrupts();
- reset_cpu(0);
- return 0;
-}
-
void flush_cache(unsigned long addr, unsigned long size)
{
@@ -26,12 +26,3 @@ int watchdog_init(void)
{
return 0;
}
-
-void reset_cpu(unsigned long ignored)
-{
- /* Address error with SR.BL=1 first. */
- trigger_address_error();
-
- while (1)
- ;
-}
@@ -45,13 +45,6 @@ int cleanup_before_linux(void)
return 0;
}
-int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-{
- disable_interrupts();
- reset_cpu(0);
- return 0;
-}
-
void flush_cache(unsigned long addr, unsigned long size)
{
@@ -29,12 +29,3 @@ int watchdog_init(void)
{
return 0;
}
-
-void reset_cpu(unsigned long ignored)
-{
- /* Address error with SR.BL=1 first. */
- trigger_address_error();
-
- while (1)
- ;
-}
@@ -44,13 +44,6 @@ int cleanup_before_linux (void)
return 0;
}
-int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-{
- disable_interrupts();
- reset_cpu (0);
- return 0;
-}
-
void flush_cache (unsigned long addr, unsigned long size)
{
dcache_invalid_range( addr , addr + size );
@@ -64,12 +64,3 @@ int watchdog_disable(void)
return 0;
}
#endif
-
-void reset_cpu(unsigned long ignored)
-{
- /* Address error with SR.BL=1 first. */
- trigger_address_error();
-
- while (1)
- ;
-}
@@ -204,6 +204,16 @@ void sh_generic_init(void)
/***********************************************************************/
+int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+ disable_interrupts();
+
+ /* Address error with SR.BL=1 first. */
+ trigger_address_error();
+
+ while (1);
+}
+
void hang(void)
{
puts("Board ERROR\n");
All 3 SH processor variants have the same do_reset() and reset_cpu() function implementations. Furthermore, the only caller of the reset_cpu() function on SH is do_reset(). To simplify and prepare for SH generic-restart support this patch removes 38 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: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> --- arch/sh/cpu/sh2/cpu.c | 7 ------- arch/sh/cpu/sh2/watchdog.c | 9 --------- arch/sh/cpu/sh3/cpu.c | 7 ------- arch/sh/cpu/sh3/watchdog.c | 9 --------- arch/sh/cpu/sh4/cpu.c | 7 ------- arch/sh/cpu/sh4/watchdog.c | 9 --------- arch/sh/lib/board.c | 10 ++++++++++ 7 files changed, 10 insertions(+), 48 deletions(-)