This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
MPC8xx RESET support
- From: Gary Thomas <gthomas at ecoscentric dot com>
- To: eCos patches <ecos-patches at sources dot redhat dot com>
- Date: 02 Dec 2002 13:43:24 -0700
- Subject: MPC8xx RESET support
Index: hal/powerpc/adder/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/adder/current/ChangeLog,v
retrieving revision 1.2
diff -u -5 -p -r1.2 ChangeLog
--- hal/powerpc/adder/current/ChangeLog 26 Nov 2002 13:48:16 -0000 1.2
+++ hal/powerpc/adder/current/ChangeLog 2 Dec 2002 20:40:04 -0000
@@ -1,5 +1,9 @@
+2002-12-02 Gary Thomas <gthomas@ecoscentric.com>
+
+ * include/plf_intr.h: Use MPC8xx variant RESET support.
+
2002-11-26 Gary Thomas <gthomas@ecoscentric.com>
* misc/redboot_ROMRAM.ecm: Export.
* cdl/hal_powerpc_adder.cdl: Move platform #define to platform package.
Index: hal/powerpc/adder/current/include/plf_intr.h
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/adder/current/include/plf_intr.h,v
retrieving revision 1.1
diff -u -5 -p -r1.1 plf_intr.h
--- hal/powerpc/adder/current/include/plf_intr.h 25 Nov 2002 23:18:43 -0000 1.1
+++ hal/powerpc/adder/current/include/plf_intr.h 2 Dec 2002 20:40:28 -0000
@@ -43,11 +43,11 @@
//####ECOSGPLCOPYRIGHTEND####
//==========================================================================
//#####DESCRIPTIONBEGIN####
//
// Author(s): jskov
-// Contributors: jskov
+// Contributors: jskov, gthomas
// Date: 2000-06-13
// Purpose: Define platform specific interrupt support
//
// Usage:
// #include <cyg/hal/plf_intr.h>
@@ -70,13 +70,12 @@
//----------------------------------------------------------------------------
// Reset.
-// The ADDER does not have a watchdog (not one we can easily use for this
-// purpose anyway).
-#define HAL_PLATFORM_RESET() CYG_EMPTY_STATEMENT
+externC void _mpc8xx_reset(void);
+#define HAL_PLATFORM_RESET() _mpc8xx_reset()
#define HAL_PLATFORM_RESET_ENTRY 0xfe000100
//--------------------------------------------------------------------------
#endif // ifndef CYGONCE_HAL_PLF_INTR_H
Index: hal/powerpc/mbx/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/mbx/current/ChangeLog,v
retrieving revision 1.31
diff -u -5 -p -r1.31 ChangeLog
--- hal/powerpc/mbx/current/ChangeLog 26 Nov 2002 13:48:18 -0000 1.31
+++ hal/powerpc/mbx/current/ChangeLog 2 Dec 2002 20:40:19 -0000
@@ -1,5 +1,9 @@
+2002-12-02 Gary Thomas <gthomas@ecoscentric.com>
+
+ * include/plf_intr.h: Use MPC8xx variant RESET support.
+
2002-11-26 Gary Thomas <gthomas@ecoscentric.com>
* cdl/hal_powerpc_mbx.cdl: Move platform defines to platform package.
2002-11-25 Gary Thomas <gthomas@ecoscentric.com>
Index: hal/powerpc/mbx/current/include/plf_intr.h
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/mbx/current/include/plf_intr.h,v
retrieving revision 1.5
diff -u -5 -p -r1.5 plf_intr.h
--- hal/powerpc/mbx/current/include/plf_intr.h 23 May 2002 23:04:25 -0000 1.5
+++ hal/powerpc/mbx/current/include/plf_intr.h 2 Dec 2002 20:36:39 -0000
@@ -10,10 +10,11 @@
//==========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
//
// eCos is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 or (at your option) any later version.
//
@@ -42,11 +43,11 @@
//####ECOSGPLCOPYRIGHTEND####
//==========================================================================
//#####DESCRIPTIONBEGIN####
//
// Author(s): jskov
-// Contributors: jskov
+// Contributors: jskov, gthomas
// Date: 2000-06-13
// Purpose: Define platform specific interrupt support
//
// Usage:
// #include <cyg/hal/plf_intr.h>
@@ -69,13 +70,12 @@
//----------------------------------------------------------------------------
// Reset.
-// The MBX does not have a watchdog (not one we can easily use for this
-// purpose anyway).
-#define HAL_PLATFORM_RESET() CYG_EMPTY_STATEMENT
+externC void _mpc8xx_reset(void);
+#define HAL_PLATFORM_RESET() _mpc8xx_reset()
#define HAL_PLATFORM_RESET_ENTRY 0xfe000100
//--------------------------------------------------------------------------
#endif // ifndef CYGONCE_HAL_PLF_INTR_H
Index: hal/powerpc/mpc8xx/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/mpc8xx/current/ChangeLog,v
retrieving revision 1.20
diff -u -5 -p -r1.20 ChangeLog
--- hal/powerpc/mpc8xx/current/ChangeLog 25 Nov 2002 23:20:52 -0000 1.20
+++ hal/powerpc/mpc8xx/current/ChangeLog 2 Dec 2002 20:41:03 -0000
@@ -1,5 +1,10 @@
+2002-12-02 Gary Thomas <gthomas@ecoscentric.com>
+
+ * src/variant.S (_mpc8xx_reset): New function, used to cause a
+ hardware reset of the platform.
+
2002-11-25 Gary Thomas <gthomas@ecoscentric.com>
* include/var_regs.h: Add CICR definitions.
2002-11-15 Gary Thomas <gthomas@ecoscentric.com>
Index: hal/powerpc/mpc8xx/current/src/variant.S
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/mpc8xx/current/src/variant.S,v
retrieving revision 1.4
diff -u -5 -p -r1.4 variant.S
--- hal/powerpc/mpc8xx/current/src/variant.S 23 May 2002 23:04:28 -0000 1.4
+++ hal/powerpc/mpc8xx/current/src/variant.S 2 Dec 2002 20:40:29 -0000
@@ -7,10 +7,11 @@
##=============================================================================
#####ECOSGPLCOPYRIGHTBEGIN####
## -------------------------------------------
## This file is part of eCos, the Embedded Configurable Operating System.
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2002 Gary Thomas
##
## eCos is free software; you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free
## Software Foundation; either version 2 or (at your option) any later version.
##
@@ -39,20 +40,23 @@
#####ECOSGPLCOPYRIGHTEND####
##=============================================================================
#######DESCRIPTIONBEGIN####
##
## Author(s): jskov
-## Contributors:jskov
+## Contributors:jskov, gthomas
## Date: 2000-02-04
## Purpose: PowerPC MPC8xx variant code
## Description: Variant specific code for PowerPC MPC8xx CPUs.
##
######DESCRIPTIONEND####
##
##=============================================================================
#include <cyg/hal/arch.inc>
+#include <cyg/hal/ppc_regs.h> /* on-chip resource layout, special */
+ /* registers, IMM layout... */
+#include <cyg/hal/quicc/ppc8xx.h> /* more of the same */
#---------------------------------------------------------------------------
# Interrupt vector tables.
# These tables contain the isr, data and object pointers used to deliver
# interrupts to user code.
@@ -78,8 +82,37 @@ hal_interrupt_data:
.globl hal_interrupt_objects
hal_interrupt_objects:
.rept CYGNUM_HAL_ISR_COUNT
.long 0
.endr
+
+
+#---------------------------------------------------------------------------
+# Hard reset support
+#
+
+ .text
+ .globl _mpc8xx_reset
+_mpc8xx_reset:
+ lwi r4,CYGARC_REG_IMM_BASE # base address of control registers
+
+ // Enable checkstop reset
+ lwz r3,PLPRCR(r4)
+ ori r3,r3,0x0080 // Bit 24
+ stw r3,PLPRCR(r4)
+ mfmsr r3
+ lwi r5,~MSR_ME
+ and r3,r3,r5
+ mtmsr r3
+
+ // Pull the plug by disabling CS0 & CS1. This will cause a checkstop.
+ li r0,0
+ stw r0,BR0(r4)
+ stw r0,BR1(r4)
+ lwi r3,_end
+10: nop
+ lwzu r3,4(r2) // Force a memory access
+ b 10b
+
##-----------------------------------------------------------------------------
## end of variant.S
Index: hal/powerpc/ts1000/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/ts1000/current/ChangeLog,v
retrieving revision 1.6
diff -u -5 -p -r1.6 ChangeLog
--- hal/powerpc/ts1000/current/ChangeLog 26 Nov 2002 13:48:19 -0000 1.6
+++ hal/powerpc/ts1000/current/ChangeLog 2 Dec 2002 20:41:18 -0000
@@ -1,5 +1,9 @@
+2002-12-02 Gary Thomas <gthomas@ecoscentric.com>
+
+ * include/plf_intr.h: Use MPC8xx variant RESET support.
+
2002-11-26 Gary Thomas <gthomas@ecoscentric.com>
* cdl/hal_powerpc_ts1000.cdl: Move platform define to platform package.
2002-11-25 Gary Thomas <gthomas@ecoscentric.com>
Index: hal/powerpc/ts1000/current/include/plf_intr.h
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/ts1000/current/include/plf_intr.h,v
retrieving revision 1.1
diff -u -5 -p -r1.1 plf_intr.h
--- hal/powerpc/ts1000/current/include/plf_intr.h 11 Oct 2002 20:09:26 -0000 1.1
+++ hal/powerpc/ts1000/current/include/plf_intr.h 2 Dec 2002 20:36:54 -0000
@@ -43,11 +43,11 @@
//####ECOSGPLCOPYRIGHTEND####
//==========================================================================
//#####DESCRIPTIONBEGIN####
//
// Author(s): jskov
-// Contributors: jskov
+// Contributors: jskov, gthomas
// Date: 2000-06-13
// Purpose: Define platform specific interrupt support
//
// Usage:
// #include <cyg/hal/plf_intr.h>
@@ -70,13 +70,12 @@
//----------------------------------------------------------------------------
// Reset.
-// The TS1000 does not have a watchdog (not one we can easily use for this
-// purpose anyway).
-#define HAL_PLATFORM_RESET() CYG_EMPTY_STATEMENT
+externC void _mpc8xx_reset(void);
+#define HAL_PLATFORM_RESET() _mpc8xx_reset()
#define HAL_PLATFORM_RESET_ENTRY 0xfe000100
//--------------------------------------------------------------------------
#endif // ifndef CYGONCE_HAL_PLF_INTR_H
Index: hal/powerpc/viper/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/viper/current/ChangeLog,v
retrieving revision 1.19
diff -u -5 -p -r1.19 ChangeLog
--- hal/powerpc/viper/current/ChangeLog 26 Nov 2002 13:48:19 -0000 1.19
+++ hal/powerpc/viper/current/ChangeLog 2 Dec 2002 20:41:32 -0000
@@ -1,5 +1,9 @@
+2002-12-02 Gary Thomas <gthomas@ecoscentric.com>
+
+ * include/plf_intr.h: Use MPC8xx variant RESET support.
+
2002-11-26 Gary Thomas <gthomas@ecoscentric.com>
* cdl/hal_powerpc_viper.cdl: Move platform define to platform package.
2002-11-25 Gary Thomas <gthomas@ecoscentric.com>
Index: hal/powerpc/viper/current/include/plf_intr.h
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/viper/current/include/plf_intr.h,v
retrieving revision 1.4
diff -u -5 -p -r1.4 plf_intr.h
--- hal/powerpc/viper/current/include/plf_intr.h 24 Jul 2002 14:49:06 -0000 1.4
+++ hal/powerpc/viper/current/include/plf_intr.h 2 Dec 2002 20:37:04 -0000
@@ -43,11 +43,11 @@
//####ECOSGPLCOPYRIGHTEND####
//==========================================================================
//#####DESCRIPTIONBEGIN####
//
// Author(s): jskov
-// Contributors: jskov
+// Contributors: jskov, gthomas
// Date: 2000-06-13
// Purpose: Define platform specific interrupt support
//
// Usage:
// #include <cyg/hal/plf_intr.h>
@@ -70,13 +70,12 @@
//----------------------------------------------------------------------------
// Reset.
-// The VIPER does not have a watchdog (not one we can easily use for this
-// purpose anyway).
-#define HAL_PLATFORM_RESET() CYG_EMPTY_STATEMENT
+externC void _mpc8xx_reset(void);
+#define HAL_PLATFORM_RESET() _mpc8xx_reset()
#define HAL_PLATFORM_RESET_ENTRY 0xfe000100
//--------------------------------------------------------------------------
#endif // ifndef CYGONCE_HAL_PLF_INTR_H
--
------------------------------------------------------------
Gary Thomas |
eCosCentric, Ltd. |
+1 (970) 229-1963 | eCos & RedBoot experts
gthomas@ecoscentric.com |
http://www.ecoscentric.com/ |
------------------------------------------------------------