Changeset View
Changeset View
Standalone View
Standalone View
head/tools/tools/ath/common/dumpregs_5210.c
Show All 22 Lines | |||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | ||||
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | ||||
* THE POSSIBILITY OF SUCH DAMAGES. | * THE POSSIBILITY OF SUCH DAMAGES. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#include <sys/param.h> | |||||
#include "diag.h" | #include "diag.h" | ||||
#include "ah.h" | #include "ah.h" | ||||
#include "ah_internal.h" | #include "ah_internal.h" | ||||
#include "ar5210/ar5210reg.h" | #include "ar5210/ar5210reg.h" | ||||
#include "ar5210/ar5210phy.h" | #include "ar5210/ar5210phy.h" | ||||
#include "dumpregs.h" | #include "dumpregs.h" | ||||
#define N(a) (sizeof(a) / sizeof(a[0])) | |||||
static struct dumpreg ar5210regs[] = { | static struct dumpreg ar5210regs[] = { | ||||
DEFBASIC(AR_TXDP0, "TXDP0"), | DEFBASIC(AR_TXDP0, "TXDP0"), | ||||
DEFBASIC(AR_TXDP1, "TXDP1"), | DEFBASIC(AR_TXDP1, "TXDP1"), | ||||
DEFBASICfmt(AR_CR, "CR", AR_CR_BITS), | DEFBASICfmt(AR_CR, "CR", AR_CR_BITS), | ||||
DEFBASIC(AR_RXDP, "RXDP"), | DEFBASIC(AR_RXDP, "RXDP"), | ||||
DEFBASICfmt(AR_CFG, "CFG", AR_CFG_BITS), | DEFBASICfmt(AR_CFG, "CFG", AR_CFG_BITS), | ||||
/* NB: read clears pending interrupts */ | /* NB: read clears pending interrupts */ | ||||
DEFVOIDfmt(AR_ISR, "ISR", AR_ISR_BITS), | DEFVOIDfmt(AR_ISR, "ISR", AR_ISR_BITS), | ||||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | static struct dumpreg ar5210regs[] = { | ||||
DEFVOIDfmt(AR_PHY_ACTIVE, "PHY_ACTIVE", AR_PHY_ACTIVE_BITS), | DEFVOIDfmt(AR_PHY_ACTIVE, "PHY_ACTIVE", AR_PHY_ACTIVE_BITS), | ||||
DEFVOIDfmt(AR_PHY_AGCCTL, "PHY_AGCCTL", AR_PHY_AGCCTL_BITS), | DEFVOIDfmt(AR_PHY_AGCCTL, "PHY_AGCCTL", AR_PHY_AGCCTL_BITS), | ||||
}; | }; | ||||
static __constructor void | static __constructor void | ||||
ar5210_ctor(void) | ar5210_ctor(void) | ||||
{ | { | ||||
#define MAC5210 SREV(1,0), SREV(2,0) | #define MAC5210 SREV(1,0), SREV(2,0) | ||||
register_regs(ar5210regs, N(ar5210regs), MAC5210, PHYANY); | register_regs(ar5210regs, nitems(ar5210regs), MAC5210, PHYANY); | ||||
register_keycache(64, MAC5210, PHYANY); | register_keycache(64, MAC5210, PHYANY); | ||||
register_range(0x9800, 0x9840, DUMP_BASEBAND, MAC5210, PHYANY); | register_range(0x9800, 0x9840, DUMP_BASEBAND, MAC5210, PHYANY); | ||||
} | } |