plat/marvell/a8k/common/mss/mss_pm_ipc.c
/*******************************************************************************
* mss_pm_ipc_msg_trigger
*
* DESCRIPTION: Trigger IPC message interrupt to MSS
*******************************************************************************/
mss_pm_ipc_msg_trigger
DESCRIPTION: Trigger IPC message interrupt to MSS
mss_pm_ipc_msg_trigger DESCRIPTION : Trigger IPC message interrupt to MSS
int mss_pm_ipc_msg_trigger(void)
{
	unsigned int timeout;
	unsigned int t_end;
	unsigned int t_start = mmio_read_32(MSS_TIMER_BASE);
	mmio_write_32(MSS_SISR, MSS_MSG_INT_MASK);
	do {
		if (mmio_read_32(MSS_SISTR) != MSS_MSG_INT_MASK)
			break;
		t_end = mmio_read_32(MSS_TIMER_BASE);
		timeout = ((t_start > t_end) ? (t_start - t_end) : (t_end - t_start));
		if (timeout > MSS_TRIGGER_TIMEOUT) {
			ERROR("PM MSG Trigger Timeout\n");
			break;
		}
	} while (1);
	return 0;
}
int mss_pm_ipc_msg_trigger ( void ) { unsigned int timeout ; unsigned int t_end ; unsigned int t_start = mmio_read_32 ( MSS_TIMER_BASE ) ; mmio_write_32 ( MSS_SISR , MSS_MSG_INT_MASK ) ; do { if ( mmio_read_32 ( MSS_SISTR ) != MSS_MSG_INT_MASK ) break ; t_end = mmio_read_32 ( MSS_TIMER_BASE ) ; timeout = ( ( t_start > t_end ) ? ( t_start - t_end ) : ( t_end - t_start ) ) ; if ( timeout > MSS_TRIGGER_TIMEOUT ) { ERROR ( " \n " ) ; break ; } } while ( 1 ) ; return 0 ; }
mss_pm_ipc_msg_trigger
DESCRIPTION: Trigger IPC message interrupt to MSS
mss_pm_ipc_msg_trigger DESCRIPTION : Trigger IPC message interrupt to MSS
/* wait while SCP process incoming interrupt */ /* check timeout */