Skip to content

Commit 50f01c5

Browse files
Ivan Mikhaylovmpe
authored andcommitted
powerpc/44x/fsp2: tvsense workaround for dd1
TVSENSE(temperature and voltage sensors) reset is blocked (clock gated) by the POR default of the TVS sleep config bit. As a consequence, TVSENSE will provide erratic sensor values, which may result in spurious (parity) errors recorded in the CMU FIR and leading to erroneous interrupt requests once the CMU interrupt is unmasked. Purpose of this to set up CMU in working state in any cases even in case of parity errors. Reviewed-by: Alistair Popple <[email protected]> Signed-off-by: Ivan Mikhaylov <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent 9c4c374 commit 50f01c5

File tree

1 file changed

+17
-0
lines changed
  • arch/powerpc/platforms/44x

1 file changed

+17
-0
lines changed

arch/powerpc/platforms/44x/fsp2.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,23 @@ static int __init fsp2_probe(void)
5959
mtdcr(DCRN_PLB6_HD, 0xffff0000);
6060
mtdcr(DCRN_PLB6_SHD, 0xffff0000);
6161

62+
/* TVSENSE reset is blocked (clock gated) by the POR default of the TVS
63+
* sleep config bit. As a consequence, TVSENSE will provide erratic
64+
* sensor values, which may result in spurious (parity) errors
65+
* recorded in the CMU FIR and leading to erroneous interrupt requests
66+
* once the CMU interrupt is unmasked.
67+
*/
68+
69+
/* 1. set TVS1[UNDOZE] */
70+
val = mfcmu(CMUN_TVS1);
71+
val |= 0x4;
72+
mtcmu(CMUN_TVS1, val);
73+
74+
/* 2. clear FIR[TVS] and FIR[TVSPAR] */
75+
val = mfcmu(CMUN_FIR0);
76+
val |= 0x30000000;
77+
mtcmu(CMUN_FIR0, val);
78+
6279
/* L2 machine checks */
6380
mtl2(L2PLBMCKEN0, 0xffffffff);
6481
mtl2(L2PLBMCKEN1, 0x0000ffff);

0 commit comments

Comments
 (0)