d1: add new target
[openwrt/staging/mans0n.git] / target / linux / d1 / patches-6.1 / 0073-ASoC-sun4i-spdif-Add-support-for-separate-resets.patch
1 From c2b3f2c723e1b558afe5661bb91669e3b68154f7 Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Sun, 13 Jun 2021 23:52:47 -0500
4 Subject: [PATCH 073/117] ASoC: sun4i-spdif: Add support for separate resets
5
6 Signed-off-by: Samuel Holland <samuel@sholland.org>
7 ---
8 sound/soc/sunxi/sun4i-spdif.c | 5 +++--
9 1 file changed, 3 insertions(+), 2 deletions(-)
10
11 --- a/sound/soc/sunxi/sun4i-spdif.c
12 +++ b/sound/soc/sunxi/sun4i-spdif.c
13 @@ -28,10 +28,11 @@
14 #include <sound/soc.h>
15
16 #define SUN4I_SPDIF_CTL (0x00)
17 + #define SUN4I_SPDIF_CTL_RST_RX BIT(12)
18 #define SUN4I_SPDIF_CTL_MCLKDIV(v) ((v) << 4) /* v even */
19 #define SUN4I_SPDIF_CTL_MCLKOUTEN BIT(2)
20 #define SUN4I_SPDIF_CTL_GEN BIT(1)
21 - #define SUN4I_SPDIF_CTL_RESET BIT(0)
22 + #define SUN4I_SPDIF_CTL_RST_TX BIT(0)
23
24 #define SUN4I_SPDIF_TXCFG (0x04)
25 #define SUN4I_SPDIF_TXCFG_SINGLEMOD BIT(31)
26 @@ -196,7 +197,7 @@ static void sun4i_spdif_configure(struct
27 const struct sun4i_spdif_quirks *quirks = host->quirks;
28
29 /* soft reset SPDIF */
30 - regmap_write(host->regmap, SUN4I_SPDIF_CTL, SUN4I_SPDIF_CTL_RESET);
31 + regmap_write(host->regmap, SUN4I_SPDIF_CTL, SUN4I_SPDIF_CTL_RST_TX);
32
33 /* flush TX FIFO */
34 regmap_update_bits(host->regmap, SUN4I_SPDIF_FCTL,