Lines Matching defs:ahc

92 #define	SIM_IS_SCSIBUS_B(ahc, sim)	\
93 ((sim) == ahc->platform_data->sim_b)
94 #define SIM_CHANNEL(ahc, sim) \
95 (((sim) == ahc->platform_data->sim_b) ? 'B' : 'A')
96 #define SIM_SCSI_ID(ahc, sim) \
97 (((sim) == ahc->platform_data->sim_b) ? ahc->our_id_b : ahc->our_id)
98 #define SIM_PATH(ahc, sim) \
99 (((sim) == ahc->platform_data->sim_b) ? ahc->platform_data->path_b \
100 : ahc->platform_data->path)
101 #define BUILD_SCSIID(ahc, sim, target_id, our_id) \
103 | (SIM_IS_SCSIBUS_B(ahc, sim) ? TWIN_CHNLB : 0))
105 #define SCB_GET_SIM(ahc, scb) \
106 (SCB_GET_CHANNEL(ahc, scb) == 'A' ? (ahc)->platform_data->sim \
107 : (ahc)->platform_data->sim_b)
163 #define AIC_LIB_PREFIX ahc
168 #define ahc_inb(ahc, port) \
169 bus_space_read_1((ahc)->tag, (ahc)->bsh, port)
171 #define ahc_outb(ahc, port, value) \
172 bus_space_write_1((ahc)->tag, (ahc)->bsh, port, value)
174 #define ahc_outsb(ahc, port, valp, count) \
175 bus_space_write_multi_1((ahc)->tag, (ahc)->bsh, port, valp, count)
177 #define ahc_insb(ahc, port, valp, count) \
178 bus_space_read_multi_1((ahc)->tag, (ahc)->bsh, port, valp, count)
183 ahc_flush_device_writes(struct ahc_softc *ahc)
186 ahc_inb(ahc, INTSTAT);
196 ahc_lockinit(struct ahc_softc *ahc)
198 mtx_init(&ahc->platform_data->mtx, "ahc_lock", NULL, MTX_DEF);
202 ahc_lock(struct ahc_softc *ahc)
204 mtx_lock(&ahc->platform_data->mtx);
208 ahc_unlock(struct ahc_softc *ahc)
210 mtx_unlock(&ahc->platform_data->mtx);
214 int ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg);
215 void ahc_platform_free(struct ahc_softc *ahc);
216 int ahc_map_int(struct ahc_softc *ahc);
223 int ahc_pci_map_registers(struct ahc_softc *ahc);
228 int aic7770_map_registers(struct ahc_softc *ahc, u_int port);
232 aic7770_map_int(struct ahc_softc *ahc, int irq)
240 return ahc_map_int(ahc);
245 static __inline void ahc_platform_dump_card_state(struct ahc_softc *ahc);
248 ahc_print_path(struct ahc_softc *ahc, struct scb *scb)
254 ahc_platform_dump_card_state(struct ahc_softc *ahc)
266 static __inline void ahc_platform_flushwork(struct ahc_softc *ahc);
268 ahc_platform_flushwork(struct ahc_softc *ahc)
273 void ahc_done(struct ahc_softc *ahc, struct scb *scb);