imxuartvar.h revision 1.4 1 /* $NetBSD: imxuartvar.h,v 1.4 2010/11/27 13:37:27 bsh Exp $ */
2 /*
3 * driver include for Freescale i.MX31 and i.MX31L UARTs
4 */
5 /*
6 * Copyright (c) 2009, 2010 Genetec Corporation. All rights reserved.
7 * Written by Hiroyuki Bessho for Genetec Corporation.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 *
18 * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GENETEC CORPORATION
22 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 *
30 */
31 #ifndef _IMXUARTVAR_H
32 #define _IMXUARTVAR_H
33
34
35 #include <sys/cdefs.h>
36 #include <sys/termios.h> /* for tcflag_t */
37
38
39 void imxuart_attach_common(device_t parent, device_t self,
40 bus_space_tag_t, paddr_t, size_t, int, int);
41
42 int imxuart_kgdb_attach(bus_space_tag_t, paddr_t, u_int, tcflag_t);
43 int imxuart_cons_attach(bus_space_tag_t, paddr_t, u_int, tcflag_t);
44
45 int imxuart_is_console(bus_space_tag_t, bus_addr_t, bus_space_handle_t *);
46
47 /*
48 * Set platform dependent values
49 */
50 void imxuart_set_frequency(u_int, u_int);
51
52 /*
53 * defined in imx51uart.c and imx31uart.c
54 */
55 int imxuart_match(struct device *, struct cfdata *, void *);
56 void imxuart_attach(struct device *, struct device *, void *);
57
58 #endif /* _IMXUARTVAR_H */
59