Date: Sat, 6 Nov 2021 17:52:19 GMT From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 8c9bdaf227b1 - main - rk3328_codec: fix a problem with the enable value Message-ID: <202111061752.1A6HqJbV030366@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111061752.1A6HqJbV030366>