• Wang Dongsheng's avatar
    powerpc/85xx: add sysfs for pw20 state and altivec idle · a7189483
    Wang Dongsheng authored
    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: default avatarWang Dongsheng <dongsheng.wang@freescale.com>
    [scottwood@freescale.com: change ifdef]
    Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
    a7189483
sysfs.c 23.5 KB