Skip to contentSkip to conversation

Fix MMIO UARTs

PATCH New Alex Williamson 1 participant 1 message Dec 3, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix MMIO UARTs

Change set 982e6fce0e47 added an existence test for UARTs. Unfortunately, the existence test happens before MMIO UARTs are ioremapped, therefore it may not be probing where it thinks it's probing. Rather than moving more code around, I think it's probably safe to assume the arch code knows what it's doing if it passes in an MMIO UART.

--

xen/drivers/char/ns16550.c +8 -0
diff -r a00eb6595d3c xen/drivers/char/ns16550.c
@@ -303,6 +303,14 @@ static int check_existence(struct ns1655
     unsigned char status, scratch, scratch2, scratch3;
 
     /*
+     * We can't poke MMIO UARTs until they get I/O remapped later.
+     * Assume that if we're getting MMIO UARTs, the arch code knows
+     * what it's doing.
+     */
+    if (uart->io_base >= 0x10000)
+        return 1;
+
+    /*
      * Do a simple existence test first; if we fail this,
      * there's no point trying anything else.
      */