|
|
@ -29,6 +29,7 @@ static uint16_t srio_remote_node_id; |
|
|
|
struct doorbell_descr { |
|
|
|
Queue_Elem base; |
|
|
|
|
|
|
|
uint32_t doorbell_icsr[4]; |
|
|
|
uint16_t node; |
|
|
|
uint16_t reg; |
|
|
|
uint16_t bits; |
|
|
@ -56,6 +57,8 @@ static void __queue_init(void ) |
|
|
|
} |
|
|
|
static void __srio_doorbell_isr(void *arg) |
|
|
|
{ |
|
|
|
uint32_t *doorbellreg = (uint32_t *)arg; |
|
|
|
|
|
|
|
struct doorbell_descr *db; |
|
|
|
|
|
|
|
g_doorbell_vail++; |
|
|
@ -65,6 +68,10 @@ static void __srio_doorbell_isr(void *arg) |
|
|
|
if (srio_dio_recv_doorbell(&db->node, &db->reg, &db->bits)) { /* error */ |
|
|
|
Queue_enqueue(freeq, &db->base); |
|
|
|
} else { |
|
|
|
db->doorbell_icsr[0] = doorbellreg[0]; |
|
|
|
db->doorbell_icsr[1] = doorbellreg[1]; |
|
|
|
db->doorbell_icsr[2] = doorbellreg[2]; |
|
|
|
db->doorbell_icsr[3] = doorbellreg[3]; |
|
|
|
Queue_enqueue(q, &db->base); |
|
|
|
} |
|
|
|
} |
|
|
@ -95,7 +102,7 @@ int srio_task() |
|
|
|
srio_remote_node_id = SRIO_PRODUCER_NODE_ID; |
|
|
|
} |
|
|
|
|
|
|
|
srio_dev_init(srio_local_node_id, NULL, __srio_doorbell_isr, __srio_msg_isr); |
|
|
|
srio_dev_init(srio_local_node_id, __srio_doorbell_isr, __srio_msg_isr); |
|
|
|
|
|
|
|
if (g_master) { |
|
|
|
//send a doorbell to slave
|
|
|
|