Latest Post
[Linux] 망고520 CPU 온도 체크

커널 3.0.31configuration

 

커널 버전은 3.0.31을 기준으로 설명합니다.

소스는 http://crztech.iptime.org:8080/Release/mango520-exynos5250/android/jellybean-4.1.1/20140613/mango520-kernel3031-20140613.tar.gz




$ ./build_kernel config

 

명령 실행 후

 

System Type  --->

[*] Use thermal management

선택 후

컴파일 하여 , 커널 이미지를 다시Write하면 됩니다.

 

관련 드라이버 소스는

 

 

arch/arm/mach-exynos/tmu-exynos.c

 

 

에 있습니다.

 

관련 코드는 아래와 같습니다.

 

static int get_cur_temp(struct tmu_info *info)

{

        int curr_temp;

        int temperature;

 

        /* After reading temperature code from register, compensating

         * its value and calculating celsius temperatue,

         * get current temperatue.

         */

        curr_temp = __raw_readl(info->tmu_base + CURRENT_TEMP) & 0xff;

 

        /* compensate and calculate current temperature */

        temperature = curr_temp - info->te1 + TMU_DC_VALUE;

        if (temperature < 10) {

                /* temperature code range are between min 10 and 125 */

                pr_alert("Current temperature is in inaccurate range->"

                        " check if vdd_18_ts is on or room temperature.\n");

        }

 

        return temperature;

}

 

 

 

Kernel 3.0.31 CPU 온도읽기

 

 

 

[root@Mango520 ~]# cat /sys/devices/platform/tmu/temperature

53

 

섭씨 53도 임을 알수 있습니다.

 

 

 

커널 3.4.35configuration

 

System Type  --->

SAMSUNG EXYNOS SoCs Support  --->

[*] Use thermal management

 

Kernel 3.4.35 CPU 온도 읽기

드라이버 소스에서

tmu_debugfs =

                debugfs_create_file("tmu_dev_status",

                                S_IRUGO, NULL, info, &tmu_dev_status_fops);

 

“debugfs” 파일을 생성하게 되어 있습니다.

 

[root@Mango520 debug]# mount -t debugfs none /sys/kernel/debug

[root@Mango520 debug]# ls /sys/kernel/debug/

asoc/                              memblock/

bdi/                               mmc0/

binder/                            mmc1/

bluetooth/                         mmc2/

clock/                             pm_qos

dynamic_debug/                     regmap/

extfrag/                           s3c-fb

exynos5_bus                        sched_features

exynos5_devfreq_int_time_in_state  shrinker

exynos5_devfreq_mif_time_in_state  suspend_stats

gpio                               suspend_time*

hid/                               sync

ieee80211/                         tmu_dev_status

ion/                               tracing/

kbase_carveout                     usb/

lpa_cdev_status                    wakeup_sources

mem_usage/

[root@Mango520 debug]# cat /sys/kernel/debug/tmu_dev_status

Current Temperature : 47

Current TMU State : TMU_STATUS_NORMAL

Memory Throttling : unthrottled

Memory throttle auto refresh time : 1937 ns

Normal auto refresh time : 3875 ns

TMU monitoring sample rate : 200 ms

[root@Mango520 debug]# cat /sys/kernel/debug/tmu_dev_status

Current Temperature : 47

Current TMU State : TMU_STATUS_NORMAL

Memory Throttling : unthrottled

Memory throttle auto refresh time : 1937 ns

Normal auto refresh time : 3875 ns

TMU monitoring sample rate : 200 ms

 

Comments 0
:    :    :
이름 / 2014-11-20 / ★★★☆☆ [수정 / 삭제]

내용

Recent Comments
일방통행  |  ★★★★★
ISE 14.7 virtualbox를 설치했는데, ,iMPACT가 인식을 못하는데, 어케해야하나요?
min  |  ★★★★☆
These are the only Drives available to write images to: # major minor size name 1: 8 0 512805384 sda 2: 8 16 15558144 sdb Enter Device Number or n to exit: 2 Invalid selection! 왜 이런 오류가 나는 걸까요?
dino  |  ★★☆☆☆
NAND Scrub실행 후 에러가 나타납니다/ 조치방법을 알려주세요 에러내용 crz nand_erase_opts erase.addr=0x0, opt->offset=0x0, erase_ieng minfo_erases=0x20000 .....진행후 s3c-nand:ecc uncorrectable error detected---4개발생합니다 빠른 회신부탁드립니다 연락처:010-3752-6251 강희진
bluewind  |  ★★★★★
안녕하세요..구입했는데..회로도 부탁드립니다. percephy@naver.com 입니다.
조형철  |  ★★★★★
상기 Backlight 관련 회로를 구할 수 있을까요?
hwang  |  ★★★★★
구입한지 조금 됬는데 회로도 부탁합니다. rubens7777@paran.com 입니다.