From abbf5a2ef4b46218a1b24ef6afd6cf7b35a87e55 Mon Sep 17 00:00:00 2001 From: Drew Barbier Date: Mon, 2 Jul 2018 00:40:06 -0500 Subject: e2 and clic start --- bsp/include/sifive/devices/clic.h | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) (limited to 'bsp/include/sifive') diff --git a/bsp/include/sifive/devices/clic.h b/bsp/include/sifive/devices/clic.h index b31e1ce..e8dc2df 100644 --- a/bsp/include/sifive/devices/clic.h +++ b/bsp/include/sifive/devices/clic.h @@ -3,8 +3,7 @@ #ifndef _SIFIVE_CLIC_H #define _SIFIVE_CLIC_H -#define CLIC_CTRL_ADDR _AC(0x2000000,UL) - +#define CLIC_HART0 0x00800000 #define CLIC_MSIP 0x0000 #define CLIC_MSIP_size 0x4 #define CLIC_MTIMECMP 0x4000 @@ -12,10 +11,10 @@ #define CLIC_MTIME 0xBFF8 #define CLIC_MTIME_size 0x8 -#define CLIC_INTIP 0x0800000 -#define CLIC_INTIE 0x0800400 -#define CLIC_INTCFG 0x0800800 -#define CLIC_CFG 0x0800c00 +#define CLIC_INTIP 0x000 +#define CLIC_INTIE 0x400 +#define CLIC_INTCFG 0x800 +#define CLIC_CFG 0xc00 // These interrupt IDs are consistent across old and new mtvec modes #define SSIPID 1 @@ -27,23 +26,5 @@ #define CSIPID 12 #define LOCALINTIDBASE 16 -#define CLIC_REG(offset) _REG32(CLIC_CTRL_ADDR, offset) -#define CLIC_REG8(offset) (*(volatile uint8_t *)((CLIC_CTRL_ADDR) + (offset))) - -#ifndef CLINT_CTRL_ADDR -#define CLINT_CTRL_ADDR CLIC_CTRL_ADDR -#endif -#ifndef CLINT_REG -#define CLINT_REG CLIC_REG -#endif -#ifndef CLINT_MSIP -#define CLINT_MSIP CLIC_MSIP -#endif -#ifndef CLINT_MTIME -#define CLINT_MTIME CLIC_MTIME -#endif -#ifndef CLINT_MTIMECMP -#define CLINT_MTIMECMP CLIC_MTIMECMP -#endif #endif /* _SIFIVE_CLIC_H */ -- cgit v1.2.3