Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Mar 2017 18:57:18 +0000 (UTC)
From:      Michael Zhilin <mizhka@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r315324 - head/sys/dev/bhnd/cores/pmu
Message-ID:  <201703151857.v2FIvI7I095590@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mizhka
Date: Wed Mar 15 18:57:18 2017
New Revision: 315324
URL: https://svnweb.freebsd.org/changeset/base/315324

Log:
  [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

Modified:
  head/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c

Modified: head/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c
==============================================================================
--- head/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c	Wed Mar 15 18:23:32 2017	(r315323)
+++ head/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c	Wed Mar 15 18:57:18 2017	(r315324)
@@ -2023,7 +2023,7 @@ bhnd_pmu1_pllinit0(struct bhnd_pmu_softc
 
 	/* 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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703151857.v2FIvI7I095590>