blob: c8abb72e1fddf7b031905df4ec12f0e93ce202d3 [file] [log] [blame]
wdenk281e00a2004-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
wdenkff36fd82005-01-09 22:28:56 +000025#if defined(CONFIG_405GP) || defined(CONFIG_405CR) || defined(CONFIG_440) \
26 || defined(CONFIG_405EP)
27extern struct serial_device serial0_device;
28extern struct serial_device serial1_device;
29#endif
30
31
wdenk281e00a2004-08-01 22:48:16 +000032extern void serial_initialize(void);
33extern void serial_devices_init(void);
34extern int serial_assign(char * name);
35extern void serial_reinit_all(void);
36
37#endif