nios2: add _nios2_reg_write/read functions

The technical manuals and example HAL code frequently refer to
register bank numbers from some base address. Add these helper
functions to read and write registers correctly using this
notation.

Change-Id: Ia082f5cc89081fcea2cb6ad8204c1b9b2650d3fd
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2016-06-20 13:39:21 -07:00 committed by Inaky Perez-Gonzalez
commit 7bd697b0d5
2 changed files with 19 additions and 1 deletions

View file

@ -25,6 +25,7 @@
#define _ARCH_IFACE_H
#include <system.h>
#include <arch/nios2/asm_inline.h>
#include "nios2.h"
#ifdef __cplusplus
@ -41,7 +42,6 @@ extern "C" {
#ifndef _ASMLANGUAGE
#include <stdint.h>
#include <irq.h>
#include <arch/nios2/asm_inline.h>
/* STUB. Eventually port ARC/ARM interrupt stuff */
#define _ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p)