Lines Matching +full:8 +full:- +full:port
1 // SPDX-License-Identifier: GPL-2.0
3 * Serial port routines for use during early boot reporting. This code is
26 static void early_serial_init(int port, int baud) in early_serial_init() argument
31 outb(0x3, port + LCR); /* 8n1 */ in early_serial_init()
32 outb(0, port + IER); /* no interrupt */ in early_serial_init()
33 outb(0, port + FCR); /* no fifo */ in early_serial_init()
34 outb(0x3, port + MCR); /* DTR + RTS */ in early_serial_init()
37 c = inb(port + LCR); in early_serial_init()
38 outb(c | DLAB, port + LCR); in early_serial_init()
39 outb(divisor & 0xff, port + DLL); in early_serial_init()
40 outb((divisor >> 8) & 0xff, port + DLH); in early_serial_init()
41 outb(c & ~DLAB, port + LCR); in early_serial_init()
43 early_serial_base = port; in early_serial_init()
51 int port = 0; in parse_earlyprintk() local
57 port = DEFAULT_SERIAL_PORT; in parse_earlyprintk()
71 port = simple_strtoull(arg + pos, &e, 16); in parse_earlyprintk()
72 if (port == 0 || arg + pos == e) in parse_earlyprintk()
73 port = DEFAULT_SERIAL_PORT; in parse_earlyprintk()
75 pos = e - arg; in parse_earlyprintk()
86 port = bases[idx]; in parse_earlyprintk()
97 if (port) in parse_earlyprintk()
98 early_serial_init(port, baud); in parse_earlyprintk()
102 static unsigned int probe_baud(int port) in probe_baud() argument
107 lcr = inb(port + LCR); in probe_baud()
108 outb(lcr | DLAB, port + LCR); in probe_baud()
109 dll = inb(port + DLL); in probe_baud()
110 dlh = inb(port + DLH); in probe_baud()
111 outb(lcr, port + LCR); in probe_baud()
112 quot = (dlh << 8) | dll; in probe_baud()
121 int port = 0; in parse_console_uart8250() local
133 port = simple_strtoull(options + 12, &options, 0); in parse_console_uart8250()
134 else if (!strncmp(options, "uart,io,", 8)) in parse_console_uart8250()
135 port = simple_strtoull(options + 8, &options, 0); in parse_console_uart8250()
142 baud = probe_baud(port); in parse_console_uart8250()
144 if (port) in parse_console_uart8250()
145 early_serial_init(port, baud); in parse_console_uart8250()