make sure the m0 is really running/stopped

This commit is contained in:
Hoernchen 2013-06-07 18:50:03 +02:00 committed by Piotr Esden-Tempski
parent e5a4dd0609
commit 4c8d260232

View File

@ -30,15 +30,10 @@ void ipc_halt_m0(void)
rst_active_status1 = RESET_ACTIVE_STATUS1;
/* If the M0 has reset not asserted, halt it... */
if( (rst_active_status1 & RESET_CTRL1_M0APP_RST) )
while( (rst_active_status1 & RESET_CTRL1_M0APP_RST) )
{
RESET_CTRL1 = ((~rst_active_status1) | RESET_CTRL1_M0APP_RST);
rst_active_status1 = RESET_ACTIVE_STATUS1;
/* Check again */
if( (rst_active_status1 & RESET_CTRL1_M0APP_RST) )
{
RESET_CTRL1 = ((~rst_active_status1) | RESET_CTRL1_M0APP_RST);
}
}
}
@ -56,15 +51,10 @@ void ipc_start_m0(u32 cm0_baseaddr)
/* If the M0 is being held in reset, release it */
/* 1 = no reset, 0 = reset */
if( !(rst_active_status1 & RESET_CTRL1_M0APP_RST) )
while( !(rst_active_status1 & RESET_CTRL1_M0APP_RST) )
{
RESET_CTRL1 = ((~rst_active_status1) & (~RESET_CTRL1_M0APP_RST));
rst_active_status1 = RESET_ACTIVE_STATUS1;
/* Check again */
if( !(rst_active_status1 & RESET_CTRL1_M0APP_RST) )
{
RESET_CTRL1 = ((~rst_active_status1) & (~RESET_CTRL1_M0APP_RST));
}
}
}