2 char *p_DEFAULT
= "default";
4 char *get_event(int event
)
17 case INTR_TRWD_UNXP_EVENT
:
18 p
= "INTR_TRWD_UNXP\t";
20 case INTR_READY_EVENT
:
23 case INTR_READY_DMA_EVENT
:
24 p
= "INTR_READY_DMA\t";
26 case INTR_MSG_READY_UNXP_EVENT
:
27 p
= "INTR_MSG_READY_UNXP\t";
29 case INTR_MSG_READY_DMA_UNXP_EVENT
:
30 p
= "INTR_MSG_READY_DMA_UNXP\t";
35 case INTR_SIGN1_READ_EVENT
:
36 p
= "INTR_SIGN1_READ\t";
41 case INTR_RMSG_UNXP_EVENT
:
42 p
= "INTR_RMSG_UNXP\t";
47 case INTR_TDC_UNXP_EVENT
:
48 p
= "INTR_TDC_UNXP\t";
50 case INTR_TDC_DSF_PD_NULL_EVENT
:
51 p
= "INTR_TDCDSFPDNULL\t";
53 case READ_NOT_PROCESS_EVENT
:
54 p
= "READ_NOT_PROCESS\t";
56 case READ_NOT_SELF_PROCESS_EVENT
:
57 p
= "NOT_SELF_PROCESS\t";
59 case READ_WAIT_SELF_PROCESS_EVENT
:
60 p
= "WAIT_SELF_PROCESS\t";
62 case READ_TRY_SIGNAL_PROCESS_EVENT
:
63 p
= "TRY_SIGNAL_PROCESS\t";
65 case READ_PROCESS_EVENT
:
68 case READ_SELF_PROCESS_EVENT
:
69 p
= "READ_SELF_PROCESS\t";
71 case READ_SELF_WAIT_EVENT
:
72 p
= "READ_SELF_WAIT\t";
80 case INTR_SIGN1_WRITE_EVENT
:
81 p
= "INTR_SIGN1_WRITE\t";
83 case INTR_RGP3M_EVENT
:
86 case INTR_RGP2M_EVENT
:
89 case INTR_RGP1M_EVENT
:
92 case INTR_SIGN3_READ_EVENT
:
93 p
= "INTR_SIGN3_READ\t";
95 case INTR_RGP0M_EVENT
:
98 case INTR_SIGN2_WRITE_EVENT
:
99 p
= "INTR_SIGN2_WRITE\t";
101 case INTR_RGP3M_UNXP_EVENT
:
102 p
= "INTR_RGP3M_UNXP\t";
104 case INTR_RGP1M_UNXP_EVENT
:
105 p
= "INTR_RGP1M_UNXP\t";
113 case WRITE_111_EVENT
:
116 case WRITE_PMSTAT_EVENT
:
117 p
= "WRITE_PMSTAT\t";
119 case WRITE_SNDMSGBAD_EVENT
:
120 p
= "WRITE_SNDMSGBAD\t";
122 case WRITE_SNDNGMSG_EVENT
:
123 p
= "WRITE_SNDNGMSG\t";
125 case WRITE_BAD1_EVENT
:
134 case WRITE_000_EVENT
:
137 case WRITE_ISDSF_EVENT
:
149 case READ_TRWD_WAS_EVENT
:
150 p
= "READ_TRWD_WAS\t";
152 case READ_TRWD_WAS_LONG_EVENT
:
153 p
= "READ_TRWD_WAS_LONG\t";
155 case READ_TRWD_WAS_TIMEOUT_EVENT
:
156 p
= "READ_TRWD_WAS_TIMEOUT\t";
158 case READ_BAD1_EVENT
:
161 case READ_BAD2_EVENT
:
164 case READ_BADSIZE_EVENT
:
165 p
= "READ_BADSIZE\t";
167 case READ_PMSTAT_EVENT
:
170 case READ_SNDMSGBAD_EVENT
:
171 p
= "READ_SNDMSGBAD\t";
176 case SNDMSGBAD_EVENT
:
179 case READ_SNDNGMSG_EVENT
:
180 p
= "READ_SNDNGMSG\t";
182 case READ_BAD3_EVENT
:
185 case SNDMSG_PMSTAT_EVENT
:
186 p
= "SNDMSG_PMSTAT\t";
188 case SNDMSG_BAD_EVENT
:
194 case INTR_FAIL_SND_SGP3_EVENT
:
195 p
= "INTR_FAIL_SND_SGP3\t";
197 case INTR_FAIL_SND_SGP1_EVENT
:
198 p
= "INTR_FAIL_SND_SGP1\t";
200 case WRITE_FAIL_SND_SGP2_EVENT
:
201 p
= "WRITE_FAIL_SND_SGP2\t";
203 case READ_FAIL_SND_SGP0_EVENT
:
204 p
= "READ_FAIL_SND_SGP0\t";
224 case WRITE_IRQ_COUNT_EVENT
:
225 p
= "WRITE_IRQ_COUNT\t";
227 case READ_IRQ_COUNT1_EVENT
:
228 p
= "READ_IRQ_COUNT1\t";
230 case READ_IRQ_COUNT2_EVENT
:
231 p
= "READ_IRQ_COUNT2\t";
233 case BROAD_TRY_WAKEUP_EVENT
:
234 p
= "BROAD_TRY_WAKEUP\t";
236 case BROAD_RUNNING_EVENT
:
237 p
= "BROAD_RUNNING\t";
239 case WAIT_TRY_SCHTO_EVENT
:
240 p
= "WAIT_TRY_SCHTO\t";
242 case WAIT_RET_SCHT0_EVENT
:
243 p
= "WAIT_RET_SCHT0\t";
245 case WAIT_RET_SCHT1_EVENT
:
246 p
= "WAIT_RET_SCHT1\t";
248 case WAIT_RET_SCHT2_EVENT
:
249 p
= "WAIT_RET_SCHT2\t";
252 p
= "RDMA_BROADCAST\t";
257 case INTR_CMIE_EVENT
:
260 case INTR_START_EVENT
:
261 p
= "INTR_START_EVENT\t";
263 case INTR_EXIT_EVENT
:
264 p
= "INTR_EXIT_EVENT\t";
266 case MAIN_FAIL_SND_CS_SUL_Msg_EVENT
:
267 p
= "FAIL_SND_SUL_Msg\t";
269 case MAIN_FAIL_SND_CS_SL_Msg_EVENT
:
270 p
= "FAIL_SND_SL_Msg\t";
272 case MAIN_FAIL_SND_NEED_BYPASS_EVENT
:
273 p
= "FAIL_SND_NEED_BYPASS\t";
275 case INTR_FAIL_SND_MSG_BAD_BUFFER_EVENT
:
276 p
= "FAIL_SND_MSG_BAD_BUF\t";
278 case INTR_ERR_BAD_BUFFER_EVENT
:
279 p
= "ERR_BAD_BUFFER\t";
281 case READ_SIGN1_EVENT
:
284 case INTR_UNEXP2_READ_EVENT
:
285 p
= "INTR_UNEXP2_READ\t";
287 case READ_BAD_SYNHR_EVENT
:
288 p
= "READ_BAD_SYNHR\t";
290 case READ_DEF2_EVENT
:
293 case WRITE_DSF_EVENT
:
296 case INTR_SIGN2_READ_EVENT
:
297 p
= "INTR_SIGN2_READ\t";
299 case MAIN_FAIL_SND_CS_SIR_Msg_EVENT
:
300 p
= "MAIN_FAIL_SND_CS_SIR_Msg\t";
302 case RDMA_BAD_RDC_EVENT
:
303 p
= "BAD_RDC_EVENT\t";
305 case RDMA_INTER1_EVENT
:
306 p
= "INTER1_EVENT\t";
308 case RDMA_INTER2_EVENT
:
309 p
= "INTER2_EVENT\t";
311 case RDMA_INTER3_EVENT
:
312 p
= "INTER3_EVENT\t";
314 case READ_LOSS_EVENT
:
315 p
= "READ_LOSS_EVENT\t";
317 case START_HANDLER_IRQ
:
318 p
= "START_HANDLER_IRQ\t";
320 case READ_BAD_WAIT_EVENT
:
321 p
= "READ_BAD_WAIT\t";
323 case READ_TRY_RDMA_EVENT
:
324 p
= "READ_TRY_RDMA\t";
326 case READ_NULL_IRQ_EVENT_EVENT
:
327 p
= "READ_NULL_IRQ\t";
329 case READ_DEF_IRQ_EVENT_EVENT
:
330 p
= "READ_DEF_IRQ\t";
336 p
= "RDMA_00_OPEN\t";
339 p
= "RDMA_000_OPEN\t";
344 case INTR_RGP0M_UNXP_EVENT
:
345 p
= "INTR_RGP0M_UNXP_EVENT\t";
347 case READ_TIMEOUT_EVENT
:
348 p
= "READ_TIMEOUT_\t";
350 case READ_RET_WAIT_EVENT
:
351 p
= "READ_RET_WAIT_\t";
353 case WRITE_TDMA_On_EVENT
:
354 p
= "WRITE_TDMA_On_\t";
356 case WRITE_DMA_TBC_EVENT
:
357 p
= "WRITE_DMA_TBC_\t";
359 case READ_RDMA_On_EVENT
:
360 p
= "READ_RDMA_On_\t";
362 case READ_DMA_RBC_EVENT
:
363 p
= "READ_DMA_RBC_\t";
365 case READ_SIGN2_EVENT
:
366 p
= "READ_SIGN2_EVENT\t";
372 p
= "RDMA_TEST_STAT\t";
380 case NO_FREE_BUFF_EVENT
:
381 p
= "NO_FREE_BUFF\t";
383 case RDMA_E_TIMER_IO_EVENT
:
384 p
= "RDMA_E_TIMER_IO\t";
387 n_print
= sprintf(p_DEFAULT
, "0x%x\t", event
);
388 p_DEFAULT
[n_print
] = 0;
394 void get_event_rdma(int need_lock
)
396 unsigned int event_cur
;
397 rdma_addr_struct_t clkr
;
398 unsigned long flags
= 0;
399 char *p1
, *p2
, *preg
;
403 raw_spin_lock_irqsave(&mu_fix_event
, flags
);
404 printk("************get_event_rdma START*****************************"
405 "***************\n");
406 if (rdma_event
.event_last_get
)
407 event_cur
= rdma_event
.event_last_get
;
409 event_cur
= rdma_event
.event_cur
;
411 clkr
.addr
= rdma_event
.event
[event_cur
].clkr
;
414 switch (rdma_event
.event
[event_cur
].event
) {
419 p1
= "RDMA_TEST_STAT";
425 p1
= "RDMA_SEND_MSG";
431 switch (rdma_event
.event
[event_cur
].val1
) {
438 case TRY_SLEEP_EVENT
:
441 case WAKE_UPPED_EVENT
:
447 case BAD_IRC_COUNT_EVENT
:
448 p2
= "BAD_IRC_COUNT";
451 p2
= "BAD_COUNT_MSG";
453 case TRY_WAKE_UP_EVENT
:
456 case E2K_HALT_OK_EVENT
:
459 case TEST_SEND_MSG_START
:
460 p2
= "TEST_SEND_MSG_START";
462 case TEST_SEND_MSG_FINISH
:
463 p2
= "TEST_SEND_MSG_FINISH";
466 p2
= "BIG_COUNT_MSG";
478 p2
= "RX_TRWD_EVENT";
481 p2
= "TRY_RDMA_EVENT";
484 p2
= "RX_READY_EVENT";
487 p2
= "TX_READY_EVENT";
490 p2
= "TRY_TDMA_EVENT";
493 p2
= "TX_TRWD_EVENT";
495 case MSG_CS_ERROR_EVENT
:
501 case TCS_ERROR_EVENT
:
504 case TDC_TRY_TDMA0_UNEXPECT_EVENT
:
505 p2
= "TDC_TRY_TDMA0_UNEXP";
507 case TDC_TXR_FREE_UNEXPECT_EVENT
:
508 p2
= "TDC_TXR_FREE_UNEXP";
510 case RDC_TRY_RDMA0_UNEXPECT_EVENT
:
511 p2
= "RDC_TRY_RDMA0_UNEXP";
513 case RDC_RXR_FREE_UNEXPECT_EVENT
:
514 p2
= "RDC_RXR_FREE_UNEXP";
516 case RDC_TX_READY0_UNEXPECT_EVENT
:
517 p2
= "RDC_TRDMA_TX_READY0_UNEXP";
519 case RX_TRWD_RX_TRWD_UNEXPECT_EVENT
:
520 p2
= "RX_TRWD_RX_TRWD_UNEXP";
522 case RX_TRWD_RXR_FREE0_UNEXPECT_EVENT
:
523 p2
= "RX_TRWD_RXR_FREE0_UNEXP";
525 case RX_TRWD_TRY_RDMA_UNEXPECT_EVENT
:
526 p2
= "RX_TRWD_TRY_RDMA_UNEXP";
528 case RX_READY_RX_READY_UNEXPECT_EVENT
:
529 p2
= "RX_READY_RX_READY_UNEXP";
531 case RX_READY_TX_TRWD0_UNEXPECT_EVENT
:
532 p2
= "RX_READY_TX_TRWD0_UNEXP";
534 case TX_READY_TX_READY_UNEXPECT_EVENT
:
535 p2
= "TX_READY_TX_READY_UNEXP";
537 case TX_READY_RX_TRWD0_UNEXPECT_EVENT
:
538 p2
= "TX_READY_RX_TRWD0_UNEXP";
540 case TX_TRWD_TX_TRWD_UNEXPECT_EVENT
:
541 p2
= "TX_TRWD_TX_TRWD_UNEXP";
543 case TX_TRWD_RX_READY1_UNEXPECT_EVENT
:
544 p2
= "TX_TRWD_RX_READY1_UNEXP";
546 case TX_TRWD_RX_READY2_UNEXPECT_EVENT
:
547 p2
= "TX_TRWD_RX_READY2_UNEXP";
549 case TX_TRWD_TRY_TDMA_UNEXPECT_EVENT
:
550 p2
= "TX_TRWD_TRY_TDMA_UNEXP";
552 case TX_TRWD_TXR_FREE0_UNEXPECT_EVENT
:
553 p2
= "TX_TRWD_TXR_FREE0_UNEXP";
555 case TRY_TDMA_TRY_TDMA_UNEXPECT_EVENT
:
556 p2
= "TRY_TDMA_TRY_TDMA_UNEXP";
558 case TRY_TDMA_TXR_FREE0_UNEXPECT_EVENT
:
559 p2
= "TRY_TDMA_TXR_FREE0_UNEXP";
561 case TRY_TDMA_RX_READY0_UNEXPECT_EVENT
:
562 p2
= "TRY_TDMA_RX_READY0_UNEXP";
564 case TIME_OUT_TXR_FREE_UNEXPECT_EVENT
:
565 p2
= "TIME_OUT_TXR_FREE_UNEXP";
567 case TIME_OUT_RXR_FREE_UNEXPECT_EVENT
:
568 p2
= "TIME_OUT_RXR_FREE_UNEXP";
570 case TIME_OUT_TXR_FREE0_UNEXPECT_EVENT
:
571 p2
= "TIME_OUT_TXR_FREE0_UNEXP";
573 case TIME_OUT_RXR_FREE0_UNEXPECT_EVENT
:
574 p2
= "TIME_OUT_RXR_FREE0_UNEXP";
576 case TIME_OUT_RX_TRWD_UNEXPECT_EVENT
:
577 p2
= "TIME_OUT_RX_TRWD_UNEXP";
579 case TIME_OUT_TX_TRWD_UNEXPECT_EVENT
:
580 p2
= "TIME_OUT_TX_TRWD_UNEXP";
582 case TIME_OUT_TRY_RDMA_UNEXPECT_EVENT
:
583 p2
= "TIME_OUT_TRY_RDMA_UNEXP";
585 case TIME_OUT_TRY_TDMA_UNEXPECT_EVENT
:
586 p2
= "TIME_OUT_TRY_TDMA_UNEXP";
588 case TIME_OUT_RX_READY_UNEXPECT_EVENT
:
589 p2
= "TIME_OUT_RX_READY_UNEXP";
591 case TIME_OUT_TX_READY_UNEXPECT_EVENT
:
592 p2
= "TIME_OUT_TX_READY_UNEXP";
595 case TIME_out_TXR_FREE_UNEXPECT_EVENT
:
596 p2
= "TIME_out_TXR_FREE_UNEXP";
598 case TIME_out_RXR_FREE_UNEXPECT_EVENT
:
599 p2
= "TIME_out_RXR_FREE_UNEXP";
601 case TIME_out_RX_TRWD_UNEXPECT_EVENT
:
602 p2
= "TIME_out_RX_TRWD_UNEXP";
604 case TIME_out_TX_TRWD_UNEXPECT_EVENT
:
605 p2
= "TIME_out_TX_TRWD_UNEXP";
607 case TIME_out_TRY_RDMA_UNEXPECT_EVENT
:
608 p2
= "TIME_out_TRY_RDMA_UNEXP";
610 case TIME_out_TRY_TDMA_UNEXPECT_EVENT
:
611 p2
= "TIME_out_TRY_TDMA_UNEXP";
613 case TIME_out_RX_READY_UNEXPECT_EVENT
:
614 p2
= "TIME_out_RX_READY_UNEXP";
616 case TIME_out_TX_READY_UNEXPECT_EVENT
:
617 p2
= "TIME_out_TX_READY_UNEXP";
619 case INTR_MSG_READY_UNXP_EVENT
:
620 p2
= "INTR_MSG_READY_UNXP";
628 case SEND_ALL_UNEXPECT_EVENT
:
629 p2
= "SEND_ALL_UNEXPECT";
631 case MSF_ALL_UNEXPECT_EVENT
:
632 p2
= "MSF_ALL_UNEXPECT";
634 case DMRCL0_UNEXPECT_EVENT
:
635 p2
= "DMRCL0_UNEXPECT";
637 case MSF_COUNT_MAX_UNEXPECT_EVENT
:
638 p2
= "MSF_COUNT_MAX_UNEXPECT";
642 printk("%u 0x%08x%08x %s\t\t\t0x%08x\t\t0x%08x\n",
643 rdma_event
.event
[event_cur
].channel
,
644 clkr
.fields
.haddr
, clkr
.fields
.laddr
,
645 p1
, rdma_event
.event
[event_cur
].val1
,
646 rdma_event
.event
[event_cur
].val2
);
649 printk("%u 0x%08x%08x %s\t\t%s\t\t0x%08x\n",
650 rdma_event
.event
[event_cur
].channel
,
651 clkr
.fields
.haddr
, clkr
.fields
.laddr
,
653 rdma_event
.event
[event_cur
].val2
);
656 switch (rdma_event
.event
[event_cur
].event
) {
667 switch (rdma_event.event[event_cur].val1) {
668 case SHIFT_IOL_CSR : preg = "IOL_CSR\0"; break;
669 case SHIFT_IO_CSR : preg = "IO_CSR\0"; break;
670 case SHIFT_IO_VID : preg = "IO_VID\0"; break;
671 case SHIFT_VID : preg = "VID\0"; break;
672 case SHIFT_DD_ID : preg = "DD_ID\0"; break;
673 case SHIFT_CH_IDT : preg = "CH_IDT\0"; break;
674 case SHIFT_DMD_ID : preg = "DMD_ID\0"; break;
675 case SHIFT_CS : preg = "CS\0"; break;
676 case SHIFT_N_IDT : preg = "N_IDT\0"; break;
677 case SHIFT_ES : preg = "ES\0"; break;
678 case SHIFT_IRQ_MC : preg = "IRQ_MC\0"; break;
679 case SHIFT_DMA_TCS : preg = "DMA_TCS\0"; break;
680 case SHIFT_DMA_TSA : preg = "DMA_TSA\0"; break;
681 case SHIFT_DMA_TBC : preg = "DMA_TBC\0"; break;
682 case SHIFT_DMA_RCS : preg = "DMA_RCS\0"; break;
683 case SHIFT_DMA_RSA : preg = "DMA_RSA\0"; break;
684 case SHIFT_DMA_RBC : preg = "DMA_RBC\0"; break;
685 case SHIFT_MSG_CS : preg = "MSG_CS\0"; break;
686 case SHIFT_TDMSG : preg = "TDMSG\0"; break;
687 case SHIFT_RDMSG : preg = "RDMSG\0"; break;
688 case SHIFT_DMA_HTSA : preg = "DMA_HTSA\0"; break;
689 case SHIFT_DMA_HRSA : preg = "DMA_HRSA\0"; break;
690 case SHIFT_CAM : preg = "CAM\0"; break;
691 default : preg = "UNKN\0";
695 if (rdma_event
.event
[event_cur
].val1
== SHIFT_IOL_CSR
)
697 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_IO_VID
)
699 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_DD_ID
)
701 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_CH_IDT
)
703 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_DMD_ID
)
705 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_CS
)
707 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_N_IDT
)
709 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_ES
)
711 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_IRQ_MC
)
713 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_DMA_TCS
)
715 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_DMA_TSA
)
717 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_DMA_TBC
)
719 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_DMA_RCS
)
721 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_DMA_RSA
)
723 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_DMA_RBC
)
725 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_MSG_CS
)
727 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_TDMSG
)
729 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_RDMSG
)
731 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_DMA_HTSA
)
733 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_DMA_HRSA
)
735 else if (rdma_event
.event
[event_cur
].val1
== SHIFT_CAM
)
740 printk("%u 0x%08x%08x %s\t\t\t%s\t\t0x%08x\n",
741 rdma_event
.event
[event_cur
].channel
,
742 clkr
.fields
.haddr
, clkr
.fields
.laddr
,
743 p1
, preg
, rdma_event
.event
[event_cur
].val2
);
746 p1
= get_event(rdma_event
.event
[event_cur
].event
);
748 printk("0x%08x 0x%08x%08x 0x%08x 0x%08x 0x%08x\n",
749 rdma_event
.event
[event_cur
].channel
,
750 clkr
.fields
.haddr
, clkr
.fields
.laddr
,
751 rdma_event
.event
[event_cur
].event
,
752 rdma_event
.event
[event_cur
].val1
,
753 rdma_event
.event
[event_cur
].val2
);
755 printk("%u 0x%08x%08x %s 0x%08x 0x%08x\n",
756 rdma_event
.event
[event_cur
].channel
,
757 clkr
.fields
.haddr
, clkr
.fields
.laddr
,
758 p1
, rdma_event
.event
[event_cur
].val1
,
759 rdma_event
.event
[event_cur
].val2
);
762 if (event_cur
== (SIZE_EVENT
- 1))
766 if (event_cur
== rdma_event
.event_cur
)
769 printk("************get_event_rdma FINISH**************************"
770 "******************\n");
772 raw_spin_unlock_irqrestore(&mu_fix_event
, flags
);