powerpc/85xx: add sysfs for pw20 state and altivec idle
authorWang Dongsheng <dongsheng.wang@freescale.com>
Tue, 17 Dec 2013 08:17:02 +0000 (16:17 +0800)
committerScott Wood <scottwood@freescale.com>
Thu, 9 Jan 2014 23:51:38 +0000 (17:51 -0600)
commita7189483f03d4c4b93219ff27a2e0a01716abd21
tree9a3412e1a8b7a13f2fd31cdbeea4f6d3a205f9fb
parent1d47ddf7c3725e889763b1fffa70a04e1061940b
powerpc/85xx: add sysfs for pw20 state and altivec idle

Add a sys interface to enable/diable pw20 state or altivec idle, and
control the wait entry time.

Enable/Disable interface:
    0, disable. 1, enable.
    /sys/devices/system/cpu/cpuX/pw20_state
    /sys/devices/system/cpu/cpuX/altivec_idle

Set wait time interface:(Nanosecond)
    /sys/devices/system/cpu/cpuX/pw20_wait_time
    /sys/devices/system/cpu/cpuX/altivec_idle_wait_time
Example: Base on TBfreq is 41MHZ.
    1~48(ns): TB[63]
    49~97(ns): TB[62]
    98~195(ns): TB[61]
    196~390(ns): TB[60]
    391~780(ns): TB[59]
    781~1560(ns): TB[58]
    ...

Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
[scottwood@freescale.com: change ifdef]
Signed-off-by: Scott Wood <scottwood@freescale.com>
arch/powerpc/kernel/sysfs.c