Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jun 2021 06:48:43 GMT
From:      Oskar Holmlund <oh@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: ac6dcaf8f4c4 - main - arm: TI am335x ehrpwm fix bitmask
Message-ID:  <202106140648.15E6mhl6067193@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by oh:

URL: https://cgit.FreeBSD.org/src/commit/?id=ac6dcaf8f4c41c20d5e5097afadaab18ec62f220

commit ac6dcaf8f4c41c20d5e5097afadaab18ec62f220
Author:     Oskar Holmlund <oh@FreeBSD.org>
AuthorDate: 2021-06-14 08:38:06 +0000
Commit:     Oskar Holmlund <oh@FreeBSD.org>
CommitDate: 2021-06-14 08:38:06 +0000

    arm: TI am335x ehrpwm fix bitmask
    
    Bitfield HSPCLKDIV and CLKDIV are 3 bit wide.
    Chapter 15.2.4.1 https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf
    
    Approved by: manu (mentor)
    Reported by: Stefan Forsberg
    Differential revision: https://reviews.freebsd.org/D30746
---
 sys/arm/ti/am335x/am335x_ehrpwm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/arm/ti/am335x/am335x_ehrpwm.c b/sys/arm/ti/am335x/am335x_ehrpwm.c
index 47a86aee8dcb..49d0c01ca5f4 100644
--- a/sys/arm/ti/am335x/am335x_ehrpwm.c
+++ b/sys/arm/ti/am335x/am335x_ehrpwm.c
@@ -83,9 +83,9 @@ __FBSDID("$FreeBSD$");
 #define		TBCTL_PHDIR_UP		(1 << 13)
 #define		TBCTL_PHDIR_DOWN	(0 << 13)
 #define		TBCTL_CLKDIV(x)		((x) << 10)
-#define		TBCTL_CLKDIV_MASK	(3 << 10)
+#define		TBCTL_CLKDIV_MASK	(7 << 10)
 #define		TBCTL_HSPCLKDIV(x)	((x) << 7)
-#define		TBCTL_HSPCLKDIV_MASK	(3 << 7)
+#define		TBCTL_HSPCLKDIV_MASK	(7 << 7)
 #define		TBCTL_SYNCOSEL_DISABLED	(3 << 4)
 #define		TBCTL_PRDLD_SHADOW	(0 << 3)
 #define		TBCTL_PRDLD_IMMEDIATE	(1 << 3)



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