]> rtime.felk.cvut.cz Git - l4.git/blobdiff - kernel/fiasco/src/kern/arm/bsp/imx/uart-imx.cpp
update
[l4.git] / kernel / fiasco / src / kern / arm / bsp / imx / uart-imx.cpp
index eafffbc2f78c2e63b9bbb906ea1539d988cda0ea..2f55d22aea3d2b76f09f0d3aa872ea30197885d6 100644 (file)
@@ -1,19 +1,44 @@
 IMPLEMENTATION [imx21]:
 
-#include "arm/uart_imx.h"
+#include "uart_imx.h"
+
+IMPLEMENT int Uart::irq() const { return 20; }
 
 IMPLEMENT L4::Uart *Uart::uart()
 {
-  static L4::Uart_imx21 uart(20, 20);
+  static L4::Uart_imx21 uart;
+  return &uart;
+}
+
+IMPLEMENTATION [imx35]:
+
+#include "uart_imx.h"
+
+// uart-1: 45
+// uart-2: 32
+// uart-3: 18
+IMPLEMENT int Uart::irq() const { return 45; }
+
+IMPLEMENT L4::Uart *Uart::uart()
+{
+  static L4::Uart_imx35 uart;
   return &uart;
 }
 
 IMPLEMENTATION [imx51]:
 
-#include "arm/uart_imx.h"
+#include "uart_imx.h"
+
+IMPLEMENT int Uart::irq() const { return 31; }
 
 IMPLEMENT L4::Uart *Uart::uart()
 {
-  static L4::Uart_imx51 uart(31, 31);
+  static L4::Uart_imx51 uart;
   return &uart;
 }
+
+IMPLEMENTATION [imx21 || imx35 || imx51]:
+
+#include "mem_layout.h"
+
+IMPLEMENT Address Uart::base() const { return Mem_layout::Uart_base; }