From patchwork Sat Aug 12 11:00:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Code Kipper X-Patchwork-Id: 9896983 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 69817603F9 for ; Sat, 12 Aug 2017 11:02:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AEA528C60 for ; Sat, 12 Aug 2017 11:02:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FB0928B67; Sat, 12 Aug 2017 11:02:13 +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 B08E828B67 for ; Sat, 12 Aug 2017 11:02:12 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 95671266EF9; Sat, 12 Aug 2017 13:01:13 +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 AC25A266BFD; Sat, 12 Aug 2017 13:01:10 +0200 (CEST) Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) by alsa0.perex.cz (Postfix) with ESMTP id 5F706266812 for ; Sat, 12 Aug 2017 13:01:08 +0200 (CEST) Received: by mail-lf0-f68.google.com with SMTP id y15so3706497lfd.5 for ; Sat, 12 Aug 2017 04:01:08 -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=sIc2BIPEe6KpUDUDo9g1zSPHTpPDTPx9qNSYJ+eUtBs=; b=s5o7SmAynLilw6abOU4x7VefiG1WFWtxBiaqHVfWWMLv1NPCZZRyV/2CBD8PIBKEd5 XuLCgoM5mcdSg9hMe4/lP6/I/9efLk0rWwX4ANQ4x4xZydAKwv/G4JhWg8RPWqc5GjfE Z6Z/LWRUeIqjISxlGC12Q4zQDrSPnjev0NC7sDahGvVEX4N4Naf88DOS95njLjxTZUZ1 OOly0RK3XXYhrbTkkHydRKsvkzjO66jO2zjhw5O5cRwAMdvsCdYUjV3ufpr+k+BwA5W7 OvDGlEYEInvP5M57PCvwMkofc4LGO14oEDOvOr7G32yriFV1f7Y4kzaX6jkyU1gmJ+Un Yzrg== 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=sIc2BIPEe6KpUDUDo9g1zSPHTpPDTPx9qNSYJ+eUtBs=; b=BjQQFFkEeiUBOPg3g2UmEOweZRm08l5gH7vgzDEMIXt67qapmvL765+OOIWLkAITU9 abeSNtNYSvuKwUazjZlWHtssno79AmapofUdNKozvcxhgQLFhAIisM83MTJ6h5cumGsY 8qnvutZYR/tvKmx93cdZJsTFwK/DFyzwusHVEvhJWFbusTNepwVfHfIOaI7FJ922xzQo SEDQx/wZvWO667W7DhO+ro6j3H6uUPUJ5Q4zUm0z1nYplAUi5xClCELywk+jMZRe61Qz M72PAYeru1DPgOFouDeCSzR1ZzJ6LO1qycEjaqWztb7k1bNtETIf2Xl+pFLqe8BrrB6I EGWQ== X-Gm-Message-State: AHYfb5gulKsVjdZLvbBgnqShiCrB4Hvii6nGfsUZQ8R27Be9tVNcNFP5 wjqstHPZYOFULA== X-Received: by 10.46.80.18 with SMTP id e18mr7028663ljb.23.1502535668077; Sat, 12 Aug 2017 04:01:08 -0700 (PDT) Received: from localhost.localdomain (c80-217-9-219.bredband.comhem.se. [80.217.9.219]) by smtp.gmail.com with ESMTPSA id h22sm432402ljb.41.2017.08.12.04.01.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Aug 2017 04:01:05 -0700 (PDT) From: codekipper@gmail.com To: maxime.ripard@free-electrons.com Date: Sat, 12 Aug 2017 13:00:51 +0200 Message-Id: <20170812110059.5115-4-codekipper@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170812110059.5115-1-codekipper@gmail.com> References: <20170812110059.5115-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 03/11] 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 f6f3c409f25e..dfb794ffff92 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; @@ -677,11 +679,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, }; @@ -750,7 +754,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;