rockchip: optimize pvtm test
author陈亮 <cl@rock-chips.com>
Thu, 28 Aug 2014 01:39:34 +0000 (18:39 -0700)
committer陈亮 <cl@rock-chips.com>
Thu, 28 Aug 2014 01:42:27 +0000 (18:42 -0700)
Signed-off-by: 陈亮 <cl@rock-chips.com>
arch/arm/mach-rockchip/pvtm.c
arch/arm/mach-rockchip/rk_pm_tests/pvtm_test.c

index 8bfbd814e2629a9d4d0659349dfb6e351bcf38e4..0a514f054c071496aa4734244767a19e3ab089ba 100644 (file)
@@ -155,5 +155,5 @@ static int __init pvtm_init(void)
        return 0;
 }
 
-fs_initcall(pvtm_init);
+core_initcall(pvtm_init);
 
index c9ea7d21306aae14fff5dca9522f1da2559b8366..beee2020ae8e5e3609b4efe539cccb60f3c7f629 100644 (file)
@@ -22,8 +22,8 @@
 extern int rockchip_tsadc_get_temp(int chn);
 extern void rk29_wdt_keepalive(void);
 extern u32 pvtm_get_value(u32 ch, u32 time_us);
-extern char *pvtm_buf;
 
+char *pvtm_buf;
 static const char pi_result[] = "3141592653589793238462643383279528841971693993751058209749445923078164062862089986280348253421170679821480865132823664709384469555822317253594081284811174502841270193852115559644622948954930381964428810975665933446128475648233786783165271201991456485669234634861045432664821339360726024914127372458706606315588174881520920962829254917153643678925903611330530548820466521384146951941511609433057273657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566438602139494639522473719070217986943702770539217176293176752384674818467669451320005681271452635608277857713427577896091736371787214684409012249534301465495853710579227968925892354201995611212902196864344181598136297747713099605187072113499999983729780499510597317328160963185";
 int calc_pi(void)
 {
@@ -407,3 +407,11 @@ ssize_t pvtm_store(struct kobject *kobj, struct kobj_attribute *attr,
 {
        return n;
 }
+
+int pvtm_buf_init(void)
+{
+       pvtm_buf = (char *)__get_free_pages(GFP_KERNEL, 8);
+
+       return 0;
+}
+fs_initcall(pvtm_buf_init);