From 58395167ee5a13ab84e1010b5fad540b23f0d59a Mon Sep 17 00:00:00 2001 From: proski Date: Thu, 7 May 2009 21:11:03 +0000 Subject: [PATCH] Remove all references to _trace_regop() and MMIOTRACE 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 | 8 -------- ath_hal/ah_os.c | 47 ----------------------------------------------- ath_hal/ah_os.h | 10 ---------- 3 files changed, 65 deletions(-) diff --git a/Makefile.inc b/Makefile.inc index 667438e..496cbbd 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -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 diff --git a/ath_hal/ah_os.c b/ath_hal/ah_os.c index 5102a4b..0bff6c7 100644 --- a/ath_hal/ah_os.c +++ b/ath_hal/ah_os.c @@ -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); diff --git a/ath_hal/ah_os.h b/ath_hal/ah_os.h index 3475603..f962180 100644 --- a/ath_hal/ah_os.h +++ b/ath_hal/ah_os.h @@ -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; -- 2.35.1