sifive.c (1136fa0c07de570dc17858745af8be169d1440ba) sifive.c (3f8bab174cb26aa5a8053c4457cc733881e3ad88)
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * SiFive UART driver
4 * Copyright (C) 2018 Paul Walmsley <paul@pwsan.com>
5 * Copyright (C) 2018-2019 SiFive
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 742 unchanged lines hidden (view full) ---

751}
752#endif /* CONFIG_CONSOLE_POLL */
753
754/*
755 * Early console support
756 */
757
758#ifdef CONFIG_SERIAL_EARLYCON
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * SiFive UART driver
4 * Copyright (C) 2018 Paul Walmsley <paul@pwsan.com>
5 * Copyright (C) 2018-2019 SiFive
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 742 unchanged lines hidden (view full) ---

751}
752#endif /* CONFIG_CONSOLE_POLL */
753
754/*
755 * Early console support
756 */
757
758#ifdef CONFIG_SERIAL_EARLYCON
759static void early_sifive_serial_putc(struct uart_port *port, int c)
759static void early_sifive_serial_putc(struct uart_port *port, unsigned char c)
760{
761 while (__ssp_early_readl(port, SIFIVE_SERIAL_TXDATA_OFFS) &
762 SIFIVE_SERIAL_TXDATA_FULL_MASK)
763 cpu_relax();
764
765 __ssp_early_writel(c, SIFIVE_SERIAL_TXDATA_OFFS, port);
766}
767

--- 27 unchanged lines hidden (view full) ---

795/*
796 * Linux console interface
797 */
798
799#ifdef CONFIG_SERIAL_SIFIVE_CONSOLE
800
801static struct sifive_serial_port *sifive_serial_console_ports[SIFIVE_SERIAL_MAX_PORTS];
802
760{
761 while (__ssp_early_readl(port, SIFIVE_SERIAL_TXDATA_OFFS) &
762 SIFIVE_SERIAL_TXDATA_FULL_MASK)
763 cpu_relax();
764
765 __ssp_early_writel(c, SIFIVE_SERIAL_TXDATA_OFFS, port);
766}
767

--- 27 unchanged lines hidden (view full) ---

795/*
796 * Linux console interface
797 */
798
799#ifdef CONFIG_SERIAL_SIFIVE_CONSOLE
800
801static struct sifive_serial_port *sifive_serial_console_ports[SIFIVE_SERIAL_MAX_PORTS];
802
803static void sifive_serial_console_putchar(struct uart_port *port, int ch)
803static void sifive_serial_console_putchar(struct uart_port *port, unsigned char ch)
804{
805 struct sifive_serial_port *ssp = port_to_sifive_serial_port(port);
806
807 __ssp_wait_for_xmitr(ssp);
808 __ssp_transmit_char(ssp, ch);
809}
810
811static void sifive_serial_console_write(struct console *co, const char *s,

--- 290 unchanged lines hidden ---
804{
805 struct sifive_serial_port *ssp = port_to_sifive_serial_port(port);
806
807 __ssp_wait_for_xmitr(ssp);
808 __ssp_transmit_char(ssp, ch);
809}
810
811static void sifive_serial_console_write(struct console *co, const char *s,

--- 290 unchanged lines hidden ---