Blame view

RIOT/boards/mips-malta/malta.c 680 Bytes
a752c7ab   elopes   add first test an...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  /*
   * Copyright 2016, Imagination Technologies Limited and/or its
   *                 affiliated group companies.
   * This file is subject to the terms and conditions of the GNU Lesser
   * General Public License v2.1. See the file LICENSE in the top level
   * directory for more details.
   */
  #include <stdio.h>
  #include "periph/uart.h"
  
  #define MIPS_MALTA_ADDR    (0xbf000500)
  #define MIPS_MALTA_VAL_RST (0x42)
  
  static void malta_reset(void)
  {
      *(volatile long *)MIPS_MALTA_ADDR = MIPS_MALTA_VAL_RST;
      __asm__ volatile ("wait");
  }
  
  void board_init(void)
  {
      /* Board initialization is done by the bootloader (u-boot) on Malta */
  }
  
  void pm_reboot(void)
  {
      malta_reset();
  }