Browse Source

boards: mips-malta: Add basic malta FPGA support.

Add basic support for the MIPS malta FPGA platform.
pr/rotary
Neil Jones 6 years ago
parent
commit
d09fd777fc
  1. 3
      boards/mips-malta/Makefile
  2. 9
      boards/mips-malta/Makefile.features
  3. 4
      boards/mips-malta/Makefile.include
  4. 46
      boards/mips-malta/include/board.h
  5. 59
      boards/mips-malta/include/periph_conf.h
  6. 28
      boards/mips-malta/malta.c

3
boards/mips-malta/Makefile

@ -0,0 +1,3 @@
MODULE = board
include $(RIOTBASE)/Makefile.base

9
boards/mips-malta/Makefile.features

@ -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

4
boards/mips-malta/Makefile.include

@ -0,0 +1,4 @@
export CPU = mips32r2_common
export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include/
export USE_HARD_FLOAT = 1
export USE_DSP = 1

46
boards/mips-malta/include/board.h

@ -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_ */
/** @} */

59
boards/mips-malta/include/periph_conf.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_*/
/** @} */

28
boards/mips-malta/malta.c

@ -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…
Cancel
Save