Lines Matching refs:port

14  * we locate the device directly by its MMIO or I/O port address.
36 static unsigned int serial8250_early_in(struct uart_port *port, int offset)
38 offset <<= port->regshift;
40 switch (port->iotype) {
42 return readb(port->membase + offset);
44 return readw(port->membase + offset);
46 return readl(port->membase + offset);
48 return ioread32be(port->membase + offset);
50 return inb(port->iobase + offset);
56 static void serial8250_early_out(struct uart_port *port, int offset, int value)
58 offset <<= port->regshift;
60 switch (port->iotype) {
62 writeb(value, port->membase + offset);
65 writew(value, port->membase + offset);
68 writel(value, port->membase + offset);
71 iowrite32be(value, port->membase + offset);
74 outb(value, port->iobase + offset);
79 static void serial_putc(struct uart_port *port, unsigned char c)
83 serial8250_early_out(port, UART_TX, c);
86 status = serial8250_early_in(port, UART_LSR);
97 struct uart_port *port = &device->port;
99 uart_console_write(port, s, count, serial_putc);
107 struct uart_port *port = &device->port;
112 status = serial8250_early_in(port, UART_LSR);
115 s[num_read++] = serial8250_early_in(port, UART_RX);
126 struct uart_port *port = &device->port;
131 serial8250_early_out(port, UART_LCR, UART_LCR_WLEN8); /* 8n1 */
132 ier = serial8250_early_in(port, UART_IER);
133 serial8250_early_out(port, UART_IER, ier & UART_IER_UUE); /* no interrupt */
134 serial8250_early_out(port, UART_FCR, 0); /* no fifo */
135 serial8250_early_out(port, UART_MCR, UART_MCR_DTR | UART_MCR_RTS);
137 if (port->uartclk) {
138 divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * device->baud);
139 c = serial8250_early_in(port, UART_LCR);
140 serial8250_early_out(port, UART_LCR, c | UART_LCR_DLAB);
141 serial8250_early_out(port, UART_DLL, divisor & 0xff);
142 serial8250_early_out(port, UART_DLM, (divisor >> 8) & 0xff);
143 serial8250_early_out(port, UART_LCR, c & ~UART_LCR_DLAB);
150 if (!(device->port.membase || device->port.iobase))
154 struct uart_port *port = &device->port;
158 ier = serial8250_early_in(port, UART_IER);
159 serial8250_early_out(port, UART_IER, ier & UART_IER_UUE);
179 struct uart_port *port = &device->port;
181 if (!(device->port.membase || device->port.iobase))
184 port->regshift = 2;