]> rtime.felk.cvut.cz Git - l4.git/blobdiff - kernel/fiasco/src/kern/arm/bsp/tegra2/reset-arm-tegra2.cpp
update
[l4.git] / kernel / fiasco / src / kern / arm / bsp / tegra2 / reset-arm-tegra2.cpp
index e7e042a123c5406699e169cb7706e0bad73bb1e5..78a03b7479c04afe886292185c67afe160c80816 100644 (file)
@@ -1,24 +1,15 @@
+// ------------------------------------------------------------------------
 IMPLEMENTATION [arm && tegra2]:
 
-#include "io.h"
 #include "kmem.h"
-
-class Tegra2_reset
-{
-public:
-  enum
-  {
-    RESET = Kmem::Clock_reset_map_base + 0x4,
-  };
-};
-
-// ------------------------------------------------------------------------
-IMPLEMENTATION [arm && tegra2]:
+#include "mmio_register_block.h"
 
 void __attribute__ ((noreturn))
 platform_reset(void)
 {
-  Io::write(Io::read<Mword>(Tegra2_reset::RESET) | 4, Tegra2_reset::RESET);
+  enum { RESET = Mem_layout::Clock_reset_phys_base + 0x4 };
+  Mmio_register_block b(Kmem::mmio_remap(RESET));
+  b.modify<Mword>(4, 0, 0);
   for (;;)
     ;
 }