blob: 2b99e539c1491500be8cd103f59f2889253de8f8 [file] [log] [blame]
wdenk7ac16102004-08-01 22:48:16 +00001#ifndef __SERIAL_H__
2#define __SERIAL_H__
3
4#define NAMESIZE 16
5#define CTLRSIZE 8
6
7struct serial_device {
8 char name[NAMESIZE];
9 char ctlr[CTLRSIZE];
10
11 int (*init) (void);
12 void (*setbrg) (void);
13 int (*getc) (void);
14 int (*tstc) (void);
15 void (*putc) (const char c);
16 void (*puts) (const char *s);
17
18 struct serial_device *next;
19};
20
21extern struct serial_device serial_smc_device;
22extern struct serial_device serial_scc_device;
23extern struct serial_device * default_serial_console (void);
24
Stefan Roese153b3e22007-10-05 17:10:59 +020025#if defined(CONFIG_405GP) || defined(CONFIG_405CR) || defined(CONFIG_440) || \
26 defined(CONFIG_405EP) || defined(CONFIG_405EZ) || defined(CONFIG_405EX) || \
27 defined(CONFIG_MPC5xxx)
wdenk96c7a8c2005-01-09 22:28:56 +000028extern struct serial_device serial0_device;
29extern struct serial_device serial1_device;
Wolfgang Denk44df5612006-08-30 23:02:10 +020030#if defined(CFG_NS16550_SERIAL)
31extern struct serial_device eserial1_device;
32extern struct serial_device eserial2_device;
33extern struct serial_device eserial3_device;
34extern struct serial_device eserial4_device;
35#endif /* CFG_NS16550_SERIAL */
36
wdenk96c7a8c2005-01-09 22:28:56 +000037#endif
38
Harald Welteda412622007-12-19 14:24:40 +010039#if defined(CONFIG_S3C2410)
40extern struct serial_device s3c24xx_serial0_device;
41extern struct serial_device s3c24xx_serial1_device;
42extern struct serial_device s3c24xx_serial2_device;
43#endif
wdenk96c7a8c2005-01-09 22:28:56 +000044
stefano babic5ab4f032007-08-30 22:57:04 +020045extern struct serial_device serial_ffuart_device;
46extern struct serial_device serial_btuart_device;
47extern struct serial_device serial_stuart_device;
48
wdenk7ac16102004-08-01 22:48:16 +000049extern void serial_initialize(void);
50extern void serial_devices_init(void);
51extern int serial_assign(char * name);
52extern void serial_reinit_all(void);
53
54#endif