scc_dev_z8530.c (160689) | scc_dev_z8530.c (253899) |
---|---|
1/*- 2 * Copyright (c) 2004-2006 Marcel Moolenaar 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004-2006 Marcel Moolenaar 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/scc/scc_dev_z8530.c 160689 2006-07-26 03:10:01Z marcel $"); | 28__FBSDID("$FreeBSD: head/sys/dev/scc/scc_dev_z8530.c 253899 2013-08-02 23:28:49Z marius $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/conf.h> 34#include <machine/bus.h> 35#include <sys/rman.h> 36#include <sys/serial.h> --- 10 unchanged lines hidden (view full) --- 47static int z8530_bfe_ipend(struct scc_softc *); 48static int z8530_bfe_probe(struct scc_softc *); 49 50static kobj_method_t z8530_methods[] = { 51 KOBJMETHOD(scc_attach, z8530_bfe_attach), 52 KOBJMETHOD(scc_iclear, z8530_bfe_iclear), 53 KOBJMETHOD(scc_ipend, z8530_bfe_ipend), 54 KOBJMETHOD(scc_probe, z8530_bfe_probe), | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/conf.h> 34#include <machine/bus.h> 35#include <sys/rman.h> 36#include <sys/serial.h> --- 10 unchanged lines hidden (view full) --- 47static int z8530_bfe_ipend(struct scc_softc *); 48static int z8530_bfe_probe(struct scc_softc *); 49 50static kobj_method_t z8530_methods[] = { 51 KOBJMETHOD(scc_attach, z8530_bfe_attach), 52 KOBJMETHOD(scc_iclear, z8530_bfe_iclear), 53 KOBJMETHOD(scc_ipend, z8530_bfe_ipend), 54 KOBJMETHOD(scc_probe, z8530_bfe_probe), |
55 { 0, 0 } | 55 KOBJMETHOD_END |
56}; 57 58struct scc_class scc_z8530_class = { 59 "z8530 class", 60 z8530_methods, 61 sizeof(struct scc_softc), 62 .cl_channels = 2, 63 .cl_class = SCC_CLASS_Z8530, --- 16 unchanged lines hidden (view full) --- 80{ 81 82 scc_setreg(bas, ch + REG_CTRL, reg); 83 scc_barrier(bas); 84 return (scc_getreg(bas, ch + REG_CTRL)); 85} 86 87static int | 56}; 57 58struct scc_class scc_z8530_class = { 59 "z8530 class", 60 z8530_methods, 61 sizeof(struct scc_softc), 62 .cl_channels = 2, 63 .cl_class = SCC_CLASS_Z8530, --- 16 unchanged lines hidden (view full) --- 80{ 81 82 scc_setreg(bas, ch + REG_CTRL, reg); 83 scc_barrier(bas); 84 return (scc_getreg(bas, ch + REG_CTRL)); 85} 86 87static int |
88z8530_bfe_attach(struct scc_softc *sc, int reset) | 88z8530_bfe_attach(struct scc_softc *sc __unused, int reset __unused) |
89{ | 89{ |
90 struct scc_bas *bas; | |
91 | 90 |
92 bas = &sc->sc_bas; | |
93 return (0); 94} 95 96static int 97z8530_bfe_iclear(struct scc_softc *sc, struct scc_chan *ch) 98{ 99 struct scc_bas *bas; 100 int c; --- 83 unchanged lines hidden (view full) --- 184 ch[1]->ch_ipend |= SER_INT_OVERRUN; 185 } 186 mtx_unlock_spin(&sc->sc_hwmtx); 187 188 return (ch[0]->ch_ipend | ch[1]->ch_ipend); 189} 190 191static int | 91 return (0); 92} 93 94static int 95z8530_bfe_iclear(struct scc_softc *sc, struct scc_chan *ch) 96{ 97 struct scc_bas *bas; 98 int c; --- 83 unchanged lines hidden (view full) --- 182 ch[1]->ch_ipend |= SER_INT_OVERRUN; 183 } 184 mtx_unlock_spin(&sc->sc_hwmtx); 185 186 return (ch[0]->ch_ipend | ch[1]->ch_ipend); 187} 188 189static int |
192z8530_bfe_probe(struct scc_softc *sc) | 190z8530_bfe_probe(struct scc_softc *sc __unused) |
193{ | 191{ |
194 struct scc_bas *bas; | |
195 | 192 |
196 bas = &sc->sc_bas; | |
197 return (0); 198} | 193 return (0); 194} |