From patchwork Sat Jul 29 14:17:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Code Kipper X-Patchwork-Id: 9869985 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 F1EAB6038F for ; Sat, 29 Jul 2017 14:20:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4E5C28916 for ; Sat, 29 Jul 2017 14:20:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE20128723; Sat, 29 Jul 2017 14:20:32 +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=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4060288CE for ; Sat, 29 Jul 2017 14:20:11 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 6805C26766A; Sat, 29 Jul 2017 16:18:07 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 18D74266E25; Sat, 29 Jul 2017 16:18:04 +0200 (CEST) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by alsa0.perex.cz (Postfix) with ESMTP id A388B266E15 for ; Sat, 29 Jul 2017 16:18:01 +0200 (CEST) Received: by mail-lf0-f66.google.com with SMTP id d80so10163005lfg.1 for ; Sat, 29 Jul 2017 07:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=znmWH32pqmaxnHT/7LK6ML0b2esH+D4rHG9OOs1Yi0U=; b=fo1xprOK+eGrzB2hNVpfrMrSfYEom6Wb4XVNLTLgPFrJkIEHQoAk9TASbtTYHKhMrc +num/DZUZz3j3+gdmZMHTRsqOFPOb5UW6q2wwiyV8V+Y1iI5yuXsSWaC/4Ux/jSmVMHt zbfX16yFFvSnRw3EAoax4vwsJWXJTWW/tN3Mqyy7DAGfxYy7ZLVv/9VTfiqn0/lUPoJX gRvK+PHBu9T/Wr68mW7lcGGBgTwhPvLY1Oatizm0TeH9PCUGHqDuxFuIFFu6Xc+hmfS6 XG/sBwcTfhKw/AqS/80647TY4IyLdwLkkxZTsC+3LXtzz98IkBeApe0AOypGOjD760sf sK0g== 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:in-reply-to :references; bh=znmWH32pqmaxnHT/7LK6ML0b2esH+D4rHG9OOs1Yi0U=; b=j7ge8oRAXVqyBS2GhQ2xEOg52+JsuC3m/PCK3L8ZSOR0zdyq8FkHg5oCGCxv5238Kv Y5vQIPzzzK266TDnMzSmeikLVTegogZuV1PGc522Prt995mEfC8aK15MRDnggGTPoscJ 6P2Ssc6uHGbYXl03xaeTUUsreyvG+p2QUJwy7v8h3aYSP+7nZCRkJBD9/lyzERKw4U+z Ic/Fzgyt9yomXOKVOpLDSqHZ5GYZGWVxyrpBqBr6mp3HcmNHZ7/JSkMWgbL/qfTlSMPE eFygvB+7BW3jkxE+rJCVIoNKUupxLMfF/rT+6KtCnNNWwLUt6ssm5dm5XtxNWqA6MiFK SgiQ== X-Gm-Message-State: AIVw111dBYaDqJ3Z3fvqpNc+9aMYhciVcJQRSfrrCYTqXL57EJ+/HaqL ZtcrCtTJCf7Jrg== X-Received: by 10.25.21.204 with SMTP id 73mr3121354lfv.241.1501337881241; Sat, 29 Jul 2017 07:18:01 -0700 (PDT) Received: from localhost.localdomain (c80-217-9-219.bredband.comhem.se. [80.217.9.219]) by smtp.gmail.com with ESMTPSA id s189sm4581958lja.77.2017.07.29.07.18.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Jul 2017 07:18:00 -0700 (PDT) From: codekipper@gmail.com To: maxime.ripard@free-electrons.com Date: Sat, 29 Jul 2017 16:17:45 +0200 Message-Id: <20170729141753.20174-5-codekipper@gmail.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170729141753.20174-1-codekipper@gmail.com> References: <20170729141753.20174-1-codekipper@gmail.com> 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 Subject: [alsa-devel] [PATCH v3 04/12] ASoC: sun4i-i2s: Add TX FIFO offset to quirks X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marcus Cooper It has been seen that the newer SoCs have a different TX FIFO address. Add this to the quirks structure. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai --- sound/soc/sunxi/sun4i-i2s.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index 73e991f5a81e..2a25df22c2f8 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -94,12 +94,14 @@ * struct sun4i_i2s_quirks - Differences between SoC variants. * * @has_reset: SoC needs reset deasserted. + * @reg_offset_txdata: offset of the tx fifo. * @sun4i_i2s_regmap: regmap config to use. * @mclk_offset: Value by which mclkdiv needs to be adjusted. * @bclk_offset: Value by which bclkdiv needs to be adjusted. */ struct sun4i_i2s_quirks { bool has_reset; + unsigned int reg_offset_txdata; /* TX FIFO */ const struct regmap_config *sun4i_i2s_regmap; unsigned int mclk_offset; unsigned int bclk_offset; @@ -673,11 +675,13 @@ static int sun4i_i2s_runtime_suspend(struct device *dev) static const struct sun4i_i2s_quirks sun4i_a10_i2s_quirks = { .has_reset = false, + .reg_offset_txdata = SUN4I_I2S_FIFO_TX_REG, .sun4i_i2s_regmap = &sun4i_i2s_regmap_config, }; static const struct sun4i_i2s_quirks sun6i_a31_i2s_quirks = { .has_reset = true, + .reg_offset_txdata = SUN4I_I2S_FIFO_TX_REG, .sun4i_i2s_regmap = &sun4i_i2s_regmap_config, }; @@ -746,7 +750,8 @@ static int sun4i_i2s_probe(struct platform_device *pdev) } } - i2s->playback_dma_data.addr = res->start + SUN4I_I2S_FIFO_TX_REG; + i2s->playback_dma_data.addr = res->start + + i2s->variant->reg_offset_txdata; i2s->playback_dma_data.maxburst = 8; i2s->capture_dma_data.addr = res->start + SUN4I_I2S_FIFO_RX_REG;