]> rtime.felk.cvut.cz Git - l4.git/blobdiff - kernel/fiasco/src/kern/arm/bsp/kirkwood/kernel_uart-arm-kirkwood.cpp
update
[l4.git] / kernel / fiasco / src / kern / arm / bsp / kirkwood / kernel_uart-arm-kirkwood.cpp
index a597ff8e7fdf6a41800ea2cb98150d749599453b..a5f65a0b99083ca361126c23ccdf183f6c71f9f2 100644 (file)
@@ -1,10 +1,15 @@
+INTERFACE:
+
+// On ARM the MMIO for the uart is accessible before the MMU is fully up
+EXTENSION class Kernel_uart { enum { Bsp_init_mode = Init_before_mmu }; };
+
 IMPLEMENTATION [arm && kirkwood && serial]:
 
 #include "mem_layout.h"
+#include "kmem.h"
 
 IMPLEMENT
 bool Kernel_uart::startup(unsigned port, int /*irq*/)
 {
-  if(port!=3) return false;
-  return Uart::startup(Mem_layout::Uart_base, 33);
+  return Uart::startup(Kmem::mmio_remap(Mem_layout::Uart_phys_base), 33);
 }