/*TASK*----------------------------------------------------------------- * * Function Name : _bootloader_reset * Returned Value : void * Comments : * *END------------------------------------------------------------------*/ void _bootloader_reset(void) { MPC5125_RESET_STRUCT_PTR reset = (&((VMPC5125_STRUCT_PTR) MPC5125_GET_IMMR() )->RESET); uint_32 t; printf ("Resetting the board.\n"); _PSP_SYNC(); _mmu_disable(); _PSP_MSR_GET(t); t &= ~(PSP_MSR_IR | PSP_MSR_EE | PSP_MSR_DR); // Disable MSR[IR,EE,DR] _PSP_MSR_SET(t); reset->RPR = 0x52535445; /* Verify Reset Control Reg is enabled */ while (!((reset->RCER) & 0x00000001)) reset->RPR = 0x52535445; // //_time_delay(200); /* Perform reset */ reset->RCR = 0x02; }
uint_32 _psp_get_sr ( void ) { /* Body */ uint_32 old_sr_value; _PSP_MSR_GET(old_sr_value); return(old_sr_value); } /* Endbody */
uint_32 _psp_set_sr ( /* [IN] the new value for the status register */ uint_32 sr_value ) { /* Body */ uint_32 old_sr_value; _PSP_MSR_GET(old_sr_value); _PSP_MSR_SET(sr_value); return(old_sr_value); } /* Endbody */