git: 8c9bdaf227b1 - main - rk3328_codec: fix a problem with the enable value
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 06 Nov 2021 17:52:19 UTC
The branch main has been updated by avg:
URL: https://cgit.FreeBSD.org/src/commit/?id=8c9bdaf227b1b83279ff76446e5fc226e19088d0
commit 8c9bdaf227b1b83279ff76446e5fc226e19088d0
Author: Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2021-06-09 07:51:00 +0000
Commit: Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2021-11-06 17:51:14 +0000
rk3328_codec: fix a problem with the enable value
The previous value contained only the mask bit ("twice"),
but not the value bit.
While here, make a couple of lines a little bit prettier.
MFC after: 1 month
---
sys/arm64/rockchip/rk3328_codec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/arm64/rockchip/rk3328_codec.c b/sys/arm64/rockchip/rk3328_codec.c
index 940b3b8bb9e8..c2ffe1e8089f 100644
--- a/sys/arm64/rockchip/rk3328_codec.c
+++ b/sys/arm64/rockchip/rk3328_codec.c
@@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$");
#define SOC_CON10_GPIOMUT (1 << 1)
#define SOC_CON10_GPIOMUT_MASK ((1 << 1) << 16)
#define SOC_CON10_GPIOMUT_EN (1 << 0)
-#define SOC_CON10_GPIOMUT_EN_MASK ((1 << 0) << 16)
+#define SOC_CON10_GPIOMUT_EN_MASK ((1 << 0) << 16)
#define CODEC_RESET 0x00
#define RESET_DIG_CORE_RST (1 << 1)
@@ -247,10 +247,10 @@ rkcodec_attach(device_t dev)
return (ENXIO);
}
- val = SOC_CON2_I2S_ACODEC_EN_MASK | (SOC_CON2_I2S_ACODEC_EN << 16);
+ val = SOC_CON2_I2S_ACODEC_EN | SOC_CON2_I2S_ACODEC_EN_MASK;
SYSCON_WRITE_4(sc->grf, GRF_SOC_CON2, val);
- val = 0 | (SOC_CON10_GPIOMUT_EN << 16);
+ val = 0 | SOC_CON10_GPIOMUT_EN_MASK;
SYSCON_WRITE_4(sc->grf, GRF_SOC_CON10, val);
error = clk_get_by_ofw_name(dev, 0, "pclk", &sc->pclk);