From b292c760e01ce713c330bb4234078cdb4872b725 Mon Sep 17 00:00:00 2001 From: Xiao Feng Date: Wed, 14 Jan 2015 16:18:19 +0800 Subject: [PATCH] rk3368: add /sys/pm_tsets/ support Signed-off-by: Xiao Feng --- arch/arm/mach-rockchip/rk_pm_tests/clk_rate.c | 3 ++- arch/arm/mach-rockchip/rk_pm_tests/pvtm_test.c | 6 ++++++ arch/arm64/mach-rockchip/Makefile | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/rk_pm_tests/clk_rate.c b/arch/arm/mach-rockchip/rk_pm_tests/clk_rate.c index fb4cf44d66bb..8d5cfcd8cc80 100644 --- a/arch/arm/mach-rockchip/rk_pm_tests/clk_rate.c +++ b/arch/arm/mach-rockchip/rk_pm_tests/clk_rate.c @@ -64,7 +64,8 @@ static int file_write(char *file_path, char *buf) mm_segment_t old_fs; loff_t offset = 0; - PM_DBG("%s: write %s %s size = %d\n", __func__, file_path, buf, strlen(buf)); + PM_DBG("%s: write %s %s size = %d\n", __func__, + file_path, buf, (int)strlen(buf)); file = filp_open(file_path, O_RDWR, 0); if (IS_ERR(file)) { diff --git a/arch/arm/mach-rockchip/rk_pm_tests/pvtm_test.c b/arch/arm/mach-rockchip/rk_pm_tests/pvtm_test.c index beee2020ae8e..8fa7ca080ddb 100644 --- a/arch/arm/mach-rockchip/rk_pm_tests/pvtm_test.c +++ b/arch/arm/mach-rockchip/rk_pm_tests/pvtm_test.c @@ -19,10 +19,13 @@ #include #include +#define PVTM_TEST 0 + extern int rockchip_tsadc_get_temp(int chn); extern void rk29_wdt_keepalive(void); extern u32 pvtm_get_value(u32 ch, u32 time_us); +#if PVTM_TEST char *pvtm_buf; static const char pi_result[] = "3141592653589793238462643383279528841971693993751058209749445923078164062862089986280348253421170679821480865132823664709384469555822317253594081284811174502841270193852115559644622948954930381964428810975665933446128475648233786783165271201991456485669234634861045432664821339360726024914127372458706606315588174881520920962829254917153643678925903611330530548820466521384146951941511609433057273657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566438602139494639522473719070217986943702770539217176293176752384674818467669451320005681271452635608277857713427577896091736371787214684409012249534301465495853710579227968925892354201995611212902196864344181598136297747713099605187072113499999983729780499510597317328160963185"; int calc_pi(void) @@ -390,6 +393,7 @@ void scale_min_pvtm_fix_rate(void) } while (1); } +#endif ssize_t pvtm_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { @@ -410,8 +414,10 @@ ssize_t pvtm_store(struct kobject *kobj, struct kobj_attribute *attr, int pvtm_buf_init(void) { +#if PVTM_TEST pvtm_buf = (char *)__get_free_pages(GFP_KERNEL, 8); +#endif return 0; } fs_initcall(pvtm_buf_init); diff --git a/arch/arm64/mach-rockchip/Makefile b/arch/arm64/mach-rockchip/Makefile index 48db68735262..5a165eb929b1 100644 --- a/arch/arm64/mach-rockchip/Makefile +++ b/arch/arm64/mach-rockchip/Makefile @@ -9,3 +9,4 @@ obj-$(CONFIG_DVFS) += ../../arm/mach-rockchip/dvfs.o obj-$(CONFIG_BLOCK_RKNAND) += ../../arm/mach-rockchip/rknandbase.o obj-$(CONFIG_RK_PL330_DMA_TEST) += ../../arm/mach-rockchip/dma_memcpy_test.o obj-$(CONFIG_RK_VCODEC) += ../../arm/mach-rockchip/vcodec_service.o +obj-$(CONFIG_RK_PM_TESTS) += ../../arm/mach-rockchip/rk_pm_tests/ -- 2.34.1