1 /* $OpenBSD: arcofivar.h,v 1.3 2016/09/19 06:46:44 ratchov Exp $ */ 2 3 /* 4 * Copyright (c) 2011 Miodrag Vallat. 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 #define ARCOFI_NREGS 6 20 21 struct arcofi_softc { 22 struct device sc_dev; 23 bus_addr_t sc_reg[ARCOFI_NREGS]; 24 bus_space_tag_t sc_iot; 25 bus_space_handle_t sc_ioh; 26 27 void *sc_sih; 28 29 int sc_open; 30 int sc_mode; 31 32 struct { 33 uint8_t cr3, cr4; 34 uint gr_idx, gx_idx; 35 int output_mute; 36 } sc_active, 37 sc_shadow; 38 39 struct { 40 uint8_t *buf; 41 uint8_t *past; 42 void (*cb)(void *); 43 void *cbarg; 44 } sc_recv, 45 sc_xmit; 46 }; 47 48 void arcofi_attach(struct arcofi_softc *, const char *); 49 int arcofi_hwintr(void *); 50 void arcofi_swintr(void *); 51