diff options
author | jhay <jhay@FreeBSD.org> | 2003-04-23 15:40:11 +0000 |
---|---|---|
committer | jhay <jhay@FreeBSD.org> | 2003-04-23 15:40:11 +0000 |
commit | f639676edeb7027a09e858b414c0a7faf63c4b68 (patch) | |
tree | 7f63706900a9da28204b6e89c6610ac930465ee7 /sys/dev/ar/if_arregs.h | |
parent | b9c860330d4c13295f99f7e0ee65f5266c66e32e (diff) | |
download | FreeBSD-src-f639676edeb7027a09e858b414c0a7faf63c4b68.zip FreeBSD-src-f639676edeb7027a09e858b414c0a7faf63c4b68.tar.gz |
Get rid of kvtop().
Change inb() and outb() to use bus_space*().
Diffstat (limited to 'sys/dev/ar/if_arregs.h')
-rw-r--r-- | sys/dev/ar/if_arregs.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/ar/if_arregs.h b/sys/dev/ar/if_arregs.h index fe5150a..f735435 100644 --- a/sys/dev/ar/if_arregs.h +++ b/sys/dev/ar/if_arregs.h @@ -169,21 +169,19 @@ #define ARC_GET_WIN(addr) ((addr >> ARC_WIN_SHFT) & AR_WIN_MSK) -#define ARC_SET_MEM(iobase,win) outb(iobase+AR_MSCA_EN, AR_ENA_MEM | \ +#define ARC_SET_MEM(hc,win) ar_outb(hc, AR_MSCA_EN, AR_ENA_MEM | \ ARC_GET_WIN(win)) -#define ARC_SET_SCA(iobase,ch) outb(iobase+AR_MSCA_EN, AR_ENA_MEM | \ +#define ARC_SET_SCA(hc,ch) ar_outb(hc, AR_MSCA_EN, AR_ENA_MEM | \ AR_ENA_SCA | (ch ? AR_SEL_SCA_1:AR_SEL_SCA_0)) -#define ARC_SET_OFF(iobase) outb(iobase+AR_MSCA_EN, 0) +#define ARC_SET_OFF(hc) ar_outb(hc, AR_MSCA_EN, 0) struct ar_hardc { int cunit; struct ar_softc *sc; - u_short iobase; int isa_irq; int numports; caddr_t mem_start; caddr_t mem_end; - caddr_t plx_mem; u_char *orbase; u_int memsize; /* in bytes */ @@ -224,4 +222,10 @@ int ar_deallocate_resources(device_t device); int ar_attach(device_t device); int ar_detach (device_t); +#define ar_inb(hc, port) \ + bus_space_read_1((hc)->bt, (hc)->bh, (port)) + +#define ar_outb(hc, port, value) \ + bus_space_write_1((hc)->bt, (hc)->bh, (port), (value)) + #endif /* _IF_ARREGS_H_ */ |