Ejemplo n.º 1
0
void
serial_setbrg(void)
{
#ifdef CONFIG_ALLWINNER
	_serial_setbrg(gd->uart_console+1);
#else
	_serial_setbrg(CONFIG_CONS_INDEX);
#endif
}
#endif

#if defined(CONFIG_SERIAL_MULTI)

DECLARE_ESERIAL_FUNCTIONS(1);
struct serial_device eserial1_device =
	INIT_ESERIAL_STRUCTURE(1, "eserial0");
DECLARE_ESERIAL_FUNCTIONS(2);
struct serial_device eserial2_device =
	INIT_ESERIAL_STRUCTURE(2, "eserial1");
DECLARE_ESERIAL_FUNCTIONS(3);
struct serial_device eserial3_device =
	INIT_ESERIAL_STRUCTURE(3, "eserial2");
DECLARE_ESERIAL_FUNCTIONS(4);
struct serial_device eserial4_device =
	INIT_ESERIAL_STRUCTURE(4, "eserial3");

__weak struct serial_device *default_serial_console(void)
{
#ifdef CONFIG_ALLWINNER
	switch (gd->uart_console) {
	case 0:
Ejemplo n.º 2
0
#if defined(CONFIG_SERIAL_MULTI)
static inline void
serial_setbrg_dev(unsigned int dev_index)
{
    _serial_setbrg(dev_index);
}
#else
void
serial_setbrg(void)
{
    _serial_setbrg(CONFIG_CONS_INDEX);
}
#endif

#if defined(CONFIG_SERIAL_MULTI)

DECLARE_ESERIAL_FUNCTIONS(1);
struct serial_device eserial1_device =
    INIT_ESERIAL_STRUCTURE(1,"eserial0","EUART1");
DECLARE_ESERIAL_FUNCTIONS(2);
struct serial_device eserial2_device =
    INIT_ESERIAL_STRUCTURE(2,"eserial1","EUART2");
DECLARE_ESERIAL_FUNCTIONS(3);
struct serial_device eserial3_device =
    INIT_ESERIAL_STRUCTURE(3,"eserial2","EUART3");
DECLARE_ESERIAL_FUNCTIONS(4);
struct serial_device eserial4_device =
    INIT_ESERIAL_STRUCTURE(4,"eserial3","EUART4");
#endif /* CONFIG_SERIAL_MULTI */