|
@@ -138,10 +138,10 @@ static int arbel_cmd ( struct arbel *arbel, unsigned long command,
|
138
|
138
|
unsigned int i;
|
139
|
139
|
int rc;
|
140
|
140
|
|
141
|
|
- DBGC ( arbel, "Arbel %p command %02x in %zx%s out %zx%s\n",
|
142
|
|
- arbel, opcode, in_len,
|
143
|
|
- ( ( command & ARBEL_HCR_IN_MBOX ) ? "(mbox)" : "" ), out_len,
|
144
|
|
- ( ( command & ARBEL_HCR_OUT_MBOX ) ? "(mbox)" : "" ) );
|
|
141
|
+ DBGC2 ( arbel, "Arbel %p command %02x in %zx%s out %zx%s\n",
|
|
142
|
+ arbel, opcode, in_len,
|
|
143
|
+ ( ( command & ARBEL_HCR_IN_MBOX ) ? "(mbox)" : "" ), out_len,
|
|
144
|
+ ( ( command & ARBEL_HCR_OUT_MBOX ) ? "(mbox)" : "" ) );
|
145
|
145
|
|
146
|
146
|
/* Check that HCR is free */
|
147
|
147
|
if ( ( rc = arbel_cmd_wait ( arbel, &hcr ) ) != 0 ) {
|
|
@@ -168,14 +168,10 @@ static int arbel_cmd ( struct arbel *arbel, unsigned long command,
|
168
|
168
|
opcode, opcode,
|
169
|
169
|
opcode_modifier, op_mod,
|
170
|
170
|
go, 1 );
|
171
|
|
-
|
172
|
|
- DBG_HD ( &hcr, sizeof ( hcr ) );
|
|
171
|
+ DBGC2_HD ( arbel, &hcr, sizeof ( hcr ) );
|
173
|
172
|
if ( in_len ) {
|
174
|
|
- size_t dump_len = in_len;
|
175
|
|
- if ( dump_len > 256 )
|
176
|
|
- dump_len = 256;
|
177
|
|
- // DBG ( "Input:\n" );
|
178
|
|
- // DBG_HD ( in, dump_len );
|
|
173
|
+ DBGC2 ( arbel, "Input:\n" );
|
|
174
|
+ DBGC2_HD ( arbel, in, ( ( in_len < 256 ) ? in_len : 256 ) );
|
179
|
175
|
}
|
180
|
176
|
|
181
|
177
|
/* Issue command */
|
|
@@ -207,13 +203,9 @@ static int arbel_cmd ( struct arbel *arbel, unsigned long command,
|
207
|
203
|
hcr.u.dwords[3] = readl ( arbel->config + ARBEL_HCR_REG ( 3 ) );
|
208
|
204
|
hcr.u.dwords[4] = readl ( arbel->config + ARBEL_HCR_REG ( 4 ) );
|
209
|
205
|
memcpy ( out, out_buffer, out_len );
|
210
|
|
-
|
211
|
206
|
if ( out_len ) {
|
212
|
|
- size_t dump_len = out_len;
|
213
|
|
- if ( dump_len > 256 )
|
214
|
|
- dump_len = 256;
|
215
|
|
- // DBG ( "Output:\n" );
|
216
|
|
- // DBG_HD ( out, dump_len );
|
|
207
|
+ DBGC2 ( arbel, "Output:\n" );
|
|
208
|
+ DBGC2_HD ( arbel, out, ( ( out_len < 256 ) ? out_len : 256 ) );
|
217
|
209
|
}
|
218
|
210
|
|
219
|
211
|
return 0;
|
|
@@ -737,9 +729,9 @@ static void arbel_ring_doorbell ( struct arbel *arbel,
|
737
|
729
|
union arbelprm_doorbell_register *db_reg,
|
738
|
730
|
unsigned int offset ) {
|
739
|
731
|
|
740
|
|
- DBG ( "arbel_ring_doorbell %08lx:%08lx to %lx\n",
|
741
|
|
- db_reg->dword[0], db_reg->dword[1],
|
742
|
|
- virt_to_phys ( arbel->uar + offset ) );
|
|
732
|
+ DBGC2 ( arbel, "Arbel %p ringing doorbell %08lx:%08lx at %lx\n",
|
|
733
|
+ arbel, db_reg->dword[0], db_reg->dword[1],
|
|
734
|
+ virt_to_phys ( arbel->uar + offset ) );
|
743
|
735
|
|
744
|
736
|
barrier();
|
745
|
737
|
writel ( db_reg->dword[0], ( arbel->uar + offset + 0 ) );
|