diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-11-08 01:32:01 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-11-08 01:32:01 +0000 |
commit | 4b5e57fe52e27141c09b0e96e2afd44837182439 (patch) | |
tree | 4318edf60342c2535bb308042749b697e93b5ab1 /sys/dev/pci/if_bcereg.h | |
parent | f19ba02173ab2281bfb3e38f08099b4b217358b0 (diff) |
Clean up some of the "magic" constants in the driver, based on the
documentation for the Broadcom 43xx wireless chips that share the
same basic hardware.
From Jon Simola <jsimola at gmail dot com>
Diffstat (limited to 'sys/dev/pci/if_bcereg.h')
-rw-r--r-- | sys/dev/pci/if_bcereg.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/sys/dev/pci/if_bcereg.h b/sys/dev/pci/if_bcereg.h index 1b6c6066de8..66a5ed4f872 100644 --- a/sys/dev/pci/if_bcereg.h +++ b/sys/dev/pci/if_bcereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bcereg.h,v 1.2 2006/02/24 00:57:49 brad Exp $ */ +/* $OpenBSD: if_bcereg.h,v 1.3 2006/11/08 01:32:00 brad Exp $ */ /* $NetBSD: if_bcereg.h,v 1.3 2003/09/29 01:53:02 mrg Exp $ */ /* @@ -144,14 +144,16 @@ #define BCE_MIREG(x) ((x & 0x1F) << 18) #define BCE_MIPHY(x) ((x & 0x1F) << 23) -/* Magic constants.... */ -#define BCE_MAGIC_PHYEMAC_BASE 0x1000 -#define BCE_MAGIC_PHY (BCE_MAGIC_PHYEMAC_BASE + 90) -#define BCE_MAGIC_ENET0 (BCE_MAGIC_PHYEMAC_BASE + 79) -#define BCE_MAGIC_ENET1 (BCE_MAGIC_PHYEMAC_BASE + 78) -#define BCE_MAGIC_ENET2 (BCE_MAGIC_PHYEMAC_BASE + 81) -#define BCE_MAGIC_ENET3 (BCE_MAGIC_PHYEMAC_BASE + 80) -#define BCE_MAGIC_ENET4 (BCE_MAGIC_PHYEMAC_BASE + 83) -#define BCE_MAGIC_ENET5 (BCE_MAGIC_PHYEMAC_BASE + 82) - -#define SBIM_MAGIC_ERRORBITS 0x60000 +/* SPROM constants */ +#define BCE_SPROM_BASE 0x1000 +#define BCE_PHY (BCE_SPROM_BASE + 0x5A) /* MII Address */ +#define BCE_ENET0 (BCE_SPROM_BASE + 0x4F) +#define BCE_ENET1 (BCE_SPROM_BASE + 0x4E) +#define BCE_ENET2 (BCE_SPROM_BASE + 0x51) +#define BCE_ENET3 (BCE_SPROM_BASE + 0x50) +#define BCE_ENET4 (BCE_SPROM_BASE + 0x53) +#define BCE_ENET5 (BCE_SPROM_BASE + 0x52) + +#define SBIM_INBAND_ERROR 0x20000 +#define SBIM_TIMEOUT 0x40000 +#define SBIM_ERRORBITS (SBIM_INBAND_ERROR|SBIM_TIMEOUT) |