]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
thermal: ti-soc-thermal: dra7: Implement Workaround for Errata i814
authorKeerthy <j-keerthy@ti.com>
Wed, 22 Apr 2015 12:51:41 +0000 (18:21 +0530)
committerEduardo Valentin <edubezval@gmail.com>
Sat, 9 May 2015 00:55:46 +0000 (17:55 -0700)
commit79010636174c78209e20c4f44370b2b13312e08c
tree02eb7bf5e3833df37a6e9179ebc8f13a31008bc9
parent5ebe6afaf0057ac3eaeb98defd5456894b446d22
thermal: ti-soc-thermal: dra7: Implement Workaround for Errata i814

Bandgap Temperature read Dtemp can be corrupted

DESCRIPTION
        Read accesses to registers listed below can be corrupted due to
incorrect resynchronization between clock domains.

        Read access to registers below can be corrupted :
                • CTRL_CORE_DTEMP_MPU/GPU/CORE/DSPEVE/IVA_n (n = 0 to 4)
        • CTRL_CORE_TEMP_SENSOR_MPU/GPU/CORE/DSPEVE/IVA_n

WORKAROUND
    Multiple reads to CTRL_CORE_TEMP_SENSOR_MPU/GPU/CORE/DSPEVE/IVA[9:0]:
    BGAP_DTEMPMPU/GPU/CORE/DSPEVE/IVA is needed to discard false value and
    read right value:
       1. Perform two successive reads to BGAP_DTEMP bit field.
               (a) If read1 returns Val1 and read2 returns Val1, then
        right value is Val1.
               (b) If read1 returns Val1, read 2 returns Val2, a third
        read is needed.
       2. Perform third read
               (a) If read3 returns Val2 then right value is Val2.
               (b) If read3 returns Val3, then right value is Val3.

    The above in gist means if val1 and val2 are the same then we can go
    ahead with that value else we need a third read which will be right
    since synchronization will be complete by then.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/ti-soc-thermal/dra752-thermal-data.c
drivers/thermal/ti-soc-thermal/ti-bandgap.c
drivers/thermal/ti-soc-thermal/ti-bandgap.h