Skip to content

Commit

Permalink
runtime: disable kernel-CPU functions when kernel-CPU not present
Browse files Browse the repository at this point in the history
sbourdeauducq committed Apr 2, 2015
1 parent 4b66e31 commit f124350
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions soc/runtime/test_mode.c
Original file line number Diff line number Diff line change
@@ -305,6 +305,7 @@ static char *get_token(char **str)
return d;
}

#ifdef CSR_KERNEL_CPU_BASE
static const unsigned int test_program[] = {
0x1860dead, // l.movhi r3,0xdead
0x1880d000, // l.movhi r4,0xd000
@@ -326,6 +327,7 @@ static void cputest(void)
for(i=0;i<10;i++)
printf("%08x\n", MMPTR(0xd0000000));
}
#endif

static void do_command(char *c)
{
@@ -349,7 +351,9 @@ static void do_command(char *c)
else if(strcmp(token, "ddsftw") == 0) ddsftw(get_token(&c), get_token(&c));
else if(strcmp(token, "ddstest") == 0) ddstest(get_token(&c));

#ifdef CSR_KERNEL_CPU_BASE
else if(strcmp(token, "cputest") == 0) cputest();
#endif

else if(strcmp(token, "") != 0)
printf("Command not found\n");

0 comments on commit f124350

Please sign in to comment.