Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F114995992
D35764.id108270.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
954 B
Referenced Files
None
Subscribers
None
D35764.id108270.diff
View Options
diff --git a/sys/arm64/qoriq/qoriq_therm.c b/sys/arm64/qoriq/qoriq_therm.c
--- a/sys/arm64/qoriq/qoriq_therm.c
+++ b/sys/arm64/qoriq/qoriq_therm.c
@@ -435,8 +435,8 @@
WR4(sc, TMUV2_TMTMIR, 0x0F); /* disable */
/* these registers are not of settings is not in TRM */
WR4(sc, TMUV2_TEUMR(0), 0x51009c00);
- for (int i = 0; i < 7; i++)
- WR4(sc, TMUV2_TMSAR(0), 0xE);
+ for (int i = 0; i < sc->ntsensors; i++)
+ WR4(sc, TMUV2_TMSAR(sc->tsensors[i].site_id), 0xE);
}
/* prepare calibration tables */
@@ -447,10 +447,14 @@
goto fail;
}
/* start monitoring */
- sites = (1U << sc->ntsensors) - 1;
+ sites = 0;
if (sc->ver == 1) {
+ for (int i = 0; i < sc->ntsensors; i++)
+ sites |= 1 << (15 - sc->tsensors[i].site_id);
WR4(sc, TMU_TMR, 0x8C000000 | sites);
} else {
+ for (int i = 0; i < sc->ntsensors; i++)
+ sites |= 1 << sc->tsensors[i].site_id;
WR4(sc, TMUV2_TMSR, sites);
WR4(sc, TMU_TMR, 0x83000000);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 20, 10:38 AM (57 m, 54 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17629403
Default Alt Text
D35764.id108270.diff (954 B)
Attached To
Mode
D35764: arm64, qoriq_therm: fix handling sites on version 1 and 2
Attached
Detach File
Event Timeline
Log In to Comment