Merge "kata:VectorCoreDriver: Use HW register header."

GitOrigin-RevId: 7b10748eb801311b291aeba25cc0535f4e0b09d4
This commit is contained in:
Cindy Liu 2021-09-15 22:03:31 +00:00 committed by Sam Leffler
parent 6d41c07085
commit 6b25d6fea0
2 changed files with 7 additions and 3 deletions

View File

@ -74,7 +74,10 @@ DeclareCAmkESComponent(SeL4Debug
)
DeclareCAmkESComponent(VectorCoreDriver
SOURCES components/VectorCoreDriver/src/driver.c
SOURCES
components/VectorCoreDriver/src/driver.c
INCLUDES
vc_top-gen/include
)
DeclareCAmkESRootserver(system.camkes)

View File

@ -1,8 +1,9 @@
#include <camkes.h>
#include <stdint.h>
// TODO: Set offsets into memory based on `csr`.
#define CTRL (csr + 0x0)
#include "vc_top/vc_top.h"
#define CTRL (csr + VC_TOP_CTRL_REG_OFFSET)
void vctop_set_ctrl(uint32_t ctrl) {
*((volatile uint32_t*)CTRL) = ctrl;