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
This commit is contained in:
proski 2009-05-07 21:11:03 +00:00
parent 200f8b8a6a
commit 58395167ee
3 changed files with 0 additions and 65 deletions

View File

@ -154,14 +154,6 @@ ifndef ATH_DEBUG
export ATH_DEBUG=1 export ATH_DEBUG=1
endif endif
ifndef MMIOTRACE
export MMIOTRACE=0
endif
ifeq ($(strip $(MMIOTRACE)),1)
EXTRA_CFLAGS += -DMMIOTRACE=1
endif
ifeq ($(strip $(ATH_DEBUG_SPINLOCKS)),1) ifeq ($(strip $(ATH_DEBUG_SPINLOCKS)),1)
COPTS+= -DATH_DEBUG_SPINLOCKS=1 COPTS+= -DATH_DEBUG_SPINLOCKS=1
endif endif

View File

@ -897,34 +897,6 @@ ath_hal_print_register(struct ath_hal *ah,
} }
EXPORT_SYMBOL(ath_hal_print_register); 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) #if defined(AH_DEBUG) || defined(AH_REGOPS_FUNC) || defined(AH_DEBUG_ALQ)
/* /*
* Memory-mapped device register read/write. These are here * 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 void __ahdecl
ath_hal_reg_write(struct ath_hal *ah, u_int address, u_int32_t value) 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); _OS_REG_WRITE(ah, address, value);
} }
EXPORT_SYMBOL(ath_hal_reg_write); 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) ath_hal_reg_read(struct ath_hal *ah, u_int address)
{ {
u_int32_t val = _OS_REG_READ(ah, address); u_int32_t val = _OS_REG_READ(ah, address);
_trace_regop(ah, REGOP_READ, address, val);
return val; return val;
} }
EXPORT_SYMBOL(ath_hal_reg_read); EXPORT_SYMBOL(ath_hal_reg_read);
@ -1122,23 +1092,9 @@ EXPORT_SYMBOL(ath_hal_computetxtime);
EXPORT_SYMBOL(ath_hal_mhz2ieee); EXPORT_SYMBOL(ath_hal_mhz2ieee);
EXPORT_SYMBOL(ath_hal_process_noisefloor); 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 static int __init
init_ath_hal(void) init_ath_hal(void)
{ {
#ifdef MMIOTRACE
kmmio_logmsg = _kmmio_logmsg;
#endif
ath_hal_sysctl_register(); ath_hal_sysctl_register();
return (0); return (0);
} }
@ -1147,9 +1103,6 @@ module_init(init_ath_hal);
static void __exit static void __exit
exit_ath_hal(void) exit_ath_hal(void)
{ {
#ifdef MMIOTRACE
kmmio_logmsg = NULL;
#endif
ath_hal_sysctl_unregister(); ath_hal_sysctl_unregister();
} }
module_exit(exit_ath_hal); module_exit(exit_ath_hal);

View File

@ -121,16 +121,6 @@ void __ahdecl ath_hal_free(void *p);
#define labs(_a) __builtin_labs(_a) #define labs(_a) __builtin_labs(_a)
#endif #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 */ /* XXX: This should be stored per-device for proper multi-radio support */
extern const char *ath_hal_func; extern const char *ath_hal_func;
extern const char *ath_hal_device; extern const char *ath_hal_device;