コード例 #1
0
ファイル: 8250_early.c プロジェクト: millken/zhuxianB30
int serial8250_find_port_for_earlycon(void)
{
	struct early_serial8250_device *device = &early_device;
	struct uart_port *port = &device->port;
	int line;
	int ret;

	if (!device->port.membase && !device->port.iobase)
		return -ENODEV;

	line = serial8250_find_port(port);
	if (line < 0)
		return -ENODEV;

	ret = update_console_cmdline("uart", 8250,
			     "ttyS", line, device->options);
	if (ret < 0)
		ret = update_console_cmdline("uart", 0,
				     "ttyS", line, device->options);

	return ret;
}
コード例 #2
0
ファイル: 8250_early.c プロジェクト: Abioy/kasan
int serial8250_find_port_for_earlycon(void)
{
	struct earlycon_device *device = early_device;
	struct uart_port *port = device ? &device->port : NULL;
	int line;
	int ret;

	if (!port || (!port->membase && !port->iobase))
		return -ENODEV;

	line = serial8250_find_port(port);
	if (line < 0)
		return -ENODEV;

	ret = update_console_cmdline("uart", 8250,
			     "ttyS", line, device->options);
	if (ret < 0)
		ret = update_console_cmdline("uart", 0,
				     "ttyS", line, device->options);

	return ret;
}