From bb9322652736b0e9c86360f7499835cc26f6b7d8 Mon Sep 17 00:00:00 2001 From: xxx Date: Wed, 19 Jun 2013 14:34:02 +0800 Subject: [PATCH] edit ft_test.c for ft test --- arch/arm/plat-rk/rk_pm_tests/ft/ft_test.c | 219 +++++++++++++++++----- 1 file changed, 170 insertions(+), 49 deletions(-) diff --git a/arch/arm/plat-rk/rk_pm_tests/ft/ft_test.c b/arch/arm/plat-rk/rk_pm_tests/ft/ft_test.c index 1aa95700738b..51524326a780 100755 --- a/arch/arm/plat-rk/rk_pm_tests/ft/ft_test.c +++ b/arch/arm/plat-rk/rk_pm_tests/ft/ft_test.c @@ -52,41 +52,31 @@ REVISION 0.01 #include #include -//#include -#if 0 -#include "rk_pm_tests.h" - -#include "clk_rate.h" -#include "clk_volt.h" -#include "maxfreq.h" -#include "freq_limit.h" -#include "cpu_usage.h" -#include "rk_suspend_test.h" -#include "clk_auto_volt.h" -#include "delayline.h" -#endif + #define ft_printk(fmt, arg...) \ printk(KERN_EMERG fmt, ##arg) //KERN_DEBUG #define ft_printk_dbg(fmt, arg...) \ - printk(KERN_EMERG fmt, ##arg) - + printk(KERN_WARNING fmt, ##arg) + //KERN_DEBUG #define ft_printk_info(fmt, arg...) \ - printk(KERN_EMERG fmt, ##arg) + printk(KERN_WARNING fmt, ##arg) -static unsigned long arm_setup2_rate=1608*1000*1000; +static unsigned long arm_setup2_rate=1608*1000*1000;//1608*1000*1000; +static int setup2_flag=0; //0-15 :test setup1 #define CPU_TST_L1 (1<<0) #define CPU_TST_L2 (1<<1) - +#define CPU_TST_SETUP1_MSK (0xffff) //16-31 :test setup2 #define CPU_TST_L1_STP2 (1<<16) #define CPU_TST_L2_STP2 (1<<17) +#define CPU_TST_SETUP2_MSK (0xffff0000) static DEFINE_PER_CPU(int, cpu_tst_flags)=(CPU_TST_L1|CPU_TST_L2|CPU_TST_L1_STP2|CPU_TST_L2_STP2); @@ -110,9 +100,6 @@ void ft_cpu_l1_test(u32 cnt) u32 cpu = smp_processor_id(); int test_array[100]; int i; - - ft_printk_dbg("l1_test cpu=%d start\n",cpu); - for(i=0;i=2) static char memtest_buf1[BUF_SIZE] __attribute__((aligned(4096))); @@ -175,6 +163,11 @@ static char *l2_test_buf[NR_CPUS]= }; +static char *l2_test_mbuf[NR_CPUS]= +{ +NULL, +}; + int ft_test_cpus_l2(char *data_s,u32 buf_size,u32 cnt) { int i,j; @@ -187,13 +180,82 @@ int ft_test_cpus_l2(char *data_s,u32 buf_size,u32 cnt) ret=test_cpus_l2(data_s+i,data_s+i+test_size,0xffffffff); if(ret) - return -1; + { + return 0xff; + } ret=test_cpus_l2(data_s+i,data_s+i+test_size,0); if(ret) - return -1; + { + return 0x1; + } ret=test_cpus_l2(data_s+i,data_s+i+test_size,0xaaaaaaaa); if(ret) - return -1; + { + return 0xaa; + } + + i+=test_size; + + if((i+test_size)>buf_size) + break; + + } + } + + return 0; +} + +int test_cpus_l2_m(char *data_s,char *data_d,int size,char data) +{ + char *start; + char *data_end=data_s+size; + for(start=data_s;start