xref: /freebsd/sys/dev/scc/scc_bus.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
16174e6edSMarcel Moolenaar /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3718cf2ccSPedro F. Giffuni  *
46174e6edSMarcel Moolenaar  * Copyright (c) 2004-2006 Marcel Moolenaar
56174e6edSMarcel Moolenaar  * All rights reserved.
66174e6edSMarcel Moolenaar  *
76174e6edSMarcel Moolenaar  * Redistribution and use in source and binary forms, with or without
86174e6edSMarcel Moolenaar  * modification, are permitted provided that the following conditions
96174e6edSMarcel Moolenaar  * are met:
106174e6edSMarcel Moolenaar  *
116174e6edSMarcel Moolenaar  * 1. Redistributions of source code must retain the above copyright
126174e6edSMarcel Moolenaar  *    notice, this list of conditions and the following disclaimer.
136174e6edSMarcel Moolenaar  * 2. Redistributions in binary form must reproduce the above copyright
146174e6edSMarcel Moolenaar  *    notice, this list of conditions and the following disclaimer in the
156174e6edSMarcel Moolenaar  *    documentation and/or other materials provided with the distribution.
166174e6edSMarcel Moolenaar  *
176174e6edSMarcel Moolenaar  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
186174e6edSMarcel Moolenaar  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
196174e6edSMarcel Moolenaar  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
206174e6edSMarcel Moolenaar  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
216174e6edSMarcel Moolenaar  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
226174e6edSMarcel Moolenaar  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
236174e6edSMarcel Moolenaar  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
246174e6edSMarcel Moolenaar  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
256174e6edSMarcel Moolenaar  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
266174e6edSMarcel Moolenaar  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
276174e6edSMarcel Moolenaar  */
286174e6edSMarcel Moolenaar 
296174e6edSMarcel Moolenaar #ifndef _DEV_SCC_BUS_H_
306174e6edSMarcel Moolenaar #define	_DEV_SCC_BUS_H_
316174e6edSMarcel Moolenaar 
326174e6edSMarcel Moolenaar #include <sys/serial.h>
336174e6edSMarcel Moolenaar #include <serdev_if.h>
346174e6edSMarcel Moolenaar 
356174e6edSMarcel Moolenaar #define	SCC_IVAR_CHANNEL	0
366174e6edSMarcel Moolenaar #define	SCC_IVAR_CLASS		1
376174e6edSMarcel Moolenaar #define	SCC_IVAR_CLOCK		2
386174e6edSMarcel Moolenaar #define	SCC_IVAR_MODE		3
396174e6edSMarcel Moolenaar #define	SCC_IVAR_REGSHFT	4
406174e6edSMarcel Moolenaar #define	SCC_IVAR_HWMTX		5
416174e6edSMarcel Moolenaar 
426174e6edSMarcel Moolenaar /* Hardware class -- the SCC type. */
43b63eeef4SMarius Strobl #define	SCC_CLASS_UNUSED	0
446174e6edSMarcel Moolenaar #define	SCC_CLASS_Z8530		1
45e1ef7811SRafal Jaworowski #define	SCC_CLASS_QUICC		2
466174e6edSMarcel Moolenaar 
476174e6edSMarcel Moolenaar /* The possible modes supported by the SCC. */
486174e6edSMarcel Moolenaar #define	SCC_MODE_ASYNC		0x01
496174e6edSMarcel Moolenaar #define	SCC_MODE_BISYNC		0x02
506174e6edSMarcel Moolenaar #define	SCC_MODE_HDLC		0x04
516174e6edSMarcel Moolenaar 
526174e6edSMarcel Moolenaar #endif /* _DEV_SCC_BUS_H_ */
53