Show another permutation which also doesn't work correctly >_<
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 31 Dec 2016 19:24:02 +0000 (11:24 -0800)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 31 Dec 2016 19:24:02 +0000 (11:24 -0800)
romstage.c

index e484dd3..ab2fa67 100644 (file)
@@ -48,24 +48,26 @@ void uart_putc(unsigned int ch)
 }\r
 \r
 void uart_init(void) {\r
-        mmio_write32(UART_CR, 0);\r
-\r
        unsigned int ra = GP_FSEL1;\r
        ra &= ~(7 << 12);\r
        ra |= 4 << 12;\r
        GP_FSEL1 = ra;\r
 \r
-       GP_PUD = 0;\r
+        CM_UARTCTL = CM_PASSWORD | CM_SRC_OSC | CM_UARTCTL_FRAC_SET;\r
+        udelay(150);\r
+        CM_UARTDIV = CM_PASSWORD | 0x6666;\r
+        udelay(150);\r
+        CM_UARTCTL |= CM_UARTCTL_ENAB_SET;\r
+        udelay(150);\r
+        \r
+        mmio_write32(UART_CR, 0);\r
 \r
+        GP_PUD = 0;\r
        udelay(150);\r
        GP_PUDCLK0 = (1 << 14) | (1 << 15);\r
        udelay(150);\r
        GP_PUDCLK0 = 0;\r
 \r
-        CM_UARTDIV = CM_PASSWORD | 0x619A;\r
-        CM_UARTCTL = CM_PASSWORD | CM_SRC_OSC | CM_UARTCTL_FRAC_SET | CM_UARTCTL_ENAB_SET;\r
-        udelay(150);\r
-\r
         mmio_write32(UART_IBRD, 1);\r
         mmio_write32(UART_FBRD, 40);\r
         mmio_write32(UART_ICR, 0x7FF);\r
This page took 0.022775 seconds and 4 git commands to generate.