]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/9/bcm/uartmini.c
merge
[plan9front.git] / sys / src / 9 / bcm / uartmini.c
index 480d454fba338e57425cccdd9975afe2113b3ab3..9236d2ae97b5dc9bd40e9d183691190d26adc881 100644 (file)
@@ -47,7 +47,7 @@ extern PhysUart miniphysuart;
 
 static Uart miniuart = {
        .regs   = (u32int*)AUXREGS,
-       .name   = "uart0",
+       .name   = "uart1",
        .freq   = 250000000,
        .baud   = 115200,
        .phys   = &miniphysuart,
@@ -100,7 +100,7 @@ enable(Uart *uart, int ie)
        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;
@@ -259,7 +259,7 @@ donothing(Uart*, int)
 {
 }
 
-void
+static void
 putc(Uart*, int c)
 {
        u32int *ap;
@@ -272,7 +272,7 @@ putc(Uart*, int c)
                ;
 }
 
-int
+static int
 getc(Uart*)
 {
        u32int *ap;
@@ -283,38 +283,8 @@ getc(Uart*)
        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,