5 void print_isd_info(unsigned int baseaddr
)
7 volatile unsigned int *regs
;
12 unsigned int ack_count
, nack_count
, cur_status
;
14 regs
= (unsigned int *)baseaddr
;
15 if((regs
[0] != 0x6a) || (regs
[1] != 0xb4)) {
16 printf("Incorrect magic number\n");
20 nbytes
= (regs
[3] + 7)/8;
22 regs
[4] = 1; // freeze
23 offset
= 6; // regs[5] is reset
26 for(j
=0;j
<nbytes
;j
++) {
28 ack_count
|= regs
[offset
++];
31 for(j
=0;j
<nbytes
;j
++) {
33 nack_count
|= regs
[offset
++];
35 cur_status
= regs
[offset
++];
36 printf("#%d: ACK_CNT:%10u NAK_CNT:%10u %s %s\n",
37 i
, ack_count
, nack_count
,
38 cur_status
& 1 ? "stb" : " ",
39 cur_status
& 2 ? "ack" : " ");
41 regs
[4] = 0; // unfreeze