diff options
author | imp <imp@FreeBSD.org> | 2003-10-25 19:56:19 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2003-10-25 19:56:19 +0000 |
commit | 08148c6afb7306fe5041d7aa718534a163898128 (patch) | |
tree | 6b9c970df55350b30c9dce96d5e4ff29f0a19eb2 /sys/dev/sn/if_snreg.h | |
parent | a7b0d8155091695eef56bd362440edb28ad41366 (diff) | |
download | FreeBSD-src-08148c6afb7306fe5041d7aa718534a163898128.zip FreeBSD-src-08148c6afb7306fe5041d7aa718534a163898128.tar.gz |
Convert to bus_space.
Make the pccard attachment work with NEWCARD
Start locking of the driver, but only the macros are defined right now
Tested on: Megahertz CC10BT/2
# (These cards are very popular on ebay these days, and run < $10 including
# shipping from some sellers).
Diffstat (limited to 'sys/dev/sn/if_snreg.h')
-rw-r--r-- | sys/dev/sn/if_snreg.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/dev/sn/if_snreg.h b/sys/dev/sn/if_snreg.h index e4e4514..55dba1d 100644 --- a/sys/dev/sn/if_snreg.h +++ b/sys/dev/sn/if_snreg.h @@ -394,19 +394,15 @@ * or slightly complicated, repeated tasks. */ -/* The base I/O address. - */ -#define BASE (sc->sn_io_addr) - /* Select a register bank, 0 to 3 */ -#define SMC_SELECT_BANK(x) { outw( BASE + BANK_SELECT_REG_W, (x) ); } +#define SMC_SELECT_BANK(sc, x) { CSR_WRITE_2(sc, BANK_SELECT_REG_W, (x)); } /* Define a small delay for the reset */ -#define SMC_DELAY() { inw( BASE + RECV_CONTROL_REG_W );\ - inw( BASE + RECV_CONTROL_REG_W );\ - inw( BASE + RECV_CONTROL_REG_W ); } +#define SMC_DELAY(sc) { CSR_READ_2(sc, RECV_CONTROL_REG_W); \ + CSR_READ_2(sc, RECV_CONTROL_REG_W); \ + CSR_READ_2(sc, RECV_CONTROL_REG_W); } /* Define flags */ |