uart_dev_z8530.c (119815) | uart_dev_z8530.c (119866) |
---|---|
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 119815 2003-09-06 23:13:47Z marcel $"); | 28__FBSDID("$FreeBSD: head/sys/dev/uart/uart_dev_z8530.c 119866 2003-09-07 21:51:03Z 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 36#include <dev/uart/uart.h> 37#include <dev/uart/uart_cpu.h> 38#include <dev/uart/uart_bus.h> 39#include <dev/uart/uart_dev_z8530.h> 40 41#include "uart_if.h" 42 43#define DEFAULT_RCLK 307200 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 36#include <dev/uart/uart.h> 37#include <dev/uart/uart_cpu.h> 38#include <dev/uart/uart_bus.h> 39#include <dev/uart/uart_dev_z8530.h> 40 41#include "uart_if.h" 42 43#define DEFAULT_RCLK 307200 44 |
45#define IS_CHANNEL_A(bas) (((bas)->bsh & 7) != 0) 46#define IS_CHANNEL_B(bas) (((bas)->bsh & 7) == 0) | 45#define IS_CHANNEL_A(bas) ((uart_cpu_busaddr(bas) & 7) != 0) 46#define IS_CHANNEL_B(bas) ((uart_cpu_busaddr(bas) & 7) == 0) |
47 48/* Multiplexed I/O. */ 49static __inline void 50uart_setmreg(struct uart_bas *bas, int reg, int val) 51{ 52 53 uart_setreg(bas, REG_CTRL, reg); 54 uart_barrier(bas); --- 458 unchanged lines hidden --- | 47 48/* Multiplexed I/O. */ 49static __inline void 50uart_setmreg(struct uart_bas *bas, int reg, int val) 51{ 52 53 uart_setreg(bas, REG_CTRL, reg); 54 uart_barrier(bas); --- 458 unchanged lines hidden --- |