summaryrefslogtreecommitdiff
path: root/bsp/env/coreplexip-e31-arty/init.c
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2017-06-14 08:59:41 -0700
committerGitHub <noreply@github.com>2017-06-14 08:59:41 -0700
commit61d6152830d752cd81c34368ecc24a5a2a107061 (patch)
tree58c5b8c05ae24b8c6b035545634200eb3742c064 /bsp/env/coreplexip-e31-arty/init.c
parent809711e87af06ca5c151a2fac568382330f2feb6 (diff)
parent99a8e6a697a340a5f44db82e68ab8ab9be604131 (diff)
Merge pull request #64 from sifive/multicore-scratchpad
Add support for multicore systems and scratchpad-only systems
Diffstat (limited to 'bsp/env/coreplexip-e31-arty/init.c')
-rw-r--r--bsp/env/coreplexip-e31-arty/init.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bsp/env/coreplexip-e31-arty/init.c b/bsp/env/coreplexip-e31-arty/init.c
index 05b2b3e..84ae09e 100644
--- a/bsp/env/coreplexip-e31-arty/init.c
+++ b/bsp/env/coreplexip-e31-arty/init.c
@@ -6,12 +6,16 @@
#include "platform.h"
#include "encoding.h"
+#define CPU_FREQ 65000000
+#define XSTR(x) #x
+#define STR(x) XSTR(x)
+
extern int main(int argc, char** argv);
extern void trap_entry();
static unsigned long get_cpu_freq()
{
- return 65000000;
+ return CPU_FREQ;
}
unsigned long get_timer_freq()
@@ -83,7 +87,7 @@ void _init()
#ifndef NO_INIT
uart_init(115200);
- printf("core freq at %d Hz\n", get_cpu_freq());
+ puts("core freq at " STR(CPU_FREQ) " Hz\n");
write_csr(mtvec, &trap_entry);
#endif