
6 changed files with 149 additions and 0 deletions
@ -0,0 +1,3 @@
|
||||
MODULE = board
|
||||
|
||||
include $(RIOTBASE)/Makefile.base |
@ -0,0 +1,9 @@
|
||||
# Put defined MCU peripherals here (in alphabetical order)
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
|
||||
# Various other features (if any)
|
||||
FEATURES_PROVIDED += cpp
|
||||
|
||||
# The board MPU family (used for grouping by the CI system)
|
||||
FEATURES_MCU_GROUP = mips32r2
|
@ -0,0 +1,4 @@
|
||||
export CPU = mips32r2_common
|
||||
export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include/
|
||||
export USE_HARD_FLOAT = 1
|
||||
export USE_DSP = 1
|
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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. |
||||
* |
||||
*/ |
||||
|
||||
/**
|
||||
* @defgroup boards_mips-malta MIPS MALTA |
||||
* @ingroup boards |
||||
* @brief Board specific files for the MIPS Malta FPGA system |
||||
* @{ |
||||
* |
||||
* @file |
||||
* @brief Board specific definitions for the MIPS Malta FPGA System. |
||||
* |
||||
* @author Neil Jones <neil.jones@imgtec.com> |
||||
*/ |
||||
|
||||
#ifndef _BOARD_H_ |
||||
#define _BOARD_H_ |
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
/**
|
||||
* @brief Set how many increments of the count register per uS |
||||
* needed by timer code |
||||
*/ |
||||
#define TICKS_PER_US (15) |
||||
|
||||
/**
|
||||
* @brief Board level initialisation |
||||
*/ |
||||
void board_init(void); |
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif |
||||
|
||||
#endif /* _BOARD_H_ */ |
||||
/** @} */ |
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* 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. |
||||
* |
||||
*/ |
||||
|
||||
/**
|
||||
* @defgroup boards_mips-malta MIPS MALTA |
||||
* @ingroup boards |
||||
* @brief peripheral configuration for the MIPS Malta FPGA system |
||||
* @{ |
||||
* |
||||
* @file |
||||
* @brief peripheral configuration for the MIPS Malta FPGA system |
||||
* |
||||
* @author Neil Jones <neil.jones@imgtec.com> |
||||
*/ |
||||
|
||||
#ifndef _PERIPH_CONF_H_ |
||||
#define _PERIPH_CONF_H_ |
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
/**
|
||||
* @brief Timer definitions |
||||
* @{ |
||||
*/ |
||||
#define TIMER_NUMOF (1) |
||||
#define TIMER_0_CHANNELS (3) |
||||
/** @} */ |
||||
|
||||
/**
|
||||
* @brief No UART driver for this board currently |
||||
* Note this value must be set though (to 0) |
||||
*/ |
||||
#define UART_NUMOF (0) |
||||
|
||||
/**
|
||||
* @brief Enable DSP context save + restore. |
||||
*/ |
||||
#define MIPS_DSP (1) |
||||
|
||||
/**
|
||||
* @brief Enable FPU context save + restore. |
||||
*/ |
||||
#define MIPS_HARD_FLOAT (1) |
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif |
||||
|
||||
#endif /*_PERIPH_CONF_H_*/ |
||||
/** @} */ |
@ -0,0 +1,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 initialisation is done by the bootloader (u-boot) on Malta */ |
||||
} |
||||
|
||||
void pm_reboot(void) |
||||
{ |
||||
malta_reset(); |
||||
} |
Loading…
Reference in new issue