]> rtime.felk.cvut.cz Git - l4.git/blobdiff - kernel/fiasco/src/drivers/ppc32/uart-mpc52xx.cpp
update
[l4.git] / kernel / fiasco / src / drivers / ppc32 / uart-mpc52xx.cpp
index 9d9ea6f7e5629ee77fab4b945a4867a41ca84f8b..c0f25bd7e9e34a94874a130a47a65854b211071f 100644 (file)
@@ -1,22 +1,32 @@
 IMPLEMENTATION[uart_mpc52xx && libuart && debug]:
 
-#include "ppc32/uart_mpc52xx.h"
+#include "uart_mpc52xx.h"
 #include "pic.h"
+#include <boot_info.h>
 
+IMPLEMENT Address Uart::base() const { return Boot_info::uart_base(); }
+
+IMPLEMENT int Uart::irq() const
+{ return Pic::get_irq_num((char*)"serial", (char*)"serial"); }
 
 IMPLEMENT L4::Uart *Uart::uart()
 {
-  static int irq = Pic::get_irq_num((char*)"serial", (char*)"serial");
-  static L4::Uart_mpc52xx uart(irq, irq);
+  static L4::Uart_mpc52xx uart;
   return &uart;
 }
 
 IMPLEMENTATION[uart_mpc52xx && libuart && !debug]:
 
-#include "ppc32/uart_mpc52xx.h"
+#include "uart_mpc52xx.h"
+#include <boot_info.h>
+
+IMPLEMENT Address Uart::base() const { return Boot_info::uart_base(); }
+
+IMPLEMENT int Uart::irq() const
+{ return -1; }
 
 IMPLEMENT L4::Uart *Uart::uart()
 {
-  static L4::Uart_mpc52xx uart(-1, -1);
+  static L4::Uart_mpc52xx uart;
   return &uart;
 }