static Uart miniuart = {
.regs = (u32int*)AUXREGS,
- .name = "uart0",
+ .name = "uart1",
.freq = 250000000,
.baud = 115200,
.phys = &miniphysuart,
ap[MuCntl] = TxEn|RxEn;
baud(uart, uart->baud);
if(ie){
- intrenable(IRQaux, interrupt, uart, 0, "uart");
+ intrenable(IRQaux, interrupt, uart, 0, uart->name);
ap[MuIer] = RxIen|TxIen;
}else
ap[MuIer] = 0;
{
}
-void
+static void
putc(Uart*, int c)
{
u32int *ap;
;
}
-int
+static int
getc(Uart*)
{
u32int *ap;
return ap[MuIo] & 0xFF;
}
-void
-uartconsinit(void)
-{
- Uart *uart;
- int n;
- char *p, *cmd;
-
- if((p = getconf("console")) == nil)
- return;
- n = strtoul(p, &cmd, 0);
- if(p == cmd)
- return;
- switch(n){
- default:
- return;
- case 0:
- uart = &miniuart;
- break;
- }
-
- if(!uart->enabled)
- (*uart->phys->enable)(uart, 0);
- uartctl(uart, "l8 pn s1");
- if(*cmd != '\0')
- uartctl(uart, cmd);
-
- consuart = uart;
- uart->console = 1;
-}
-
PhysUart miniphysuart = {
- .name = "miniuart",
+ .name = "mini",
.pnp = pnp,
.enable = enable,
.disable = disable,