mali: GPU clock and voltage control including auto-applied full freq. range voltage table (Yank555.lu)

- (new) voltage interface switchabled readonly/readwrite in menuconfig

- Fixed a derp in mali_platform_dvfs.c that impeeded voltage being initialized for highest frequency (Yank555.lu)

mali_dvfs_table_update gets called before the initialization of the ASV level, which
at that stage is reported as ASV 0 when it is 6 once boot is completed on my device

- Included proper voltage table for all 20 freq. levels with automatic update when changing any GPU freq. (Yank555.lu)

SysFS interface :

* clock control (old legacy interface) :
*
* - set frequencies (5 steps) :
*
* echo "step0 step1 step2 step3 step4" > /sys/class/misc/gpu_clock_control/gpu_control
*
* available frequency steps :
*
* 54, 108, 160, 200*, 266, 275, 300,
* 333, 350, 400*, 440, 500*, 533, 600*,
* 640*, 666*, 700*, 733*, 750*, 800
* (* newly introduced steps)
*
* NB: Any change will trigger a reset of all voltages !
*
* - set frequency-step thresholds (up & down) :
*
* echo "step0_up% step1_down% step1_up% step2_down% step2_up% step3_down% step3_up% step4_down%" > /sys/class/misc/gpu_clock_control/gpu_control
*
* available thresholds :
*
* 0% - 100%
*
* - set staycount for each step (default = 0) :
*
* echo "step0 step1 step2 step3 step4" > /sys/class/misc/gpu_clock_control/gpu_staycount
*
* available staycount values :
*
* 0 - 255
*
* clock control (new interface) :
*
* - set frequencies (5 steps) :
*
* echo "freq" > /sys/class/misc/gpu_clock_control/gpu_freq_0...4
*
* available frequency steps :
*
* 54, 108, 160, 200*, 266, 275, 300,
* 333, 350, 400*, 440, 500*, 533, 600*,
* 640*, 666*, 700*, 733*, 750*, 800
* (* newly introduced steps)
*
* NB: Only actually existing steps will be accepted (old legacy accepts anything between min and max !!)
* Any change will trigger a reset of all voltages !
*
* - set frequency-step thresholds (up & down) :
*
* echo "threshold" > /sys/class/misc/gpu_clock_control/gpu_upthreshold_0...3
*
* echo "threshold" > /sys/class/misc/gpu_clock_control/gpu_downthreshold_1...4
*
* available thresholds :
*
* 0 - 100
*
* - set staycount for each step (default = 0) :
*
* echo "staycount" > /sys/class/misc/gpu_clock_control/gpu_staycount_0...4
*
* available staycount values :
*
* 0 - 255
*
* - list all available frequencies (read-only) :
*
* cat /sys/class/misc/gpu_clock_control/available_frequencies
*
* voltage control (old legacy interface) :
*
* - set frequency-step voltage (5 steps) :
*
* echo "step0 step1 step2 step3 step4" > /sys/class/misc/gpu_voltage_control/gpu_control
*
* available voltages :
*
* 600000 - 1400000
*
* voltage control (new interface) :
*
* - set frequency-step voltage (5 steps) :
*
* echo "voltage" > /sys/class/misc/gpu_voltage_control/gpu_voltage_0...4
*
* available voltages :
*
* 600000 - 1400000
*
* - display ASV level (read-only) :
*
* cat /sys/class/misc/gpu_voltage_control/asv_level
*
* - recalculate mali_dvfs_table (write-only) :
*
* echo 1 > /sys/class/misc/gpu_voltage_control/mali_dvfs_table_update

Conflicts:

	drivers/media/video/samsung/mali/common/gpu_voltage_control.c
mali: GPU clock and voltage control including auto-applied full freq. range voltage table (Yank555.lu)

- (new) added global voltage delta to be applied on all steps whenever voltages are reset

- voltage interface switchabled readonly/readwrite in menuconfig

- Fixed a derp in mali_platform_dvfs.c that impeeded voltage being initialized for highest frequency (Yank555.lu)

    mali_dvfs_table_update gets called before the initialization of the ASV level, which
    at that stage is reported as ASV 0 when it is 6 once boot is completed on my device

- Included proper voltage table for all 20 freq. levels with automatic update when changing any GPU freq. (Yank555.lu)

SysFS interface :

* clock control (old legacy interface) :
*
*    - set frequencies (5 steps) :
*
*          echo "step0 step1 step2 step3 step4" > /sys/class/misc/gpu_clock_control/gpu_control
*
*       available frequency steps :
*
*           54 , 108 , 160 , 200*, 266 , 275, 300 ,
*          333 , 350 , 400*, 440 , 500*, 533, 600*,
*          640*, 666*, 700*, 733*, 750*, 800
*          (* newly introduced steps)
*
*       NB: Any change will trigger a reset of all voltages !
*
*    - set frequency-step thresholds (up & down) :
*
*          echo "step0_up% step1_down% step1_up% step2_down% step2_up% step3_down% step3_up% step4_down%" > /sys/class/misc/gpu_clock_control/gpu_control
*
*       available thresholds :
*
*          0% - 100%
*
*    - set staycount for each step (default = 0) :
*
*          echo "step0 step1 step2 step3 step4" > /sys/class/misc/gpu_clock_control/gpu_staycount
*
*       available staycount values :
*
*          0 - 255
*
* clock control (new interface) :
*
*    - set frequencies (5 steps) :
*
*          echo "freq" > /sys/class/misc/gpu_clock_control/gpu_freq_0...4
*
*       available frequency steps :
*
*           54 , 108 , 160 , 200*, 266 , 275, 300 ,
*          333 , 350 , 400*, 440 , 500*, 533, 600*,
*          640*, 666*, 700*, 733*, 750*, 800
*          (* newly introduced steps)
*
*       NB: Only actually existing steps will be accepted (old legacy accepts anything between min and max !!)
*           Any change will trigger a reset of all voltages !
*
*    - set frequency-step thresholds (up & down) :
*
*          echo "threshold" > /sys/class/misc/gpu_clock_control/gpu_upthreshold_0...3
*
*          echo "threshold" > /sys/class/misc/gpu_clock_control/gpu_downthreshold_1...4
*
*       available thresholds :
*
*          0 - 100
*
*    - set staycount for each step (default = 0) :
*
*          echo "staycount" > /sys/class/misc/gpu_clock_control/gpu_staycount_0...4
*
*       available staycount values :
*
*          0 - 255
*
*    - list all available frequencies (read-only) :
*
*          cat /sys/class/misc/gpu_clock_control/available_frequencies
*
* voltage control (old legacy interface) :
*
*    - set frequency-step voltage (5 steps) :
*
*          echo "step0 step1 step2 step3 step4" > /sys/class/misc/gpu_voltage_control/gpu_control
*
*       available voltages :
*
*          600000 - 1400000
*
* voltage control (new interface) :
*
*    - set frequency-step voltage (5 steps) :
*
*          echo "voltage" > /sys/class/misc/gpu_voltage_control/gpu_voltage_0...4
*
*       available voltages :
*
*          600000 - 1400000
*
*    - global over-/undervolt all steps (5 steps) :
*
*          echo "voltage" > /sys/class/misc/gpu_voltage_control/gpu_voltage_detla
*
*       available delta voltages :
*
*          -250000 - +250000 (applied voltages will never drop below 600000 nor cross 1400000)
*
*    - display ASV level (read-only) :
*
*          cat /sys/class/misc/gpu_voltage_control/asv_level
*
*    - recalculate mali_dvfs_table (write-only) :
*
*          echo 1 > /sys/class/misc/gpu_voltage_control/mali_dvfs_table_update
Samsung Update 10 -> Update 11
mm/slab : fix compilation errors for Samsung kernel (Yank555.lu)
Compiler flags updated (gcc 4.7)

Conflicts:

	Makefile
max8997: move sysfs node for pwm level (Codeworkx)

Change-Id: I1ca8450000be99505c7c48c6c4fd2dfb15bba670