summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMarcus Cooper <codekipper@gmail.com>2017-01-19 14:52:58 -0500
committerMark Brown <broonie@kernel.org>2017-01-20 08:04:17 -0500
commit1bd92af877abfeddcc4b83a35482ed4139591acf (patch)
tree186df7ffddf826905f1f299aa10b3f4e68a8ee97 /sound
parentcb5c978f9a56c459d5f13901efcfe44b97c4182d (diff)
ASoC: sun4i-spdif: Add support for the H3 SoC
The H3 SoC uses the same SPDIF block as found in earlier SoCs, but its TXFIFO is mapped to another address. Signed-off-by: Marcus Cooper <codekipper@gmail.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/sunxi/sun4i-spdif.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c
index fec62ee1fc72..c03cd07a9b19 100644
--- a/sound/soc/sunxi/sun4i-spdif.c
+++ b/sound/soc/sunxi/sun4i-spdif.c
@@ -103,6 +103,8 @@
103 #define SUN4I_SPDIF_ISTA_RXOSTA BIT(1) 103 #define SUN4I_SPDIF_ISTA_RXOSTA BIT(1)
104 #define SUN4I_SPDIF_ISTA_RXASTA BIT(0) 104 #define SUN4I_SPDIF_ISTA_RXASTA BIT(0)
105 105
106#define SUN8I_SPDIF_TXFIFO (0x20)
107
106#define SUN4I_SPDIF_TXCNT (0x24) 108#define SUN4I_SPDIF_TXCNT (0x24)
107 109
108#define SUN4I_SPDIF_RXCNT (0x28) 110#define SUN4I_SPDIF_RXCNT (0x28)
@@ -417,6 +419,11 @@ static const struct sun4i_spdif_quirks sun6i_a31_spdif_quirks = {
417 .has_reset = true, 419 .has_reset = true,
418}; 420};
419 421
422static const struct sun4i_spdif_quirks sun8i_h3_spdif_quirks = {
423 .reg_dac_txdata = SUN8I_SPDIF_TXFIFO,
424 .has_reset = true,
425};
426
420static const struct of_device_id sun4i_spdif_of_match[] = { 427static const struct of_device_id sun4i_spdif_of_match[] = {
421 { 428 {
422 .compatible = "allwinner,sun4i-a10-spdif", 429 .compatible = "allwinner,sun4i-a10-spdif",
@@ -426,6 +433,10 @@ static const struct of_device_id sun4i_spdif_of_match[] = {
426 .compatible = "allwinner,sun6i-a31-spdif", 433 .compatible = "allwinner,sun6i-a31-spdif",
427 .data = &sun6i_a31_spdif_quirks, 434 .data = &sun6i_a31_spdif_quirks,
428 }, 435 },
436 {
437 .compatible = "allwinner,sun8i-h3-spdif",
438 .data = &sun8i_h3_spdif_quirks,
439 },
429 { /* sentinel */ } 440 { /* sentinel */ }
430}; 441};
431MODULE_DEVICE_TABLE(of, sun4i_spdif_of_match); 442MODULE_DEVICE_TABLE(of, sun4i_spdif_of_match);