]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/bootstrap/server/src/platform/exynos.cc
update
[l4.git] / l4 / pkg / bootstrap / server / src / platform / exynos.cc
index 68f96163e4e73798a8487db282c29e8f16e5184e..28ba4ab328edc382757131ed20ee0d6191a6f981 100644 (file)
@@ -2,11 +2,11 @@
  * \file
  * \brief  Support for Exynos platforms
  *
- * \author Adam Lackorznynski <adam@os.inf.tu-dresden.de>
+ * \author Adam Lackorzynski <adam@os.inf.tu-dresden.de>
  *
  */
 /*
- * (c) 2011-2013 Author(s)
+ * (c) 2013 Author(s)
  *     economic rights: Technische Universität Dresden (Germany)
  *
  * This file is part of TUD:OS and distributed under the terms of the
@@ -28,14 +28,30 @@ public:
   void init()
   {
     static L4::Uart_s5pv210 _uart;
+    const unsigned long uart_offset = 0x10000;
+    unsigned long uart_base;
     unsigned uart_nr = 2;
-    unsigned long uart_base = 0x12c00000;
-    unsigned long uart_offset = 0x10000;
+
+#ifdef PLATFORM_TYPE_exynos4
+    uart_base = 0x13800000;
+#else
+    uart_base = 0x12c00000;
+#endif
 
     static L4::Io_register_block_mmio r(uart_base + uart_nr * uart_offset);
     _uart.startup(&r);
     set_stdio_uart(&_uart);
   }
+
+  void reboot()
+  {
+#ifdef PLATFORM_TYPE_exynos4
+    *(unsigned *)0x10020400 = 1;
+#else
+    *(unsigned *)0x10040400 = 1;
+#endif
+  }
+
 };
 }