summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/mpc8xx/include/console.h
blob: 0835545a46bad3389413ef59b2aba885c93fd080 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 *  $Id$
 */

#ifndef _M8xx_CONSOLE_H_
#define _M8xx_CONSOLE_H_

#include <rtems/libio.h>

void m8xx_uart_reserve_resources(rtems_configuration_table *configuration);
void m8xx_uart_initialize(void);
void m8xx_uart_interrupts_initialize(void);
void m8xx_uart_scc_initialize (int minor);
void m8xx_uart_smc_initialize (int minor);

/* Termios callbacks */
int m8xx_uart_pollRead(int minor);
int m8xx_uart_pollWrite(int minor, const char* buf, int len);
int m8xx_uart_write(int minor, const char *buf, int len);
int m8xx_uart_setAttributes(int, const struct termios* t);


#ifdef mpc860
#define NUM_PORTS 6                /* number of serial ports for mpc860 */
#else
#define NUM_PORTS 4                /* number of serial ports for mpc821 */
#endif

#define SMC1_MINOR    0
#define SMC2_MINOR    1
#define SCC1_MINOR    2
#define SCC2_MINOR    3
#define SCC3_MINOR    4
#define SCC4_MINOR    5


#endif