Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp183656pxv; Wed, 14 Jul 2021 01:19:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZ0u0kcKIX8yLpP8tbtBgi705Knra/6FnOb7RZDj3lPAcAA7slFDv8ZsgvKAct7q1uscgs X-Received: by 2002:a05:6402:1bd0:: with SMTP id ch16mr11847670edb.215.1626250773107; Wed, 14 Jul 2021 01:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626250773; cv=none; d=google.com; s=arc-20160816; b=iOT1fdnkXfUaYaTLL2v2BA2KQSauXRml8QQ05jhL5hNljM/3LILs1CfEmOKJ+pPO18 kvBPS+OA14/InNAh2AK60rn+xliaCNnSwaoKXsqJx2PmK+w4BPyu1TMc/JdF8Zm/DyD8 hEsoQwYI0+B8SgCQwihfQGAN28mLC+OzyzcZNzC1TDnWbHsTKvY11d+2naiDlVT05kz2 YYzb9qeDSKjsxj3wR5LJgIyIJYAd3hgEpoGVhOkWDzMvV+gwXasKKBYeapiYNgDfaUzd XLoMRbvtP9eW5qAeX74lVkxPHQJXt555RO7+klzsUgd2x0d9ajUlCfx6z/jEELrrdn8D r2Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=iEVfW2fURERtBfwm2SwMqi8oOBqUFRGFhTU+ADV3Z8g=; b=v7c/FoBc6FVwJYNaE4bOUThT+5dF4b/CCxYxT81CutASRSue5EVhC0kXvT+TTT8CS+ jnGjmSiQju480HWlXs3UBnVrDdPckRn2xH5i//k8G7xS4hE7QTLME7BJW3piYldvgiRp 1tz41Hf8fKy9INL2qiBbjhlJGafAiphPK3fMbSqvPVXzzhhcSxkZWxBLAmYwT5t61Czn SfNNufnRfAkrhXe7JoCo5HiLRtvNloKZcbg8JNQTUjhMuUvIlzd1Y2Ld4hfP2gPXayxN f0Ziz1c893erYQ5O1ffSCUdAI73YqWIK2zF+3Sti9zVtYFVyPK2YyudRTMUihSPjx/za BB2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gn9si1798697ejc.136.2021.07.14.01.19.09; Wed, 14 Jul 2021 01:19:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238450AbhGNIVG (ORCPT + 99 others); Wed, 14 Jul 2021 04:21:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229940AbhGNIVF (ORCPT ); Wed, 14 Jul 2021 04:21:05 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67A63C06175F for ; Wed, 14 Jul 2021 01:18:14 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3a5h-0005Hf-Ex; Wed, 14 Jul 2021 10:18:01 +0200 Message-ID: <152cb353c4c6fe66ba40c084cd62947967080011.camel@pengutronix.de> Subject: Re: [PATCH v16 09/12] dmaengine: imx-sdma: remove ERR009165 on i.mx6ul From: Lucas Stach To: Robin Gong , vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Wed, 14 Jul 2021 10:17:59 +0200 In-Reply-To: <1626258052-22198-10-git-send-email-yibin.gong@nxp.com> References: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> <1626258052-22198-10-git-send-email-yibin.gong@nxp.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.3 (3.40.3-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mittwoch, dem 14.07.2021 um 18:20 +0800 schrieb Robin Gong: > ECSPI issue fixed from i.mx6ul at hardware level, no need > ERR009165 anymore on those chips such as i.mx8mq. > > Signed-off-by: Robin Gong > Acked-by: Vinod Koul Reviewed-by: Lucas Stach > --- > drivers/dma/imx-sdma.c | 26 ++++++++++++++++++++++++-- > 1 file changed, 24 insertions(+), 2 deletions(-) > > diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c > index 5969df8..cfcd413 100644 > --- a/drivers/dma/imx-sdma.c > +++ b/drivers/dma/imx-sdma.c > @@ -476,6 +476,13 @@ struct sdma_driver_data { > int num_events; > struct sdma_script_start_addrs *script_addrs; > bool check_ratio; > + /* > + * ecspi ERR009165 fixed should be done in sdma script > + * and it has been fixed in soc from i.mx6ul. > + * please get more information from the below link: > + * https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf > + */ > + bool ecspi_fixed; > }; > > struct sdma_engine { > @@ -596,6 +603,13 @@ static struct sdma_driver_data sdma_imx6q = { > .script_addrs = &sdma_script_imx6q, > }; > > +static struct sdma_driver_data sdma_imx6ul = { > + .chnenbl0 = SDMA_CHNENBL0_IMX35, > + .num_events = 48, > + .script_addrs = &sdma_script_imx6q, > + .ecspi_fixed = true, > +}; > + > static struct sdma_script_start_addrs sdma_script_imx7d = { > .ap_2_ap_addr = 644, > .uart_2_mcu_addr = 819, > @@ -629,6 +643,7 @@ static const struct of_device_id sdma_dt_ids[] = { > { .compatible = "fsl,imx31-sdma", .data = &sdma_imx31, }, > { .compatible = "fsl,imx25-sdma", .data = &sdma_imx25, }, > { .compatible = "fsl,imx7d-sdma", .data = &sdma_imx7d, }, > + { .compatible = "fsl,imx6ul-sdma", .data = &sdma_imx6ul, }, > { .compatible = "fsl,imx8mq-sdma", .data = &sdma_imx8mq, }, > { /* sentinel */ } > }; > @@ -948,8 +963,15 @@ static void sdma_get_pc(struct sdma_channel *sdmac, > break; > case IMX_DMATYPE_CSPI: > per_2_emi = sdma->script_addrs->app_2_mcu_addr; > - emi_2_per = sdma->script_addrs->mcu_2_ecspi_addr; > - sdmac->is_ram_script = true; > + > + /* Use rom script mcu_2_app if ERR009165 fixed */ > + if (sdmac->sdma->drvdata->ecspi_fixed) { > + emi_2_per = sdma->script_addrs->mcu_2_app_addr; > + } else { > + emi_2_per = sdma->script_addrs->mcu_2_ecspi_addr; > + sdmac->is_ram_script = true; > + } > + > break; > case IMX_DMATYPE_EXT: > case IMX_DMATYPE_SSI: