From patchwork Thu Jan 12 16:45:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Code Kipper X-Patchwork-Id: 9513617 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F3AF8601E5 for ; Thu, 12 Jan 2017 16:45:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6045286D9 for ; Thu, 12 Jan 2017 16:45:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAAE4286DC; Thu, 12 Jan 2017 16:45:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A3F95286D9 for ; Thu, 12 Jan 2017 16:45:51 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cRiVa-0002GE-S6; Thu, 12 Jan 2017 16:45:50 +0000 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cRiVR-0001d4-LK for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2017 16:45:48 +0000 Received: by mail-lf0-x242.google.com with SMTP id q89so2676347lfi.1 for ; Thu, 12 Jan 2017 08:45:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=NOeqGyLd0NjWdD1uQHFjsCepGh3u7a6uXlS4bjRuffc=; b=Mh4lVYLFH8K49bXEC1OJEugdxIcwYtbFwYxQDH47VHUKB3gWwhFLjN+cD49ecg0UwU 2o921pisib/+D6BkQquRlkFAiGV/KoRk9yEZHSNi5o+Xdk12gJvkt2UU1gYnh+KSwwFO jSJwWgDgm3NQQsMHpEPgtWQBSlOe2BwWO1urpRnTO/IyHbJV4KDTHU+h9nScr+Y44kYh /0s6LbM6k9z+2FxzSSuGbHklE2Y6fPFCC4wdCf4XCw2Z5hZVzhISrHT6/SjiQB60FWTC Fi7Im4U8KrK8/aMmBcWWu/H6GvuyJpK9gq//kD2WhbG5lV9OX5vnXxNUMcyjm7TrpZkE 5YXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NOeqGyLd0NjWdD1uQHFjsCepGh3u7a6uXlS4bjRuffc=; b=kHAfcCYGw9uM9As3k5FGSuzQsBM71SRvGdJhxgteM5S/GcAvpnwuoLo4BBNihEERiC rhA/NkE6gC1R9h5zfqkWHSDkLaO1fi/vy3G6YXynIfc9Esa8bGOJl3bySaNRw1Ool1AM xcBKWH40Ws9s3JcONArn8FyFd9R317wZ9cUAl3Y1Z/WgiwkUsj03u/GXtbOdN6pd2DPD XGvtHYpkloF6eVeE8npFAw3jC6exZ8+09QDx1EIxrFrkhJ6mddYNCtCGa+zr9ZMWDdm8 iylkp7pgEp+JUKUsO7bOZkATiCTIy3qUGthxgh6JbSlfOmIaAlgabXyeBj8BaBbEE+eD t72g== X-Gm-Message-State: AIkVDXL0FdyHtUei8YYxIflCu9rgH5Zv6K/4QWP6H4ip+FVmStaSeWcvDsvQnaelCBG5fA== X-Received: by 10.25.207.196 with SMTP id f187mr5964500lfg.15.1484239517921; Thu, 12 Jan 2017 08:45:17 -0800 (PST) Received: from localhost.localdomain (c80-217-9-219.bredband.comhem.se. [80.217.9.219]) by smtp.gmail.com with ESMTPSA id u12sm2559717lja.19.2017.01.12.08.45.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 08:45:17 -0800 (PST) From: codekipper@gmail.com To: maxime.ripard@free-electrons.com Subject: [PATCH] ASoC: sun4i-spdif: Add support for the H3 SoC Date: Thu, 12 Jan 2017 17:45:16 +0100 Message-Id: <20170112164516.15877-1-codekipper@gmail.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170112_084541_971109_84828F64 X-CRM114-Status: GOOD ( 11.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, Marcus Cooper , lgirdwood@gmail.com, linux-kernel@vger.kernel.org, be17068@iperbole.bo.it, linux-sunxi@googlegroups.com, broonie@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marcus Cooper 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 Acked-by: Maxime Ripard --- sound/soc/sunxi/sun4i-spdif.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 @@ #define SUN4I_SPDIF_ISTA_RXOSTA BIT(1) #define SUN4I_SPDIF_ISTA_RXASTA BIT(0) +#define SUN8I_SPDIF_TXFIFO (0x20) + #define SUN4I_SPDIF_TXCNT (0x24) #define SUN4I_SPDIF_RXCNT (0x28) @@ -417,6 +419,11 @@ static const struct sun4i_spdif_quirks sun6i_a31_spdif_quirks = { .has_reset = true, }; +static const struct sun4i_spdif_quirks sun8i_h3_spdif_quirks = { + .reg_dac_txdata = SUN8I_SPDIF_TXFIFO, + .has_reset = true, +}; + static const struct of_device_id sun4i_spdif_of_match[] = { { .compatible = "allwinner,sun4i-a10-spdif", @@ -426,6 +433,10 @@ static const struct of_device_id sun4i_spdif_of_match[] = { .compatible = "allwinner,sun6i-a31-spdif", .data = &sun6i_a31_spdif_quirks, }, + { + .compatible = "allwinner,sun8i-h3-spdif", + .data = &sun8i_h3_spdif_quirks, + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, sun4i_spdif_of_match);