Beispiel #1
0
void ice_trace8(const struct trace_entry * __entry, int __a, 
			 int __b, int __c, int __d, int __e, 
			 int __f, int __g, int __h)
{
	unsigned int head;
	int fm = cm3_faultmask_get(); /* save fault mask */
	
	cm3_cpsid_f(); /* disable interrupts and faults */
	if (ice_comm_blk.dbg != DBG_CONNECTED) {
		if (ice_comm_blk.dbg == DBG_SYNC)
			ice_comm_blk.dev = DEV_CONNECTED;
		goto ret;
	}
	head = ice_comm_blk.tx_head;
	while ((16 - ((head - ice_comm_blk.tx_tail) & 0xffff)) < 9);
	ice_comm_blk.tx_buf.u32[head++ & 0xf] = (int)__entry;
	ice_comm_blk.tx_buf.u32[head++ & 0xf] = __a;
	ice_comm_blk.tx_buf.u32[head++ & 0xf] = __b;
	ice_comm_blk.tx_buf.u32[head++ & 0xf] = __c;
	ice_comm_blk.tx_buf.u32[head++ & 0xf] = __d;
	ice_comm_blk.tx_buf.u32[head++ & 0xf] = __e;
	ice_comm_blk.tx_buf.u32[head++ & 0xf] = __f;
	ice_comm_blk.tx_buf.u32[head++ & 0xf] = __g;
	ice_comm_blk.tx_buf.u32[head++ & 0xf] = __h;
	ice_comm_blk.tx_head = head;
ret:
	cm3_faultmask_set(fm);  /* restore fault mask */
}
Beispiel #2
0
void ice_comm_sync(void) 
{
	uint32_t fm = cm3_faultmask_get(); /* save fault mask */

	cm3_cpsid_f(); /* disable interrupts and faults */

	ice_comm_blk.dev = DEV_SYNC;
	ice_comm_blk.tx_head = 0;
	ice_comm_blk.tx_tail = 0;

	cm3_faultmask_set(fm);  /* restore fault mask */
}
Beispiel #3
0
void ice_comm_sync(void) 
{
	struct ice_comm_blk * comm = ICE_COMM_BLK;
	uint32_t fm = cm3_faultmask_get(); /* save fault mask */

	cm3_cpsid_f(); /* disable interrupts and faults */

	comm->dev = DEV_SYNC;
	comm->tx_head = 0;
	comm->tx_tail = 0;

	cm3_faultmask_set(fm);  /* restore fault mask */
}
Beispiel #4
0
void ice_comm_connect(void) 
{
	uint32_t fm = cm3_faultmask_get(); /* save fault mask */

	cm3_cpsid_f(); /* disable interrupts and faults */
	ice_comm_blk.dev = DEV_SYNC;
	while (ice_comm_blk.dbg != DBG_CONNECTED) {
		if (ice_comm_blk.dbg == DBG_SYNC) {
			ice_comm_blk.dev = DEV_CONNECTED;
		}
	}
	cm3_faultmask_set(fm);  /* restore fault mask */
}
Beispiel #5
0
void ice_comm_connect(void) 
{
	struct ice_comm_blk * comm = ICE_COMM_BLK;
	uint32_t fm = cm3_faultmask_get(); /* save fault mask */

	cm3_cpsid_f(); /* disable interrupts and faults */
	comm->dev = DEV_SYNC;
	while (comm->dbg != DBG_CONNECTED) {
		if (comm->dbg == DBG_SYNC) {
			comm->dev = DEV_CONNECTED;
		}
	}
	cm3_faultmask_set(fm);  /* restore fault mask */
}
Beispiel #6
0
void ice_comm_w32(uint32_t data) 
{
	struct ice_comm_blk * comm = ICE_COMM_BLK;
	uint32_t fm = cm3_faultmask_get(); /* save fault mask */
	unsigned int head;

	cm3_cpsid_f(); /* disable interrupts and faults */
	if (comm->dbg != DBG_CONNECTED) {
		if (comm->dbg == DBG_SYNC)
			comm->dev = DEV_CONNECTED;
		goto ret;
	}
	head = comm->tx_head;
	comm->tx_buf.u32[head++ & 0xf] = data;
	comm->tx_head = head;
ret:
	cm3_faultmask_set(fm);  /* restore fault mask */
}