From: John Hodge Date: Sun, 9 Feb 2014 01:59:00 +0000 (+0800) Subject: UDI/PIO - Return buffer correctly, extra tracing X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=0507e8c0c4e9d01a74d62ea79c8f6e6ab6b2fe28;p=tpg%2Facess2.git UDI/PIO - Return buffer correctly, extra tracing --- diff --git a/KernelLand/Modules/Interfaces/UDI/udi_lib/physio/pio.c b/KernelLand/Modules/Interfaces/UDI/udi_lib/physio/pio.c index f0428fc7..dc45d256 100644 --- a/KernelLand/Modules/Interfaces/UDI/udi_lib/physio/pio.c +++ b/KernelLand/Modules/Interfaces/UDI/udi_lib/physio/pio.c @@ -2,7 +2,7 @@ * \file udi_lib/physio/pio.c * \author John Hodge (thePowersGang) */ -#define DEBUG 1 +#define DEBUG 0 #include #include #include @@ -479,6 +479,7 @@ void udi_pio_trans(udi_pio_trans_call_t *callback, udi_cb_t *gcb, _operation_and(tran_size, reg, ®isters[operand]); break; case UDI_PIO_AND_IMM: + LOG("AND_IMM R%i &= 0x%x", reg_num, operand); tmpval.words[0] = operand; _zero_upper(UDI_PIO_2BYTE, &tmpval); _operation_and(tran_size, reg, &tmpval); @@ -487,6 +488,7 @@ void udi_pio_trans(udi_pio_trans_call_t *callback, udi_cb_t *gcb, _operation_or(tran_size, reg, ®isters[operand]); break; case UDI_PIO_OR_IMM: + LOG("OR_IMM R%i |= 0x%x", reg_num, operand); tmpval.words[0] = operand; _zero_upper(UDI_PIO_4BYTE, &tmpval); _operation_or(tran_size, reg, &tmpval); @@ -622,10 +624,10 @@ void udi_pio_trans(udi_pio_trans_call_t *callback, udi_cb_t *gcb, ops); } end: - callback(gcb, NULL, UDI_OK, ret_status); + callback(gcb, buf, UDI_OK, ret_status); return ; error: - callback(gcb, NULL, UDI_STAT_HW_PROBLEM, 0); + callback(gcb, buf, UDI_STAT_HW_PROBLEM, 0); } void udi_pio_probe(udi_pio_probe_call_t *callback, udi_cb_t *gcb,