diff options
author | weongyo <weongyo@FreeBSD.org> | 2010-01-31 21:18:22 +0000 |
---|---|---|
committer | weongyo <weongyo@FreeBSD.org> | 2010-01-31 21:18:22 +0000 |
commit | 9d4753ed16c144e682520b2681c7a13d70018387 (patch) | |
tree | 74efb352cc6cb4d089c66a66ce1354aeab587939 /sys/dev/siba/siba_pcib.c | |
parent | c841cfa60246ddcfedc9a424428a5a824da147d9 (diff) | |
download | FreeBSD-src-9d4753ed16c144e682520b2681c7a13d70018387.zip FreeBSD-src-9d4753ed16c144e682520b2681c7a13d70018387.tar.gz |
Adds siba_bwn module which is used with bwn(4). Main purpose of this
module is to distinguish parts of Silicon Backplane and of Broadcom
Wireless.
Diffstat (limited to 'sys/dev/siba/siba_pcib.c')
-rw-r--r-- | sys/dev/siba/siba_pcib.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sys/dev/siba/siba_pcib.c b/sys/dev/siba/siba_pcib.c index d43f54c..5175aa7 100644 --- a/sys/dev/siba/siba_pcib.c +++ b/sys/dev/siba/siba_pcib.c @@ -55,9 +55,9 @@ __FBSDID("$FreeBSD$"); #include "pcib_if.h" -#include <dev/siba/sibavar.h> -#include <dev/siba/sibareg.h> #include <dev/siba/siba_ids.h> +#include <dev/siba/sibareg.h> +#include <dev/siba/sibavar.h> #include <dev/siba/siba_pcibvar.h> #ifndef MIPS_MEM_RID @@ -79,10 +79,6 @@ __FBSDID("$FreeBSD$"); #define SBPCI_CFGBASE 0x0C000000 #define SBPCI_CFGSIZE 0x01000000 -#define SBPCI_SBTOPCI0 0x100 -#define SBPCI_SBTOPCI1 0x104 -#define SBPCI_SBTOPCI2 0x108 - /* * TODO: implement type 1 config space access (ie beyond bus 0) * we may need to tweak the windows to do this @@ -187,9 +183,12 @@ siba_pcib_attach(device_t dev) * XXX we need to be able to do type 1 too. * we probably don't need to be able to do i/o cycles. */ - SBPCI_WRITE_4(sc, SBPCI_SBTOPCI0, 1); /* I/O read/write window */ - SBPCI_WRITE_4(sc, SBPCI_SBTOPCI1, 2); /* type 0 configuration only */ - SBPCI_WRITE_4(sc, SBPCI_SBTOPCI2, 1 << 30); /* memory only */ + + /* I/O read/write window */ + SBPCI_WRITE_4(sc, SIBA_PCICORE_SBTOPCI0, 1); + /* type 0 configuration only */ + SBPCI_WRITE_4(sc, SIBA_PCICORE_SBTOPCI1, 2); + SBPCI_WRITE_4(sc, SIBA_PCICORE_SBTOPCI2, 1 << 30); /* memory only */ DELAY(500); /* XXX resource managers */ @@ -365,7 +364,7 @@ siba_pcib_read_config(device_t dev, u_int bus, u_int slot, u_int func, /* * The configuration tag on the broadcom is weird. */ - SBPCI_WRITE_4(sc, SBPCI_SBTOPCI1, 2); /* XXX again??? */ + SBPCI_WRITE_4(sc, SIBA_PCICORE_SBTOPCI1, 2); /* XXX again??? */ cfgtag = ((1 << slot) << 16) | (func << 8); cfgaddr = SBPCI_CFGBASE | cfgtag | (reg & ~3); |