diff options
author | phk <phk@FreeBSD.org> | 2005-09-20 09:52:53 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-09-20 09:52:53 +0000 |
commit | 76edcb75f859368f044c7e7e3cc89d40b2f7a737 (patch) | |
tree | 343a70c8c3ca96f9b98cedd2227618a383c2bd37 /sys/pci/if_sis.c | |
parent | ed5e4faa718f647c195f6a0ea15572d5d8941b1f (diff) | |
download | FreeBSD-src-76edcb75f859368f044c7e7e3cc89d40b2f7a737.zip FreeBSD-src-76edcb75f859368f044c7e7e3cc89d40b2f7a737.tar.gz |
Move code macros from if_sis*reg*.h to if_sis.*c*
Diffstat (limited to 'sys/pci/if_sis.c')
-rw-r--r-- | sys/pci/if_sis.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index ab4a121..927e6f6 100644 --- a/sys/pci/if_sis.c +++ b/sys/pci/if_sis.c @@ -100,6 +100,22 @@ MODULE_DEPEND(sis, miibus, 1, 1, 1); /* "controller miibus0" required. See GENERIC if you get errors here. */ #include "miibus_if.h" +#define SIS_LOCK(_sc) mtx_lock(&(_sc)->sis_mtx) +#define SIS_UNLOCK(_sc) mtx_unlock(&(_sc)->sis_mtx) +#define SIS_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sis_mtx, MA_OWNED) + +/* + * register space access macros + */ +#define CSR_WRITE_4(sc, reg, val) \ + bus_space_write_4(sc->sis_btag, sc->sis_bhandle, reg, val) + +#define CSR_READ_4(sc, reg) \ + bus_space_read_4(sc->sis_btag, sc->sis_bhandle, reg) + +#define CSR_READ_2(sc, reg) \ + bus_space_read_2(sc->sis_btag, sc->sis_bhandle, reg) + /* * Various supported device vendors/types and their names. */ |