Exemplo n.º 1
0
int serial_init (void)
{
	int clock_divisor;

#ifdef CFG_NS87308
	initialise_ns87308();
#endif

#ifdef CFG_NS16550_COM1
	clock_divisor = calc_divisor(serial_ports[0]);
	NS16550_init(serial_ports[0], clock_divisor);
#endif
#ifdef CFG_NS16550_COM2
	clock_divisor = calc_divisor(serial_ports[1]);
	NS16550_init(serial_ports[1], clock_divisor);
#endif
#ifdef CFG_NS16550_COM3
	clock_divisor = calc_divisor(serial_ports[2]);
	NS16550_init(serial_ports[2], clock_divisor);
#endif
#ifdef CFG_NS16550_COM4
	clock_divisor = calc_divisor(serial_ports[3]);
	NS16550_init(serial_ports[3], clock_divisor);
#endif
	return (0);
}
Exemplo n.º 2
0
int serial_init (void)
{
	int clock_divisor = calc_divisor();

#ifdef CFG_NS87308
	initialise_ns87308();
#endif

	NS16550_init(console, clock_divisor);

	return (0);
}
Exemplo n.º 3
0
int serial_init (void)
{
	int clock_divisor = calc_divisor();

#ifdef CFG_NS87308
	initialise_ns87308();
#endif

	NS16550_init(console, clock_divisor);

	printf("**** Woo hoo! Serial NS16550 is initialized\n");

	return (0);
}
int serial_init (void)
{
	int clock_divisor = calc_divisor();

#ifdef CFG_NS87308
	initialise_ns87308();
#endif

	NS16550_init(console, clock_divisor);

#if (CONFIG_CONS_INDEX == 1)
	if (omap_revision() == OMAP4470_ES1_0)
		set_uart1_gpios();
#endif
	
	return (0);
}
Exemplo n.º 5
0
int serial_init (void)
{
	int clock_divisor;
	int uart_console;

#ifdef CONFIG_NS87308
	initialise_ns87308();
#endif

#if 0
#ifdef CONFIG_SYS_NS16550_COM1
	clock_divisor = calc_divisor(serial_ports[0]);
	NS16550_init(serial_ports[0], clock_divisor);
#endif
#ifdef CONFIG_SYS_NS16550_COM2
	clock_divisor = calc_divisor(serial_ports[1]);
	NS16550_init(serial_ports[1], clock_divisor);
#endif
#ifdef CONFIG_SYS_NS16550_COM3
	clock_divisor = calc_divisor(serial_ports[2]);
	NS16550_init(serial_ports[2], clock_divisor);
#endif
#ifdef CONFIG_SYS_NS16550_COM4
	clock_divisor = calc_divisor(serial_ports[3]);
	NS16550_init(serial_ports[3], clock_divisor);
#endif
#else
	uart_console = uboot_spare_head.boot_data.uart_port;
	if((uart_console < 0) || (uart_console > 4))
	{
		uart_console = 0;
	}
	gpio_request((void *)uboot_spare_head.boot_data.uart_gpio, 2);
	clock_divisor = calc_divisor(serial_ports[uart_console]);
	NS16550_init(serial_ports[uart_console], clock_divisor);

	gd->uart_console = uart_console;
#endif

	return (0);
}
Exemplo n.º 6
0
int serial_init (void)
{
	int clock_divisor;

#ifdef CONFIG_NS87308
	initialise_ns87308();
#endif

#if 0
#ifdef CONFIG_SYS_NS16550_COM1
	clock_divisor = calc_divisor(serial_ports[0]);
	NS16550_init(serial_ports[0], clock_divisor);
#endif
#ifdef CONFIG_SYS_NS16550_COM2
	clock_divisor = calc_divisor(serial_ports[1]);
	NS16550_init(serial_ports[1], clock_divisor);
#endif
#ifdef CONFIG_SYS_NS16550_COM3
	clock_divisor = calc_divisor(serial_ports[2]);
	NS16550_init(serial_ports[2], clock_divisor);
#endif
#ifdef CONFIG_SYS_NS16550_COM4
	clock_divisor = calc_divisor(serial_ports[3]);
	NS16550_init(serial_ports[3], clock_divisor);
#endif
#else
	if(script_parser_fetch("uart_para", "uart_debug_port", &uart_console, sizeof(int)))
		uart_console = 0;
	if((uart_console < 0) || (uart_console > 4)){
		uart_console = 0;
	}
	clock_divisor = calc_divisor(serial_ports[uart_console]);
	NS16550_init(serial_ports[uart_console], clock_divisor);
#endif

	return (0);
}