Remove all references to _trace_regop() and MMIOTRACE
authorproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Thu, 7 May 2009 21:11:03 +0000 (21:11 +0000)
committerproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Thu, 7 May 2009 21:11:03 +0000 (21:11 +0000)
It's obsolete and useless now, when the HAL sources are open.  It also
misuses ath_hal_debug in a way incompatible with the use of
ath_hal_debug inside the HAL.

The mmiotrace facility is available in the kernel and doesn't require
any changes to the sources.

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4020 0192ed92-7a03-0410-a25b-9323aeb14dbd

Makefile.inc
ath_hal/ah_os.c
ath_hal/ah_os.h

index 667438e798fbd94fb85e548cedb4d4fccdd183d3..496cbbdb42e363a24d563c876b1343d6752266a2 100644 (file)
@@ -154,14 +154,6 @@ ifndef ATH_DEBUG
 export ATH_DEBUG=1
 endif
 
-ifndef MMIOTRACE
-export MMIOTRACE=0
-endif
-
-ifeq ($(strip $(MMIOTRACE)),1)
-EXTRA_CFLAGS += -DMMIOTRACE=1
-endif
-
 ifeq ($(strip $(ATH_DEBUG_SPINLOCKS)),1)
 COPTS+= -DATH_DEBUG_SPINLOCKS=1
 endif
index 5102a4b5bf026c818c567035da679facd7c8279d..0bff6c79bfc8639a2ebcdf2fceb20aaa6affc886 100644 (file)
@@ -897,34 +897,6 @@ ath_hal_print_register(struct ath_hal *ah,
 }
 EXPORT_SYMBOL(ath_hal_print_register);
 
-static inline void 
-_trace_regop(struct ath_hal *ah, int regop, u_int address, u_int32_t value)
-{
-#ifdef AH_DEBUG
-       switch (ath_hal_debug) {
-       case HAL_DEBUG_OFF:
-               break;
-       case HAL_DEBUG_REGOPS:
-               /* XXX: Identify wifiX */
-               _print_undecoded_register(ah, ath_hal_device, AH_TRUE /* prefer alq */,
-                                       regop, address, 
-                                       value);
-               break;
-       default:
-               /* XXX: Identify wifiX */
-               _print_decoded_register(ah, ath_hal_device, AH_TRUE /* prefer alq */,
-                                       regop, address, 
-                                       ((regop == REGOP_WRITE && ath_hal_debug >= HAL_DEBUG_REGOPS_DELTAS) ? 
-                                               _OS_REG_READ(ah, address) : 
-                                               value), 
-                                       value, 
-                                       (ath_hal_debug >= HAL_DEBUG_REGOPS_BITFIELDS));
-               break;
-       }
-
-#endif /* AH_DEBUG */
-}
-
 #if defined(AH_DEBUG) || defined(AH_REGOPS_FUNC) || defined(AH_DEBUG_ALQ)
 /*
  * Memory-mapped device register read/write.  These are here
@@ -941,7 +913,6 @@ _trace_regop(struct ath_hal *ah, int regop, u_int address, u_int32_t value)
 void __ahdecl
 ath_hal_reg_write(struct ath_hal *ah, u_int address, u_int32_t value)
 {
-       _trace_regop(ah, REGOP_WRITE, address, value);
        _OS_REG_WRITE(ah, address, value);
 }
 EXPORT_SYMBOL(ath_hal_reg_write);
@@ -951,7 +922,6 @@ u_int32_t __ahdecl
 ath_hal_reg_read(struct ath_hal *ah, u_int address)
 {
        u_int32_t val = _OS_REG_READ(ah, address);
-       _trace_regop(ah, REGOP_READ, address, val);
        return val;
 }
 EXPORT_SYMBOL(ath_hal_reg_read);
@@ -1122,23 +1092,9 @@ EXPORT_SYMBOL(ath_hal_computetxtime);
 EXPORT_SYMBOL(ath_hal_mhz2ieee);
 EXPORT_SYMBOL(ath_hal_process_noisefloor);
 
-#ifdef MMIOTRACE
-extern void (*kmmio_logmsg)(struct ath_hal *ah, u8 write, u_int address, u_int32_t val);
-
-void _trace_regop(struct ath_hal *ah, int regop, u_int address, u_int32_t newval);
-static void _kmmio_logmsg(struct ath_hal *ah, u8 write, u_int address, u_int32_t val) {
-       _trace_regop(ah, write ? REGOP_WRITE : REGOP_READ, address, val);
-}
-#endif /* MMIOTRACE */
-
-
 static int __init
 init_ath_hal(void)
 {
-#ifdef MMIOTRACE
-       kmmio_logmsg = _kmmio_logmsg;
-#endif
-
        ath_hal_sysctl_register();
        return (0);
 }
@@ -1147,9 +1103,6 @@ module_init(init_ath_hal);
 static void __exit
 exit_ath_hal(void)
 {
-#ifdef MMIOTRACE
-       kmmio_logmsg = NULL;
-#endif
        ath_hal_sysctl_unregister();
 }
 module_exit(exit_ath_hal);
index 34756035fedf8b0114e3784997fb2e5715b02113..f9621807e20cdd3c38ff708157527e9a21343587 100644 (file)
@@ -121,16 +121,6 @@ void __ahdecl ath_hal_free(void *p);
 #define        labs(_a)                __builtin_labs(_a)
 #endif
 
-#define HAL_DEBUG_OFF                  0
-/* Show register accesses */
-#define HAL_DEBUG_REGOPS               1
-/* Show decoded register dump (include name, etc) */
-#define HAL_DEBUG_REGOPS_DECODED       2
-/* Show bit-fields where we put decode logic in */
-#define HAL_DEBUG_REGOPS_BITFIELDS     3
-/* Add a read before a write to show 'changes', may have side-effects */
-#define HAL_DEBUG_REGOPS_DELTAS                4
-
 /* XXX: This should be stored per-device for proper multi-radio support */
 extern const char *ath_hal_func;
 extern const char *ath_hal_device;