/*-1* SPDX-License-Identifier: ISC2*3* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting4* Copyright (c) 2002-2008 Atheros Communications, Inc.5*6* Permission to use, copy, modify, and/or distribute this software for any7* purpose with or without fee is hereby granted, provided that the above8* copyright notice and this permission notice appear in all copies.9*10* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES11* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF12* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR13* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES14* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN15* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF16* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.17*/18#ifndef _ATH_AH_DECODE_H_19#define _ATH_AH_DECODE_H_20/*21* Register tracing support.22*23* Setting hw.ath.hal.alq=1 enables tracing of all register reads and24* writes to the file /tmp/ath_hal.log. The file format is a simple25* fixed-size array of records. When done logging set hw.ath.hal.alq=026* and then decode the file with the arcode program (that is part of the27* HAL). If you start+stop tracing the data will be appended to an28* existing file.29*/30struct athregrec {31uint32_t threadid;32uint32_t op : 8,33reg : 24;34uint32_t val;35};3637enum {38OP_READ = 0, /* register read */39OP_WRITE = 1, /* register write */40OP_DEVICE = 2, /* device identification */41OP_MARK = 3, /* application marker */42};4344enum {45AH_MARK_RESET, /* ar*Reset entry, bChannelChange */46AH_MARK_RESET_LINE, /* ar*_reset.c, line %d */47AH_MARK_RESET_DONE, /* ar*Reset exit, error code */48AH_MARK_CHIPRESET, /* ar*ChipReset, channel num */49AH_MARK_PERCAL, /* ar*PerCalibration, channel num */50AH_MARK_SETCHANNEL, /* ar*SetChannel, channel num */51AH_MARK_ANI_RESET, /* ar*AniReset, opmode */52AH_MARK_ANI_POLL, /* ar*AniReset, listen time */53AH_MARK_ANI_CONTROL, /* ar*AniReset, cmd */54AH_MARK_RX_CTL, /* RX DMA control */55AH_MARK_CHIP_POWER, /* chip power control, mode */56AH_MARK_CHIP_POWER_DONE, /* chip power control done, status */57};5859enum {60AH_MARK_RX_CTL_PCU_START,61AH_MARK_RX_CTL_PCU_STOP,62AH_MARK_RX_CTL_DMA_START,63AH_MARK_RX_CTL_DMA_STOP,64AH_MARK_RX_CTL_DMA_STOP_ERR,65AH_MARK_RX_CTL_DMA_STOP_OK,66};6768#endif /* _ATH_AH_DECODE_H_ */697071