• Home
  • Raw
  • Download

Lines Matching refs:uart

62 static void __maybe_unused s5p_serial_init(struct s5p_uart *uart)  in s5p_serial_init()  argument
65 writel(0x3, &uart->ufcon); in s5p_serial_init()
66 writel(0, &uart->umcon); in s5p_serial_init()
68 writel(0x3, &uart->ulcon); in s5p_serial_init()
70 writel(0x245, &uart->ucon); in s5p_serial_init()
73 static void __maybe_unused s5p_serial_baud(struct s5p_uart *uart, uint uclk, in s5p_serial_baud() argument
80 writel(val / 16 - 1, &uart->ubrdiv); in s5p_serial_baud()
83 writew(udivslot[val % 16], &uart->rest.slot); in s5p_serial_baud()
85 writeb(val % 16, &uart->rest.value); in s5p_serial_baud()
92 struct s5p_uart *const uart = plat->reg; in s5p_serial_setbrg() local
107 s5p_serial_baud(uart, uclk, baudrate); in s5p_serial_setbrg()
115 struct s5p_uart *const uart = plat->reg; in s5p_serial_probe() local
117 s5p_serial_init(uart); in s5p_serial_probe()
122 static int serial_err_check(const struct s5p_uart *const uart, int op) in serial_err_check() argument
138 return readl(&uart->uerstat) & mask; in serial_err_check()
144 struct s5p_uart *const uart = plat->reg; in s5p_serial_getc() local
146 if (!(readl(&uart->ufstat) & RX_FIFO_COUNT_MASK)) in s5p_serial_getc()
149 serial_err_check(uart, 0); in s5p_serial_getc()
150 return (int)(readb(&uart->urxh) & 0xff); in s5p_serial_getc()
156 struct s5p_uart *const uart = plat->reg; in s5p_serial_putc() local
158 if (readl(&uart->ufstat) & TX_FIFO_FULL) in s5p_serial_putc()
161 writeb(ch, &uart->utxh); in s5p_serial_putc()
162 serial_err_check(uart, 1); in s5p_serial_putc()
170 struct s5p_uart *const uart = plat->reg; in s5p_serial_pending() local
171 uint32_t ufstat = readl(&uart->ufstat); in s5p_serial_pending()
223 struct s5p_uart *uart = (struct s5p_uart *)CONFIG_DEBUG_UART_BASE; in _debug_uart_init() local
225 s5p_serial_init(uart); in _debug_uart_init()
226 s5p_serial_baud(uart, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE); in _debug_uart_init()
231 struct s5p_uart *uart = (struct s5p_uart *)CONFIG_DEBUG_UART_BASE; in _debug_uart_putc() local
233 while (readl(&uart->ufstat) & TX_FIFO_FULL); in _debug_uart_putc()
235 writeb(ch, &uart->utxh); in _debug_uart_putc()