diff options
author | Drew Barbier <dbarbi1@gmail.com> | 2018-07-02 00:40:06 -0500 |
---|---|---|
committer | Drew Barbier <dbarbi1@gmail.com> | 2018-07-02 00:40:06 -0500 |
commit | abbf5a2ef4b46218a1b24ef6afd6cf7b35a87e55 (patch) | |
tree | 3a204d9847f0b810056aa8c26cee62e8a18e2635 /bsp/include/sifive | |
parent | b091d1cabe70c84825a7f304d725010d2cf163d9 (diff) |
e2 and clic start
Diffstat (limited to 'bsp/include/sifive')
-rw-r--r-- | bsp/include/sifive/devices/clic.h | 29 |
1 files changed, 5 insertions, 24 deletions
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 */ |