From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C2BFC4167B for ; Mon, 12 Dec 2022 12:57:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232412AbiLLM5I (ORCPT ); Mon, 12 Dec 2022 07:57:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232399AbiLLM5H (ORCPT ); Mon, 12 Dec 2022 07:57:07 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51E86FAE7 for ; Mon, 12 Dec 2022 04:57:06 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id jl24so11973086plb.8 for ; Mon, 12 Dec 2022 04:57:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=CELbTlwFp87wl7bxggIsIf62V1a0MEPUVNJySL6sh4g=; b=vvF+j1oNR+EuMz/CdeTCYmJ0xO7ITp2aWZ/59uFCy3EQl/Y6lA7mrdri94n0vv8bmU eu8ms3Dt1861vOO4ETpCLVRyf4HLpvPNAF1wBkZtgd3EG6KipX+dvqzOmEdOtPxCzCcq SQfJRTwB44b6md0belT+W/1jSGkpO+lxpkTmAB0PbHBnuwwB4/XagzQ7uwWy8UnShxXQ Z8D0h+GYxleYc9vT04jdnoMbm9ZLXzIUAqKoeLdF/1UcVkyPL/LSpqkVqfzcUqbFw/Px +rC2OJsB3Ox815U6v4RG/iis0w5QVyyADgjBwj2iPGGYCvatZo2Bld5VB75eX54I3qeA NCOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CELbTlwFp87wl7bxggIsIf62V1a0MEPUVNJySL6sh4g=; b=edfpzWtobDZ58ReVH+gBZW5UFVPjQHDYzzS/I5sIoBjF9dkC1U1llXcBUE2J3iDOAw y/GwZxyzJ7/6U9/ilFelMHfITCd1eqwb7zOH+NMMAhF/f/x98XCXjzqXvZvQn6HaL0iV ftMCCEdQMY/+bPQbWBC/XSCA87bC+MsZd1O3k8WlQMXfYDSgMcDwxRE3lSIO4BQV2Hso Zk/Vx6FDdtZLlYEBawb7mtR1qiVF7zJ+LqKY4AF8SaqfRyCQdP0FOxUmsbCuUi62Ej5/ trUOwnT/frHLviV/kxu1CLgymKBpxQGi8CHxcJsmCx/S3J/uHefhjGHdu0rXyYsjibXB kW2w== X-Gm-Message-State: ANoB5plrBKltGf4as/G964iR0YNfrSMU2k7cc/zR1twgN0C8O9bObCnB Co+1M8gzlsiNCAYfBKxVJ9CY5QJjpYQUKv0= X-Google-Smtp-Source: AA0mqf5sFNxTahjCUzcoxuTmNba9WUk1OqF5FDvHjL3I9YROradJGvubUSpoWlAJzBAmQ5cSBL9u8g== X-Received: by 2002:a17:90a:1b0b:b0:219:396c:9e32 with SMTP id q11-20020a17090a1b0b00b00219396c9e32mr16732121pjq.16.1670849825786; Mon, 12 Dec 2022 04:57:05 -0800 (PST) Received: from thinkpad ([220.158.159.33]) by smtp.gmail.com with ESMTPSA id mv10-20020a17090b198a00b002135e8074b1sm5384030pjb.55.2022.12.12.04.57.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 04:57:04 -0800 (PST) Date: Mon, 12 Dec 2022 18:26:58 +0530 From: Manivannan Sadhasivam To: Serge Semin Cc: Frank Li , Yoshihiro Shimoda , "lpieralisi@kernel.org" , "robh+dt@kernel.org" , "kw@linux.com" , "bhelgaas@google.com" , "krzk+dt@kernel.org" , "marek.vasut+renesas@gmail.com" , "linux-pci@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , "Sergey.Semin@baikalelectronics.ru" Subject: Re: [EXT] RE: [PATCH v7 5/9] PCI: dwc: Avoid reading a register to detect whether eDMA exists Message-ID: <20221212125658.GD20655@thinkpad> References: <20221128115908.awhznkkrelk7h3nm@mobilestation> <20221128161114.deacldwbckfnn6ft@mobilestation> <20221208140111.7phlnsxktxzsc55f@mobilestation> <20221211152849.y2dcxpc2teervlcl@mobilestation> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221211152849.y2dcxpc2teervlcl@mobilestation> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Serge, On Sun, Dec 11, 2022 at 06:28:49PM +0300, Serge Semin wrote: > Hi Frank > > On Fri, Dec 09, 2022 at 03:52:42PM +0000, Frank Li wrote: > > Hi Serge, > > > > > From: Serge Semin, Sent: Thursday, December 8, 2022 11:01 PM > > > > > > Cc += Frank Li > > > > > > @Frank could you have a look at the thread and check the content of > > > the CSRs dbi+0x8f8 and dbi+0x978 on available to you DW PCIe +EDMA > > > devices? > > > > > [ 2.598038] imx6q-pcie 5f010000.pcie_ep: imx_add_pcie_ep: +0x8f8 = 3438302a, +0x978 = 00010001 > > Thanks for the reply. So it's 4.80a with the legacy viewport-based > access. Alas it isn't what we need in this thread. We'll need > @Mani's respond in order to decide how to fix the auto-detection > procedure. > Sorry for the late reply! With below diff on the EP: diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c index 6f3805228a18..0eb4d3218738 100644 --- a/drivers/pci/controller/dwc/pcie-designware.c +++ b/drivers/pci/controller/dwc/pcie-designware.c @@ -665,6 +665,10 @@ static int dw_pcie_edma_find_chip(struct dw_pcie *pci) if (val == 0xFFFFFFFF && pci->edma.reg_base) { pci->edma.mf = EDMA_MF_EDMA_UNROLL; + dev_info(pci->dev, "%s: +0x8f8 = %08x, +0x978 = %08x\n", __func__, + dw_pcie_readl_dbi(pci, 0x8f8), + dw_pcie_readl_dbi(pci, 0x978)); + val = dw_pcie_readl_dma(pci, PCIE_DMA_CTRL); } else if (val != 0xFFFFFFFF) { pci->edma.mf = EDMA_MF_EDMA_LEGACY; The output was: qcom-pcie-ep 1c08000.pcie-ep: dw_pcie_edma_find_chip: +0x8f8 = 3533302a, +0x978 = ffffffff Hope this helps! Thanks, Mani > -Serge(y) > > > > > Frank Li > > > > -- மணிவண்ணன் சதாசிவம்