mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
[bhnd] fix mask for PMU control
This patch fixes typo which results in extra bits of PMU control register. PR: 217782 Submitted by: Svyatoslav <razmyslov at viva64.com> Found by: PVS-Studio
This commit is contained in:
parent
03f7f17878
commit
4c0fdc5a3d
1 changed files with 1 additions and 1 deletions
|
|
@ -2023,7 +2023,7 @@ bhnd_pmu1_pllinit0(struct bhnd_pmu_softc *sc, uint32_t xtal)
|
|||
|
||||
/* Write XtalFreq. Set the divisor also. */
|
||||
pmuctrl = BHND_PMU_READ_4(sc, BHND_PMU_CTRL);
|
||||
pmuctrl = ~(BHND_PMU_CTRL_ILP_DIV_MASK | BHND_PMU_CTRL_XTALFREQ_MASK);
|
||||
pmuctrl &= ~(BHND_PMU_CTRL_ILP_DIV_MASK | BHND_PMU_CTRL_XTALFREQ_MASK);
|
||||
pmuctrl |= BHND_PMU_SET_BITS(((xt->fref + 127) / 128) - 1,
|
||||
BHND_PMU_CTRL_ILP_DIV);
|
||||
pmuctrl |= BHND_PMU_SET_BITS(xt->xf, BHND_PMU_CTRL_XTALFREQ);
|
||||
|
|
|
|||
Loading…
Reference in a new issue