Lines Matching +full:- +full:uart
1 // SPDX-License-Identifier: GPL-2.0
7 * by Kars de Jong <jongk@linux-m68k.org>, May 2004.
63 /* Offset to UART registers from base of DCA */
78 * Where we find the 8250-like APCI ports, and how far apart they are.
139 /* Enable board-interrupts */ in hp300_setup_serial_console()
160 struct uart_8250_port uart; in hpdca_init_one() local
164 if (hp300_uart_scode == d->scode) { in hpdca_init_one()
169 memset(&uart, 0, sizeof(uart)); in hpdca_init_one()
172 uart.port.iotype = UPIO_MEM; in hpdca_init_one()
173 uart.port.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF; in hpdca_init_one()
174 uart.port.irq = d->ipl; in hpdca_init_one()
175 uart.port.uartclk = HPDCA_BAUD_BASE * 16; in hpdca_init_one()
176 uart.port.mapbase = (d->resource.start + UART_OFFSET); in hpdca_init_one()
177 uart.port.membase = (char *)(uart.port.mapbase + DIO_VIRADDRBASE); in hpdca_init_one()
178 uart.port.regshift = 1; in hpdca_init_one()
179 uart.port.dev = &d->dev; in hpdca_init_one()
180 line = serial8250_register_8250_port(&uart); in hpdca_init_one()
183 dev_notice(&d->dev, in hpdca_init_one()
185 d->scode, uart.port.irq); in hpdca_init_one()
186 return -ENOMEM; in hpdca_init_one()
189 /* Enable board-interrupts */ in hpdca_init_one()
190 out_8(d->resource.start + DIO_VIRADDRBASE + DCA_IC, DCA_IC_IE); in hpdca_init_one()
194 out_8(d->resource.start + DIO_VIRADDRBASE + DCA_ID, 0xff); in hpdca_init_one()
209 struct uart_8250_port uart; in hp300_8250_init() local
214 return -ENODEV; in hp300_8250_init()
218 return -ENODEV; in hp300_8250_init()
226 return -ENODEV; in hp300_8250_init()
245 return -ENOMEM; in hp300_8250_init()
247 memset(&uart, 0, sizeof(uart)); in hp300_8250_init()
252 uart.port.iotype = UPIO_MEM; in hp300_8250_init()
253 uart.port.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ in hp300_8250_init()
255 /* XXX - no interrupt support yet */ in hp300_8250_init()
256 uart.port.irq = 0; in hp300_8250_init()
257 uart.port.uartclk = HPAPCI_BAUD_BASE * 16; in hp300_8250_init()
258 uart.port.mapbase = base; in hp300_8250_init()
259 uart.port.membase = (char *)(base + DIO_VIRADDRBASE); in hp300_8250_init()
260 uart.port.regshift = 2; in hp300_8250_init()
262 line = serial8250_register_8250_port(&uart); in hp300_8250_init()
265 dev_notice(uart.port.dev, in hp300_8250_init()
267 i, uart.port.irq); in hp300_8250_init()
272 port->line = line; in hp300_8250_init()
273 port->next = hp300_ports; in hp300_8250_init()
282 return -ENODEV; in hp300_8250_init()
293 if (d->resource.start) { in hpdca_remove_one()
294 /* Disable board-interrupts */ in hpdca_remove_one()
295 out_8(d->resource.start + DIO_VIRADDRBASE + DCA_IC, 0); in hpdca_remove_one()
307 serial8250_unregister_port(port->line); in hp300_8250_exit()
309 port = port->next; in hp300_8250_exit()
323 MODULE_AUTHOR("Kars de Jong <jongk@linux-m68k.org>");