uart_dev_z8530.c (168281) | uart_dev_z8530.c (248965) |
---|---|
1/*- 2 * Copyright (c) 2003 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) 2003 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/uart/uart_dev_z8530.c 168281 2007-04-02 22:00:22Z marcel $"); | 28__FBSDID("$FreeBSD: head/sys/dev/uart/uart_dev_z8530.c 248965 2013-04-01 00:44:20Z ian $"); |
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 36#include <dev/uart/uart.h> --- 290 unchanged lines hidden (view full) --- 327 z8530_param(bas, di->baudrate, di->databits, di->stopbits, 328 di->parity, &z8530->tpc); 329 } else { 330 z8530->tpc = z8530_setup(bas, 9600, 8, 1, UART_PARITY_NONE); 331 z8530->tpc &= ~(TPC_DTR|TPC_RTS); 332 } 333 z8530->txidle = 1; /* Report SER_INT_TXIDLE. */ 334 | 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 36#include <dev/uart/uart.h> --- 290 unchanged lines hidden (view full) --- 327 z8530_param(bas, di->baudrate, di->databits, di->stopbits, 328 di->parity, &z8530->tpc); 329 } else { 330 z8530->tpc = z8530_setup(bas, 9600, 8, 1, UART_PARITY_NONE); 331 z8530->tpc &= ~(TPC_DTR|TPC_RTS); 332 } 333 z8530->txidle = 1; /* Report SER_INT_TXIDLE. */ 334 |
335 sc->sc_rxfifosz = 3; 336 sc->sc_txfifosz = 1; 337 | |
338 (void)z8530_bus_getsig(sc); 339 340 uart_setmreg(bas, WR_IC, IC_BRK | IC_CTS | IC_DCD); 341 uart_barrier(bas); 342 uart_setmreg(bas, WR_IDT, IDT_XIE | IDT_TIE | IDT_RIA); 343 uart_barrier(bas); 344 uart_setmreg(bas, WR_IV, 0); 345 uart_barrier(bas); --- 164 unchanged lines hidden (view full) --- 510 char buf[80]; 511 int error; 512 char ch; 513 514 error = z8530_probe(&sc->sc_bas); 515 if (error) 516 return (error); 517 | 335 (void)z8530_bus_getsig(sc); 336 337 uart_setmreg(bas, WR_IC, IC_BRK | IC_CTS | IC_DCD); 338 uart_barrier(bas); 339 uart_setmreg(bas, WR_IDT, IDT_XIE | IDT_TIE | IDT_RIA); 340 uart_barrier(bas); 341 uart_setmreg(bas, WR_IV, 0); 342 uart_barrier(bas); --- 164 unchanged lines hidden (view full) --- 507 char buf[80]; 508 int error; 509 char ch; 510 511 error = z8530_probe(&sc->sc_bas); 512 if (error) 513 return (error); 514 |
515 sc->sc_rxfifosz = 3; 516 sc->sc_txfifosz = 1; 517 |
|
518 ch = sc->sc_bas.chan - 1 + 'A'; 519 520 snprintf(buf, sizeof(buf), "z8530, channel %c", ch); 521 device_set_desc_copy(sc->sc_dev, buf); 522 return (0); 523} 524 525static int --- 98 unchanged lines hidden --- | 518 ch = sc->sc_bas.chan - 1 + 'A'; 519 520 snprintf(buf, sizeof(buf), "z8530, channel %c", ch); 521 device_set_desc_copy(sc->sc_dev, buf); 522 return (0); 523} 524 525static int --- 98 unchanged lines hidden --- |