From f1243505556add3fd48130310c8de862a838bea2 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 2 Apr 2015 17:00:59 +0800 Subject: [PATCH] runtime: disable kernel-CPU functions when kernel-CPU not present --- soc/runtime/test_mode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/soc/runtime/test_mode.c b/soc/runtime/test_mode.c index a1afdcccf..8df03c313 100644 --- a/soc/runtime/test_mode.c +++ b/soc/runtime/test_mode.c @@ -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");