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 | |
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')
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen83xx/ChangeLog | 6 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen83xx/Makefile.am | 3 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c | 25 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen83xx/startup/cpuinit.c | 6 |
4 files changed, 38 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/ChangeLog b/c/src/lib/libbsp/powerpc/gen83xx/ChangeLog index b02d6801af..6570be61d1 100644 --- a/c/src/lib/libbsp/powerpc/gen83xx/ChangeLog +++ b/c/src/lib/libbsp/powerpc/gen83xx/ChangeLog @@ -1,3 +1,9 @@ +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(). + 2008-08-15 Joel Sherrill <joel.sherrill@OARcorp.com> * README.mpc8313erdb: Some first cut notes on running with U-Boot. diff --git a/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am b/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am index 19532bce4c..e208c50972 100644 --- a/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am +++ b/c/src/lib/libbsp/powerpc/gen83xx/Makefile.am @@ -43,8 +43,7 @@ dist_project_lib_DATA += startup/linkcmds \ mpc83xx_regs_SOURCES = startup/mpc83xx_regs.c -startup_SOURCES = ../../shared/bspclean.c \ - ../../shared/bsplibc.c \ +startup_SOURCES = ../../shared/bsplibc.c \ ../../shared/bsppost.c \ ../../shared/bootcard.c \ ../../shared/bsppredriverhook.c \ 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 */ +} diff --git a/c/src/lib/libbsp/powerpc/gen83xx/startup/cpuinit.c b/c/src/lib/libbsp/powerpc/gen83xx/startup/cpuinit.c index 9ca8c2e043..b7c4fcb4bc 100644 --- a/c/src/lib/libbsp/powerpc/gen83xx/startup/cpuinit.c +++ b/c/src/lib/libbsp/powerpc/gen83xx/startup/cpuinit.c @@ -220,6 +220,12 @@ void cpu_init(void) SET_DBAT(2,dbat.batu,dbat.batl); +#ifdef MPC8313ERDB + /* Enhanced Local Bus Controller (eLBC) */ + calc_dbat_regvals( &dbat, 0xfa000000, 128 * 1024, 0, 1, 0, 1, BPP_RW); + SET_DBAT( 3, dbat.batu, dbat.batl); +#endif /* MPC8313ERDB */ + /* * enable data/instruction MMU in MSR */ |