scc_dev_z8530.c (157299) | scc_dev_z8530.c (157351) |
---|---|
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 157299 2006-03-30 18:33:22Z marcel $"); | 28__FBSDID("$FreeBSD: head/sys/dev/scc/scc_dev_z8530.c 157351 2006-04-01 04:51:56Z marcel $"); |
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> 37 38#include <dev/scc/scc_bfe.h> 39#include <dev/scc/scc_bus.h> 40 41#include <dev/ic/z8530.h> 42 43#include "scc_if.h" 44 | 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> 37 38#include <dev/scc/scc_bfe.h> 39#include <dev/scc/scc_bus.h> 40 41#include <dev/ic/z8530.h> 42 43#include "scc_if.h" 44 |
45#define DEFAULT_RCLK 307200 46 | |
47static int z8530_bfe_attach(struct scc_softc *, int); 48static int z8530_bfe_iclear(struct scc_softc *, struct scc_chan *); 49static int z8530_bfe_ipend(struct scc_softc *); 50static int z8530_bfe_probe(struct scc_softc *); 51 52static kobj_method_t z8530_methods[] = { 53 KOBJMETHOD(scc_attach, z8530_bfe_attach), 54 KOBJMETHOD(scc_iclear, z8530_bfe_iclear), --- 5 unchanged lines hidden (view full) --- 60struct scc_class scc_z8530_class = { 61 "z8530 class", 62 z8530_methods, 63 sizeof(struct scc_softc), 64 .cl_channels = 2, 65 .cl_class = SCC_CLASS_Z8530, 66 .cl_modes = SCC_MODE_ASYNC | SCC_MODE_BISYNC | SCC_MODE_HDLC, 67 .cl_range = (CHAN_B - CHAN_A) << 1, | 45static int z8530_bfe_attach(struct scc_softc *, int); 46static int z8530_bfe_iclear(struct scc_softc *, struct scc_chan *); 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), --- 5 unchanged lines hidden (view full) --- 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, 64 .cl_modes = SCC_MODE_ASYNC | SCC_MODE_BISYNC | SCC_MODE_HDLC, 65 .cl_range = (CHAN_B - CHAN_A) << 1, |
68 .cl_rclk = DEFAULT_RCLK, 69 .cl_regshft = 1, | |
70}; 71 72/* Multiplexed I/O. */ 73static __inline void 74scc_setmreg(struct scc_bas *bas, int ch, int reg, int val) 75{ 76 77 scc_setreg(bas, ch + REG_CTRL, reg); --- 125 unchanged lines hidden --- | 66}; 67 68/* Multiplexed I/O. */ 69static __inline void 70scc_setmreg(struct scc_bas *bas, int ch, int reg, int val) 71{ 72 73 scc_setreg(bas, ch + REG_CTRL, reg); --- 125 unchanged lines hidden --- |