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_sab82532.c 120378 2003-09-23 09:25:38Z nyan $"); |
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_sab82532.h> 40 41#include "uart_if.h" 42 43#define DEFAULT_RCLK 29491200 44 |
45#define IS_CHANNEL_A(bas) (((bas)->iobase & 0x40) == 0x00) 46#define IS_CHANNEL_B(bas) (((bas)->iobase & 0x40) == 0x40) |
47 48/* 49 * NOTE: To allow us to read the baudrate divisor from the chip, we 50 * copy the value written to the write-only BGR register to an unused 51 * read-write register. We use TCR for that. 52 */ 53 54static int --- 636 unchanged lines hidden --- |