From 76edcb75f859368f044c7e7e3cc89d40b2f7a737 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 20 Sep 2005 09:52:53 +0000 Subject: [PATCH] Move code macros from if_sis*reg*.h to if_sis.*c* --- sys/pci/if_sis.c | 16 ++++++++++++++++ sys/pci/if_sisreg.h | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index ab4a1216976f..927e6f637758 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. */ diff --git a/sys/pci/if_sisreg.h b/sys/pci/if_sisreg.h index 03ac3cc87a8e..58335637868a 100644 --- a/sys/pci/if_sisreg.h +++ b/sys/pci/if_sisreg.h @@ -466,22 +466,6 @@ struct sis_softc { struct mtx sis_mtx; }; -#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) - #define SIS_TIMEOUT 1000 #define ETHER_ALIGN 2 #define SIS_RXLEN 1536