Print this page
bcm2835: use the real uart instead of the mini-uart
The real uart is more capable.  We'll want to use it for the real console
eventually anyway, so let's bite the bullet now when no one will really
notice.  (For comparison, the Linux kernel uses the real uart and totally
lacks a driver for the miniuart.)

*** 15,30 **** /* * bcm2835 boot console implementation */ ! #include "miniuart.h" /* * There are a few different potential boot consoles that we could have on the * bcm2835. There is both a mini uart and a full functioning uart. Generally, ! * people will use the mini uart, but we want to support both. As such we have a * single global ops vector that we set once during bcons_init and never again. */ #define BMC2835_CONSNAME_MAX 24 typedef struct bcm2835_consops { char bco_name[BMC2835_CONSNAME_MAX]; --- 15,30 ---- /* * bcm2835 boot console implementation */ ! #include "bcm2835_uart.h" /* * There are a few different potential boot consoles that we could have on the * bcm2835. There is both a mini uart and a full functioning uart. Generally, ! * people will use one of them, but we want to support both. As such we have a * single global ops vector that we set once during bcons_init and never again. */ #define BMC2835_CONSNAME_MAX 24 typedef struct bcm2835_consops { char bco_name[BMC2835_CONSNAME_MAX];
*** 34,52 **** } bcm2835_consops_t; static bcm2835_consops_t consops; /* ! * For now, we only support the mini uart. */ void bcons_init(char *bstr) { ! bcm2835_miniuart_init(); ! consops.bco_putc = bcm2835_miniuart_putc; ! consops.bco_getc = bcm2835_miniuart_getc; ! consops.bco_isc = bcm2835_miniuart_isc; } void bcons_putchar(int c) { --- 34,52 ---- } bcm2835_consops_t; static bcm2835_consops_t consops; /* ! * For now, we only support the real uart. */ void bcons_init(char *bstr) { ! bcm2835_uart_init(); ! consops.bco_putc = bcm2835_uart_putc; ! consops.bco_getc = bcm2835_uart_getc; ! consops.bco_isc = bcm2835_uart_isc; } void bcons_putchar(int c) {