Deleted Added
full compact
uart_dev_sab82532.c (119815) uart_dev_sab82532.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_sab82532.c 119815 2003-09-06 23:13:47Z marcel $");
28__FBSDID("$FreeBSD: head/sys/dev/uart/uart_dev_sab82532.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_sab82532.h>
40
41#include "uart_if.h"
42
43#define DEFAULT_RCLK 29491200
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_sab82532.h>
40
41#include "uart_if.h"
42
43#define DEFAULT_RCLK 29491200
44
45#define IS_CHANNEL_A(bas) (((bas)->bsh & 0x40) == 0x00)
46#define IS_CHANNEL_B(bas) (((bas)->bsh & 0x40) == 0x40)
45#define IS_CHANNEL_A(bas) ((uart_cpu_busaddr(bas) & 0x40) == 0x00)
46#define IS_CHANNEL_B(bas) ((uart_cpu_busaddr(bas) & 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

--- 616 unchanged lines hidden ---
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

--- 616 unchanged lines hidden ---