Changeset faad192 in rtems


Ignore:
Timestamp:
03/11/13 16:54:34 (9 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
df3f022
Parents:
f88da30
git-author:
Sebastian Huber <sebastian.huber@…> (03/11/13 16:54:34)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/14/13 09:56:48)
Message:

mpc83xx: Add and use mpc83xx_reset()

The inline version makes it possible to use this code in different
memory areas.

Location:
c/src/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/gen83xx/startup/bspreset.c

    rf88da30 rfaad192  
    1515#include <bsp/bootcard.h>
    1616
     17#include <mpc83xx/mpc83xx.h>
     18
    1719void bsp_reset(void)
    1820{
    19   _ISR_Set_level( 0 );
    20 
    21   /* Set Reset Protection Register (RPR) to "RSTE" */
    22   mpc83xx.res.rpr = 0x52535445;
    23 
    24   /*
    25    * Wait for Control Register Enabled in the
    26    * Reset Control Enable Register (RCER).
    27    */
    28   while (mpc83xx.res.rcer != 0x00000001) {
    29     /* Wait */
    30   }
    31 
    32   /* Set Software Hard Reset in the Reset Control Register (RCR) */
    33   mpc83xx.res.rcr = 0x00000002;
     21  mpc83xx_reset();
    3422}
  • c/src/lib/libcpu/powerpc/mpc83xx/include/mpc83xx.h

    rf88da30 rfaad192  
    821821extern m83xxRegisters_t mpc83xx;
    822822
     823static inline void mpc83xx_reset(void)
     824{
     825  _ISR_Set_level( 0 );
     826
     827  /* Set Reset Protection Register (RPR) to "RSTE" */
     828  mpc83xx.res.rpr = 0x52535445;
     829
     830  /*
     831   * Wait for Control Register Enabled in the
     832   * Reset Control Enable Register (RCER).
     833   */
     834  while (mpc83xx.res.rcer != 0x00000001) {
     835    /* Wait */
     836  }
     837
     838  /* Set Software Hard Reset in the Reset Control Register (RCR) */
     839  mpc83xx.res.rcr = 0x00000002;
     840}
     841
    823842#endif /* !defined ASM */
    824843/*
Note: See TracChangeset for help on using the changeset viewer.