1193323Sed/* $NetBSD: sscom_var.h,v 1.5 2003/08/04 12:28:49 bsh Exp $ */
2193323Sed
3193323Sed/*-
4193323Sed * Copyright (c) 2002, 2003 Fujitsu Component Limited
5193323Sed * Copyright (c) 2002, 2003 Genetec Corporation
6193323Sed * All rights reserved.
7193323Sed *
8193323Sed * Redistribution and use in source and binary forms, with or without
9193323Sed * modification, are permitted provided that the following conditions
10193323Sed * are met:
11193323Sed * 1. Redistributions of source code must retain the above copyright
12193323Sed *    notice, this list of conditions and the following disclaimer.
13193323Sed * 2. Redistributions in binary form must reproduce the above copyright
14193323Sed *    notice, this list of conditions and the following disclaimer in the
15193323Sed *    documentation and/or other materials provided with the distribution.
16193323Sed * 3. Neither the name of The Fujitsu Component Limited nor the name of
17193323Sed *    Genetec corporation may not be used to endorse or promote products
18193323Sed *    derived from this software without specific prior written permission.
19193323Sed *
20193323Sed * THIS SOFTWARE IS PROVIDED BY FUJITSU COMPONENT LIMITED AND GENETEC
21193323Sed * CORPORATION ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
22193323Sed * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23193323Sed * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24193323Sed * DISCLAIMED.  IN NO EVENT SHALL FUJITSU COMPONENT LIMITED OR GENETEC
25193323Sed * CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26212904Sdim * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27218893Sdim * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
28193323Sed * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29193323Sed * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30193323Sed * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
31193323Sed * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32226633Sdim * SUCH DAMAGE.
33193323Sed */
34193323Sed/* derived from sys/dev/ic/comvar.h */
35223017Sdim
36193323Sed/*-
37193323Sed * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
38193323Sed *
39193323Sed * Redistribution and use in source and binary forms, with or without
40193323Sed * modification, are permitted provided that the following conditions
41193323Sed * are met:
42193323Sed * 1. Redistributions of source code must retain the above copyright
43193323Sed *    notice, this list of conditions and the following disclaimer.
44193323Sed * 2. Redistributions in binary form must reproduce the above copyright
45193323Sed *    notice, this list of conditions and the following disclaimer in the
46193323Sed *    documentation and/or other materials provided with the distribution.
47193323Sed * 3. All advertising materials mentioning features or use of this software
48193323Sed *    must display the following acknowledgement:
49193323Sed *      This product includes software developed by Christopher G. Demetriou
50193323Sed *	for the NetBSD Project.
51193323Sed * 4. The name of the author may not be used to endorse or promote products
52193323Sed *    derived from this software without specific prior written permission
53193323Sed *
54193323Sed * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
55193323Sed * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
56193323Sed * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
57193323Sed * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
58193323Sed * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
59193323Sed * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
60193323Sed * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
61193323Sed * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
62193323Sed * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
63193323Sed * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
64193323Sed *
65193323Sed * $FreeBSD$
66193323Sed */
67193323Sed
68193323Sed#ifndef _ARM_S3C2XX0_SSCOM_VAR_H
69193323Sed#define _ARM_S3C2XX0_SSCOM_VAR_H
70193323Sed
71193323Sed
72193323Sed/* Hardware flag masks */
73193323Sed#define	SSCOM_HW_FLOW		0x02
74193323Sed#define	SSCOM_HW_DEV_OK		0x04
75193323Sed#define	SSCOM_HW_CONSOLE	0x08
76193323Sed#define	SSCOM_HW_KGDB		0x10
77193323Sed#define SSCOM_HW_TXINT		0x20
78193323Sed#define SSCOM_HW_RXINT		0x40
79193323Sed
80193323Sed/* Buffer size for character buffer */
81193323Sed#define	SSCOM_RING_SIZE	2048
82193323Sed
83193323Sed#define sscom_rxrdy(iot,ioh) \
84193323Sed	(bus_space_read_1((iot), (ioh), SSCOM_UTRSTAT) & UTRSTAT_RXREADY)
85193323Sed#define sscom_getc(iot,ioh) bus_space_read_1((iot), (ioh), SSCOM_URXH)
86193323Sed#define sscom_geterr(iot,ioh) bus_space_read_1((iot), (ioh), SSCOM_UERSTAT)
87193323Sed
88193323Sed#endif /* _ARM_S3C2XX0_SSCOM_VAR_H */
89193323Sed