Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp172235iog; Fri, 17 Jun 2022 01:03:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uwrbn46YNrjL1P/vNfVeLMuks3t/CyIYv10uFRA4lZRiMgi6Lj2xlxnhCbwOg0ZZU6BfsL X-Received: by 2002:a17:906:6485:b0:712:10cd:e3b7 with SMTP id e5-20020a170906648500b0071210cde3b7mr7830672ejm.557.1655453038317; Fri, 17 Jun 2022 01:03:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655453038; cv=none; d=google.com; s=arc-20160816; b=wAiHpncbJGeTjLrtccj7KZPBkckVIw3I1AfAMNgyNocLIrQ4CqMlmP8WwQCqpdfu6f NZR0Z3nBxBoyuYKRUJtudcwo+G7Lg0jUbsOaqfBhc5vRCzZjoM0/5kNI4bqE4OEhVd55 fBs1ySTiVAM5Sa4TCHwhsOmZ9nUeyJLAozvhu1mabsgdB1K2aST4Zn0rIuYHlRR34lvF 46/hs8VlfcBpxIs7+fvdNzoxvfjbHqlqyXh/6fhrFsNhCCozd36B/9AT8vA56kfHyW16 QSlRSRecd0a5cVOzm8K8t82s5eSVU+a05sr+74oGTrSXyTTURhyZlZY4OwUOJKZmNcIH wmYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=Ba5MmkP91opaVlf/Y4y1yIkEHYYO0SIXif4eSzntvLo=; b=EkdBytnjf87oh/YF91RiVRuUWriL5XEh2xrWUzdURr/v8iHlb+scrDr8Pn875Imy5L HwnjHaQmzPsaGa2dSgxm+DxOCJZk3o/Ep1ci/xi8DErd/gtAkpqEDrjzkcTvb4XtvPNx Wn45v3QiyXspAjwwg4hm0s0KrNsQpRdKGbUkL9J6tQvaZ6U25N1wx66vkhWHdWTLCG/u ko+QnfpVMEqrOaeW2MIUy33bERsnl79ml95yUT6/pe6jaYzBVCUkS4/iFymX4b9IC/jY hnZWbKnNyEv+hzZXPBcOrPsUpdtXw+0hExgd2ZhSdGVubV+6KQIsa05s5cLUQMe6nu0s 3OEw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sh7-20020a1709076e8700b007122a9999f4si1608281ejc.748.2022.06.17.01.03.30; Fri, 17 Jun 2022 01:03:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380759AbiFQH7h (ORCPT + 99 others); Fri, 17 Jun 2022 03:59:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380719AbiFQH7X (ORCPT ); Fri, 17 Jun 2022 03:59:23 -0400 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1B885BD3C; Fri, 17 Jun 2022 00:59:22 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B133E201FB3; Fri, 17 Jun 2022 09:59:21 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 67C92201F99; Fri, 17 Jun 2022 09:59:21 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 842991820F45; Fri, 17 Jun 2022 15:59:19 +0800 (+08) From: Shengjiu Wang To: nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, shengjiu.wang@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, robh+dt@kernel.org, krzk+dt@kernel.org, devicetree@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/7] ASoC: fsl_sai: Make res a member of struct fsl_sai Date: Fri, 17 Jun 2022 15:44:35 +0800 Message-Id: <1655451877-16382-6-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1655451877-16382-1-git-send-email-shengjiu.wang@nxp.com> References: <1655451877-16382-1-git-send-email-shengjiu.wang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The resource info need to be accessed by hw_params() function for multi fifo case, the start address may be not the FIFO0. So move it to be a member of struct fsl_sai. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_sai.c | 7 +++---- sound/soc/fsl/fsl_sai.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index ddfe28cb7df0..86aa0baba848 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -1077,7 +1077,6 @@ static int fsl_sai_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct fsl_sai *sai; struct regmap *gpr; - struct resource *res; void __iomem *base; char tmp[8]; int irq, ret, i; @@ -1092,7 +1091,7 @@ static int fsl_sai_probe(struct platform_device *pdev) sai->is_lsb_first = of_property_read_bool(np, "lsb-first"); - base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); + base = devm_platform_get_and_ioremap_resource(pdev, 0, &sai->res); if (IS_ERR(base)) return PTR_ERR(base); @@ -1192,8 +1191,8 @@ static int fsl_sai_probe(struct platform_device *pdev) MCLK_DIR(index)); } - sai->dma_params_rx.addr = res->start + FSL_SAI_RDR0; - sai->dma_params_tx.addr = res->start + FSL_SAI_TDR0; + sai->dma_params_rx.addr = sai->res->start + FSL_SAI_RDR0; + sai->dma_params_tx.addr = sai->res->start + FSL_SAI_TDR0; sai->dma_params_rx.maxburst = FSL_SAI_MAXBURST_RX; sai->dma_params_tx.maxburst = FSL_SAI_MAXBURST_TX; diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h index c0b6bc42fc3c..4d657edc9c9f 100644 --- a/sound/soc/fsl/fsl_sai.h +++ b/sound/soc/fsl/fsl_sai.h @@ -258,6 +258,7 @@ struct fsl_sai { struct regmap *regmap; struct clk *bus_clk; struct clk *mclk_clk[FSL_SAI_MCLK_MAX]; + struct resource *res; bool is_consumer_mode; bool is_lsb_first; -- 2.17.1