diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-08-18 13:40:15 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-08-18 13:40:15 +0000 |
commit | 541c9e84f375dfb8ada306bd08e3b1679adc5b57 (patch) | |
tree | 0ccbcd41b699525e674654b9067d932982c0c53e /c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c | |
parent | 2008-08-18 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-541c9e84f375dfb8ada306bd08e3b1679adc5b57.tar.bz2 |
2008-08-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
* Makefile.am, startup/bspstart.c, startup/cpuinit.c: For the
MPC8313ERDB -- The BAT entry for the eLBC was missing and add
hard reset sequence in bsp_cleanup().
Diffstat (limited to 'c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c')
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c b/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c index 20ec8cb999..7035fb7e9e 100644 --- a/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c @@ -189,3 +189,28 @@ Thread _Thread_Idle_body( uint32_t ignored) return NULL; } + +void bsp_cleanup( void) +{ +#ifdef MPC8313ERDB + + /* Set Reset Protection Register (RPR) to "RSTE" */ + mpc83xx.res.rpr = 0x52535445; + + /* + * Wait for Control Register Enabled in the + * Reset Control Enable Register (RCER). + */ + while (mpc83xx.res.rcer != 0x00000001) { + /* Wait */ + } + + /* Set Software Hard Reset in the Reset Control Register (RCR) */ + mpc83xx.res.rcr = 0x00000002; + +#else /* MPC8313ERDB */ + + /* Do nothing */ + +#endif /* MPC8313ERDB */ +} |