]> Git Repo - J-u-boot.git/blame - include/serial.h
mpc82xx: Remove BMW board port
[J-u-boot.git] / include / serial.h
CommitLineData
281e00a3
WD
1#ifndef __SERIAL_H__
2#define __SERIAL_H__
3
7b826c2f
MF
4#include <post.h>
5
281e00a3 6struct serial_device {
f6add132 7 /* enough bytes to match alignment of following func pointer */
78322d63 8 char name[16];
281e00a3 9
89143fb3
MV
10 int (*start)(void);
11 int (*stop)(void);
78322d63
MV
12 void (*setbrg)(void);
13 int (*getc)(void);
14 int (*tstc)(void);
15 void (*putc)(const char c);
16 void (*puts)(const char *s);
7b826c2f 17#if CONFIG_POST & CONFIG_SYS_POST_UART
78322d63 18 void (*loop)(int);
7b826c2f 19#endif
78322d63 20 struct serial_device *next;
281e00a3
WD
21};
22
23extern struct serial_device serial_smc_device;
24extern struct serial_device serial_scc_device;
a6e6f7f4
GF
25extern struct serial_device *default_serial_console(void);
26
27#if defined(CONFIG_405GP) || defined(CONFIG_405CR) || \
28 defined(CONFIG_405EP) || defined(CONFIG_405EZ) || \
29 defined(CONFIG_405EX) || defined(CONFIG_440) || \
30 defined(CONFIG_MB86R0x) || defined(CONFIG_MPC5xxx) || \
31 defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \
32 defined(CONFIG_MPC86xx) || defined(CONFIG_SYS_SC520) || \
7636ebe1
MS
33 defined(CONFIG_TEGRA20) || defined(CONFIG_SYS_COREBOOT) || \
34 defined(CONFIG_MICROBLAZE)
ff36fd85
WD
35extern struct serial_device serial0_device;
36extern struct serial_device serial1_device;
abc0ed8d
MV
37#endif
38
0fd30252
WD
39extern struct serial_device eserial1_device;
40extern struct serial_device eserial2_device;
ff36fd85 41
635f330f 42extern void serial_register(struct serial_device *);
281e00a3 43extern void serial_initialize(void);
52cb4d4f 44extern void serial_stdio_init(void);
7813ca9b 45extern int serial_assign(const char *name);
281e00a3
WD
46extern void serial_reinit_all(void);
47
6299487e 48/* For usbtty */
2ec1abea
TR
49#ifdef CONFIG_USB_TTY
50
6299487e
TR
51extern int usbtty_getc(void);
52extern void usbtty_putc(const char c);
53extern void usbtty_puts(const char *str);
54extern int usbtty_tstc(void);
55
2ec1abea
TR
56#else
57
58/* stubs */
59#define usbtty_getc() 0
60#define usbtty_putc(a)
61#define usbtty_puts(a)
62#define usbtty_tstc() 0
63
64#endif /* CONFIG_USB_TTY */
65
036036d7 66#if defined(CONFIG_MPC512X)
8e234e33
AG
67extern struct stdio_dev *open_port(int num, int baudrate);
68extern int close_port(int num);
69extern int write_port(struct stdio_dev *port, char *buf);
70extern int read_port(struct stdio_dev *port, char *buf, int size);
71#endif
72
281e00a3 73#endif
This page took 0.29073 seconds and 4 git commands to generate.