git: 5d1a2edeec2e - main - rk_i2s: modify GRF_SOC_CON8 only for rk3399

From: Andriy Gapon <avg_at_FreeBSD.org>
Date: Sat, 06 Nov 2021 17:52:20 UTC
The branch main has been updated by avg:

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

commit 5d1a2edeec2eb8221b42a7c887f9b2b8e0a17423
Author:     Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2021-06-09 08:02:36 +0000
Commit:     Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2021-11-06 17:51:36 +0000

    rk_i2s: modify GRF_SOC_CON8 only for rk3399
    
    The register definition has nothing to do with, e.g., rk3328.
    
    MFC after:      1 month
---
 sys/arm64/rockchip/rk_i2s.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/arm64/rockchip/rk_i2s.c b/sys/arm64/rockchip/rk_i2s.c
index 8f53d8581d5c..52f80789a795 100644
--- a/sys/arm64/rockchip/rk_i2s.c
+++ b/sys/arm64/rockchip/rk_i2s.c
@@ -195,7 +195,7 @@ rk_i2s_init(struct rk_i2s_softc *sc)
 	val |= I2S_INTCR_RFT(FIFO_SIZE/2);
 	RK_I2S_WRITE_4(sc, I2S_INTCR, val);
 
-	if (sc->grf) {
+	if (sc->grf && ofw_bus_is_compatible(sc->dev, "rockchip,rk3399-i2s")) {
 		val = (I2S_IO_2CH_OUT_8CH_IN << I2S_IO_DIRECTION_SHIFT);
 		val |= (I2S_IO_DIRECTION_MASK << I2S_IO_DIRECTION_SHIFT) << 16;
 		SYSCON_WRITE_4(sc->grf, GRF_SOC_CON8, val);