Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218485/?format=api
{ "id": 2218485, "url": "http://patchwork.ozlabs.org/api/patches/2218485/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260401-pcie-intel-gw-v3-6-63b008c5b7b2@dev.tdt.de/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api", "name": "Linux PCI development", "link_name": "linux-pci", "list_id": "linux-pci.vger.kernel.org", "list_email": "linux-pci@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260401-pcie-intel-gw-v3-6-63b008c5b7b2@dev.tdt.de>", "list_archive_url": null, "date": "2026-04-01T09:31:42", "name": "[v3,6/7] PCI: intel-gw: Move driver atu base assignment to probe function", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "447486d5f8bc669019705bea3bb3d9fd4975e4f4", "submitter": { "id": 72238, "url": "http://patchwork.ozlabs.org/api/people/72238/?format=api", "name": "Florian Eckert", "email": "fe@dev.tdt.de" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260401-pcie-intel-gw-v3-6-63b008c5b7b2@dev.tdt.de/mbox/", "series": [ { "id": 498301, "url": "http://patchwork.ozlabs.org/api/series/498301/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=498301", "date": "2026-04-01T09:31:36", "name": "PCI: intel-gw: Fixes to make the driver working again", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/498301/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2218485/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2218485/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-51668-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-pci@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=temperror header.d=dev.tdt.de header.i=@dev.tdt.de header.a=rsa-sha256\n header.s=z1-selector1 header.b=kaQ4vWmu;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-51668-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=temperror (0-bit key) header.d=dev.tdt.de header.i=@dev.tdt.de\n header.b=\"kaQ4vWmu\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=194.37.255.70", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=dev.tdt.de", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=dev.tdt.de" ], "Received": [ "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fm0SX1g46z1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 20:44:28 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id BD8FC3159A83\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 1 Apr 2026 09:32:27 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id E46CF3D6CAC;\n\tWed, 1 Apr 2026 09:31:57 +0000 (UTC)", "from mxout70.expurgate.net (mxout70.expurgate.net [194.37.255.70])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 3981C3CF032;\n\tWed, 1 Apr 2026 09:31:54 +0000 (UTC)", "from [194.37.255.9] (helo=mxout.expurgate.net)\n\tby relay.expurgate.net with smtp (Exim 4.92)\n\t(envelope-from <prvs=65659f006e=fe@dev.tdt.de>)\n\tid 1w7rvM-001T0Q-Uz; Wed, 01 Apr 2026 11:31:45 +0200", "from [195.243.126.94] (helo=securemail.tdt.de)\n\tby relay.expurgate.net with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)\n\t(Exim 4.92)\n\t(envelope-from <fe@dev.tdt.de>)\n\tid 1w7rvM-00CBFL-DM; Wed, 01 Apr 2026 11:31:44 +0200", "from securemail.tdt.de (localhost [127.0.0.1])\n\tby securemail.tdt.de (Postfix) with ESMTP id 0CC90240036;\n\tWed, 1 Apr 2026 11:31:44 +0200 (CEST)", "from mail.dev.tdt.de (unknown [10.2.4.42])\n\tby securemail.tdt.de (Postfix) with ESMTP id 02315240040;\n\tWed, 1 Apr 2026 11:31:44 +0200 (CEST)", "from [10.2.3.40] (unknown [10.2.3.40])\n\tby mail.dev.tdt.de (Postfix) with ESMTPSA id B921B23C6F;\n\tWed, 1 Apr 2026 11:31:43 +0200 (CEST)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775035917; cv=none;\n b=TWj2U8hNV3xCWqTxWpCPgr1Tviy+KsBCQxLcf9SNbjck6nc1z7FOQVpk9RkaKpC8OBgZqTJZvk8tifLuzElpZy9KTT0axoOhABvLSQhilJiNeOgcAoKNUMGN8j6jGb/G+nY09Z639E0Kc+duy8zEyILwN2tHiFl6nxrkMy4KCRs=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775035917; c=relaxed/simple;\n\tbh=nvgQstFC/8C3uAxwX6l6w10NoGOWBnOys1OW4EEIVmI=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References:\n\t In-Reply-To:To:Cc;\n b=X2cAFN6wZQbUhUED8k0C6Vq0yuyT5/F5EAfyR5qXuiflMaVqh7YBdcW3m/63OFgL7sqBOAaxSMxb2tGZBg1JOE6Ae2Qb/0SvSK6fZnZnVtUu+0rf+9EuYDa+sTNN0g5GCON8Fm0Ujyn66gqnIUSEN2es6CL9FOApIxV13PcIIWo=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=dev.tdt.de;\n spf=pass smtp.mailfrom=dev.tdt.de;\n dkim=temperror (0-bit key) header.d=dev.tdt.de header.i=@dev.tdt.de\n header.b=kaQ4vWmu; arc=none smtp.client-ip=194.37.255.70", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev.tdt.de;\n\ts=z1-selector1; t=1775035904;\n\tbh=zKqMM7YfjGBHZcHoyCc72DeTKbYkA+Ky6K4OQtPbCik=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=kaQ4vWmuLNDUAQXOXmk89JgWVVYNM9R7aEtRqjkG4+R88x83er4656CELakt1xK0q\n\t fNfDbrFGdOxkTTAkfUvLCCoM4vYCDQ5KnQAzGKqnapaMlRuXflrio6WdhKZIXbsVid\n\t Sam4mpUWr22SrF3cE4R5c0gjT1timx6WCDXQLgB9WUQCrNySWIfkgvQoPgORkqtqZk\n\t wyrmqI8F2497vTNsGT+px97MV042LOtUBfWpKG9EBRVbqid/M97mXQ4cxssSrmw+T/\n\t r+dHXcop16JmGCGpOP33aqsqHaIkWcZdGmH46x26M+wMyW67YoTCOO9R751A2ivwhi\n\t hpyQX19RaxB6g==", "From": "Florian Eckert <fe@dev.tdt.de>", "Date": "Wed, 01 Apr 2026 11:31:42 +0200", "Subject": "[PATCH v3 6/7] PCI: intel-gw: Move driver atu base assignment to\n probe function", "Precedence": "bulk", "X-Mailing-List": "linux-pci@vger.kernel.org", "List-Id": "<linux-pci.vger.kernel.org>", "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Message-ID": "<20260401-pcie-intel-gw-v3-6-63b008c5b7b2@dev.tdt.de>", "References": "<20260401-pcie-intel-gw-v3-0-63b008c5b7b2@dev.tdt.de>", "In-Reply-To": "<20260401-pcie-intel-gw-v3-0-63b008c5b7b2@dev.tdt.de>", "To": "Lorenzo Pieralisi <lpieralisi@kernel.org>, =?utf-8?q?Krzysztof_Wilczy?=\n\t=?utf-8?q?=C5=84ski?= <kwilczynski@kernel.org>,\n Manivannan Sadhasivam <mani@kernel.org>, Rob Herring <robh@kernel.org>,\n Bjorn Helgaas <bhelgaas@google.com>, Johan Hovold <johan+linaro@kernel.org>,\n Sajid Dalvi <sdalvi@google.com>, Ajay Agarwal <ajayagarwal@google.com>,\n Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org>,\n Rahul Tanwar <rtanwar@maxlinear.com>", "Cc": "linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tdevicetree@vger.kernel.org, Florian Eckert <fe@dev.tdt.de>,\n\tEckert.Florian@googlemail.com, ms@dev.tdt.de", "X-Mailer": "b4 0.14.2", "X-Developer-Signature": "v=1; a=ed25519-sha256; t=1775035902; l=3975;\n i=fe@dev.tdt.de; s=20260205; h=from:subject:message-id;\n bh=Uirz/FKs+IwSVaGspwLzgInnY3C/WWrZXZmhIyMs3ww=;\n b=Jd98K2cRrkn4RSEm8cX9bkhkxxtSviuDs0QJhUoGiv2tzARq8fkFSRyRdICAdWJn4AD6usr7B\n Wy6UjdjsZ5xBu+GurJoRvAzsv/iS3AJR0qedRX04b8HeC7hymNs0rEQ", "X-Developer-Key": "i=fe@dev.tdt.de; a=ed25519;\n pk=q7Pvv3Au2sAVRhBz5UF7ZqUPNxUwXQ78Jdqu8E6Negk=", "Content-Transfer-Encoding": "quoted-printable", "X-purgate-type": "clean", "X-purgate": "clean", "X-purgate-ID": "151534::1775035904-4A7C8233-E0A53BA3/0/0" }, "content": "If no ATU resource is defined in the devicetree, then driver´s default\nvalue '0x300000' [1] is set. This is done during probing in the function\n'dw_pcie_get_resources()' [2] by dwc core.\n\nThe driver overwrites this again when its own init callback\n'pp->ops->init()' [3] function 'intel_pcie_host_setup()' [4] is called.\nThis is done, because the 'atu_base' value for this IP is '0xC0000'\nrather than '0x300000'.\n\ncallstack:\nintel_pcie_probe()\n dw_pcie_host_init()\n dw_pcie_host_get_resources()\n dw_pcie_get_resources() [2]\n pp->ops->init = intel_pcie_rc_init() [3]\n intel_pcie_host_setup() [4]\n\nHowever, this is a problem because, the callback 'pp->ops->init' is called\nafter 'dw_pcie_get_resources()' in dwc core (see callstack). The 'atu_base'\nmust be set before, so that this value is not set by dwc core. Therefor\nthe assignment of 'atu_base' is moved to driver´s probe function.\n\nWhile we’re at it, the change also adds the option to load ATU information\nfrom the device tree. For reasons of backwards compatibility, this is not\nmandatory. If ‘atu’ is still not specified in the devicetree, then driver’s\ndefault value is still used and set in driver´s probe function. If the 'atu'\nresource is present in the devicetree, then dwc core loads it via the\nfunction 'dw_pcie_get_resources()' and not in the driver´s probe function.\n\n[1] https://elixir.bootlin.com/linux/v6.19.10/source/drivers/pci/controller/dwc/pcie-designware.h#L292\n[2] https://elixir.bootlin.com/linux/v6.19.10/source/drivers/pci/controller/dwc/pcie-designware.c#L150\n[3] https://elixir.bootlin.com/linux/v6.19.10/source/drivers/pci/controller/dwc/pcie-designware-host.c#L589\n[4] https://elixir.bootlin.com/linux/v6.19.10/source/drivers/pci/controller/dwc/pcie-intel-gw.c#L301\n\nSigned-off-by: Florian Eckert <fe@dev.tdt.de>\n---\n drivers/pci/controller/dwc/pcie-intel-gw.c | 28 ++++++++++++++++++++++++++--\n 1 file changed, 26 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/pci/controller/dwc/pcie-intel-gw.c b/drivers/pci/controller/dwc/pcie-intel-gw.c\nindex afd933050c92ee31c477e0b1738ab1136bdcfbf6..59b11e45944e199aac0f599f96d6cc90e2104708 100644\n--- a/drivers/pci/controller/dwc/pcie-intel-gw.c\n+++ b/drivers/pci/controller/dwc/pcie-intel-gw.c\n@@ -310,8 +310,6 @@ static int intel_pcie_host_setup(struct intel_pcie *pcie)\n \t\tgoto clk_err;\n \t}\n \n-\tpci->atu_base = pci->dbi_base + 0xC0000;\n-\n \tret = phy_init(pcie->phy);\n \tif (ret)\n \t\tgoto phy_err;\n@@ -395,6 +393,7 @@ static int intel_pcie_probe(struct platform_device *pdev)\n \tstruct device *dev = &pdev->dev;\n \tstruct intel_pcie *pcie;\n \tstruct dw_pcie_rp *pp;\n+\tstruct resource *res;\n \tstruct dw_pcie *pci;\n \tint ret;\n \n@@ -419,6 +418,31 @@ static int intel_pcie_probe(struct platform_device *pdev)\n \tpci->ops = &intel_pcie_ops;\n \tpp->ops = &intel_pcie_dw_ops;\n \n+\t/*\n+\t * If the 'atu' resource is not available in the devicetree,\n+\t * then use the driver default value for backward compatibility.\n+\t * The 'atu' should always be set in the devicetree, as this is\n+\t * hardware specific setting that should not be defined in the\n+\t * source.\n+\t */\n+\tres = platform_get_resource_byname(pdev, IORESOURCE_MEM, \"atu\");\n+\tif (!res) {\n+\t\tres = platform_get_resource_byname(pdev, IORESOURCE_MEM, \"dbi\");\n+\t\tpci->dbi_base = devm_pci_remap_cfg_resource(pci->dev, res);\n+\t\tif (IS_ERR(pci->dbi_base))\n+\t\t\treturn PTR_ERR(pci->dbi_base);\n+\t\tpci->dbi_phys_addr = res->start;\n+\t\tpci->atu_base = devm_ioremap(dev, res->start + 0xC0000, SZ_4K);\n+\t\tif (!pci->atu_base) {\n+\t\t\tdev_err(dev, \"failed to remap ATU space\\n\");\n+\t\t\treturn -ENOMEM;\n+\n+\t\t}\n+\t\tpci->atu_size = SZ_4K;\n+\t\tpci->atu_phys_addr = res->start + 0xC0000;\n+\t\tdev_warn(dev, \"devicetree ATU resource is missing; driver`s default value is being used\\n\");\n+\t}\n+\n \tret = dw_pcie_host_init(pp);\n \tif (ret) {\n \t\tdev_err(dev, \"Cannot initialize host\\n\");\n", "prefixes": [ "v3", "6/7" ] }