1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-02-13 19:34:22 +00:00

console: Cleanup console API

Use a more generic console_init() instead of potato_uart_init(),
and do the same for interrupt control. There should be no
change in behaviour.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Benjamin Herrenschmidt
2020-06-18 11:06:33 +10:00
parent 7575b1e0c2
commit e3941109af
16 changed files with 93 additions and 69 deletions

View File

@@ -1,8 +1,7 @@
#include <stddef.h>
void potato_uart_init(void);
void potato_uart_irq_en(void);
void potato_uart_irq_dis(void);
void console_init(void);
void console_set_irq_en(bool rx_irq, bool tx_irq);
int getchar(void);
int putchar(int c);
int puts(const char *str);

View File

@@ -69,6 +69,8 @@
#define POTATO_CONSOLE_STATUS_TX_FULL 0x08
#define POTATO_CONSOLE_CLOCK_DIV 0x18
#define POTATO_CONSOLE_IRQ_EN 0x20
#define POTATO_CONSOLE_IRQ_RX 0x01
#define POTATO_CONSOLE_IRQ_TX 0x02
/*
* Register definitionss for our standard (16550 style) UART