All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/5] Add support for Andes Qilai SoC PCIe controller
@ 2025-10-03  2:35 ` Randolph Lin
  0 siblings, 0 replies; 25+ messages in thread
From: Randolph Lin @ 2025-10-03  2:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-pci, linux-riscv, devicetree, jingoohan1, mani, lpieralisi,
	kwilczynski, robh, bhelgaas, krzk+dt, conor+dt, alex, aou, palmer,
	paul.walmsley, ben717, inochiama, thippeswamy.havalige, namcao,
	shradha.t, pjw, randolph.sklin, tim609, Randolph Lin

Add support for Andes Qilai SoC PCIe controller

These patches introduce driver support for the PCIe controller on the
Andes Qilai SoC.

Signed-off-by: Randolph Lin <randolph@andestech.com>

---
Changes in v6:
- Fix typo in the logic for adjusting the number of OB/IB windows

---
Changes in v5:
- Add support to adjust the number of OB/IB windows in the glue driver.
- Fix the number of OB windows in the Qilai PCIe driver.
- Remove meaningless properties from the device tree.
- Made minor adjustments based on the reviewer's suggestions.

---
Changes in v4:
- Add .post_init callback for enabling IOCP cache.  
- Sort by vender name in Kconfig 
- Using PROBE_PREFER_ASYNCHRONOUS as default probe type.
- Made minor adjustments based on the reviewer's suggestions.

---
Changes in v3:
- Remove outbound ATU address range validation callback and logic.
- Add logic to skip failed outbound iATU configuration and continue.
- Using PROBE_PREFER_ASYNCHRONOUS as default probe type.
- Made minor adjustments based on the reviewer's suggestions.

---
Changes in v2:
- Remove the patch that adds the dma-ranges property to the SoC node.
- Add dma-ranges to the PCIe parent node bus node.
- Refactor and rename outbound ATU address range validation callback and logic.
- Use parent_bus_offset instead of cpu_addr_fixup().
- Using PROBE_DEFAULT_STRATEGY as default probe type.
- Made minor adjustments based on the reviewer's suggestions.

Randolph Lin (5):
  PCI: dwc: Allow adjusting the number of ob/ib windows in glue driver
  dt-bindings: PCI: Add Andes QiLai PCIe support
  riscv: dts: andes: Add PCIe node into the QiLai SoC
  PCI: andes: Add Andes QiLai SoC PCIe host driver support
  MAINTAINERS: Add maintainers for Andes QiLai PCIe driver

 .../bindings/pci/andestech,qilai-pcie.yaml    |  97 +++++++
 MAINTAINERS                                   |   7 +
 arch/riscv/boot/dts/andes/qilai.dtsi          | 106 ++++++++
 drivers/pci/controller/dwc/Kconfig            |  13 +
 drivers/pci/controller/dwc/Makefile           |   1 +
 drivers/pci/controller/dwc/pcie-andes-qilai.c | 240 ++++++++++++++++++
 drivers/pci/controller/dwc/pcie-designware.c  |  12 +-
 7 files changed, 474 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pci/andestech,qilai-pcie.yaml
 create mode 100644 drivers/pci/controller/dwc/pcie-andes-qilai.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: [PATCH v6 4/5] PCI: andes: Add Andes QiLai SoC PCIe host driver support
  2025-10-03  2:35   ` Randolph Lin
  (?)
@ 2025-10-14  7:33 ` Dan Carpenter
  -1 siblings, 0 replies; 25+ messages in thread
From: kernel test robot @ 2025-10-09 14:09 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20251003023527.3284787-5-randolph@andestech.com>
References: <20251003023527.3284787-5-randolph@andestech.com>
TO: Randolph Lin <randolph@andestech.com>
TO: linux-kernel@vger.kernel.org
CC: linux-pci@vger.kernel.org
CC: linux-riscv@lists.infradead.org
CC: devicetree@vger.kernel.org
CC: jingoohan1@gmail.com
CC: mani@kernel.org
CC: lpieralisi@kernel.org
CC: kwilczynski@kernel.org
CC: robh@kernel.org
CC: bhelgaas@google.com
CC: krzk+dt@kernel.org
CC: conor+dt@kernel.org
CC: alex@ghiti.fr
CC: aou@eecs.berkeley.edu
CC: palmer@dabbelt.com
CC: paul.walmsley@sifive.com
CC: ben717@andestech.com
CC: inochiama@gmail.com
CC: thippeswamy.havalige@amd.com
CC: namcao@linutronix.de
CC: shradha.t@samsung.com
CC: pjw@kernel.org
CC: randolph.sklin@gmail.com
CC: tim609@andestech.com
CC: Randolph Lin <randolph@andestech.com>

Hi Randolph,

kernel test robot noticed the following build warnings:

[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus robh/for-next linus/master v6.17 next-20251008]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Randolph-Lin/PCI-dwc-Allow-adjusting-the-number-of-ob-ib-windows-in-glue-driver/20251003-104100
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link:    https://lore.kernel.org/r/20251003023527.3284787-5-randolph%40andestech.com
patch subject: [PATCH v6 4/5] PCI: andes: Add Andes QiLai SoC PCIe host driver support
:::::: branch date: 6 days ago
:::::: commit date: 6 days ago
config: powerpc-randconfig-r071-20251009 (https://download.01.org/0day-ci/archive/20251009/202510092111.fZmvx6jO-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 39f292ffa13d7ca0d1edff27ac8fd55024bb4d19)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202510092111.fZmvx6jO-lkp@intel.com/

smatch warnings:
drivers/pci/controller/dwc/pcie-andes-qilai.c:157 qilai_pcie_host_fix_ob_iatu_count() error: uninitialized symbol 'ranges_32bits'.

vim +/ranges_32bits +157 drivers/pci/controller/dwc/pcie-andes-qilai.c

816cad1ac60166 Randolph Lin 2025-10-03  124  
816cad1ac60166 Randolph Lin 2025-10-03  125  /*
816cad1ac60166 Randolph Lin 2025-10-03  126   * The QiLai SoC PCIe controller's outbound iATU region supports
816cad1ac60166 Randolph Lin 2025-10-03  127   * a maximum size of SZ_4G - 1. To prevent programming failures,
816cad1ac60166 Randolph Lin 2025-10-03  128   * only consider bridge->windows with sizes within this limit.
816cad1ac60166 Randolph Lin 2025-10-03  129   *
816cad1ac60166 Randolph Lin 2025-10-03  130   * To ensure compatibility with most endpoint devices, at least
816cad1ac60166 Randolph Lin 2025-10-03  131   * one memory region must be mapped within the 32-bits address space.
816cad1ac60166 Randolph Lin 2025-10-03  132   */
816cad1ac60166 Randolph Lin 2025-10-03  133  static int qilai_pcie_host_fix_ob_iatu_count(struct dw_pcie_rp *pp)
816cad1ac60166 Randolph Lin 2025-10-03  134  {
816cad1ac60166 Randolph Lin 2025-10-03  135  	struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
816cad1ac60166 Randolph Lin 2025-10-03  136  	struct device *dev = pci->dev;
816cad1ac60166 Randolph Lin 2025-10-03  137  	struct resource_entry *entry;
816cad1ac60166 Randolph Lin 2025-10-03  138  	/* Reserved 1 ob iATU for config space */
816cad1ac60166 Randolph Lin 2025-10-03  139  	int count = 1;
816cad1ac60166 Randolph Lin 2025-10-03  140  	int ranges_32bits;
816cad1ac60166 Randolph Lin 2025-10-03  141  	u64 pci_addr;
816cad1ac60166 Randolph Lin 2025-10-03  142  	u64 size;
816cad1ac60166 Randolph Lin 2025-10-03  143  
816cad1ac60166 Randolph Lin 2025-10-03  144  	resource_list_for_each_entry(entry, &pp->bridge->windows) {
816cad1ac60166 Randolph Lin 2025-10-03  145  		if (resource_type(entry->res) != IORESOURCE_MEM)
816cad1ac60166 Randolph Lin 2025-10-03  146  			continue;
816cad1ac60166 Randolph Lin 2025-10-03  147  
816cad1ac60166 Randolph Lin 2025-10-03  148  		size = resource_size(entry->res);
816cad1ac60166 Randolph Lin 2025-10-03  149  		if (size < SZ_4G)
816cad1ac60166 Randolph Lin 2025-10-03  150  			count++;
816cad1ac60166 Randolph Lin 2025-10-03  151  
816cad1ac60166 Randolph Lin 2025-10-03  152  		pci_addr = entry->res->start - entry->offset;
816cad1ac60166 Randolph Lin 2025-10-03  153  		if (pci_addr < SZ_4G)
816cad1ac60166 Randolph Lin 2025-10-03  154  			ranges_32bits = true;
816cad1ac60166 Randolph Lin 2025-10-03  155  	}
816cad1ac60166 Randolph Lin 2025-10-03  156  
816cad1ac60166 Randolph Lin 2025-10-03 @157  	if (!ranges_32bits) {
816cad1ac60166 Randolph Lin 2025-10-03  158  		dev_err(dev, "Bridge window must contain 32-bits address\n");
816cad1ac60166 Randolph Lin 2025-10-03  159  		return -EINVAL;
816cad1ac60166 Randolph Lin 2025-10-03  160  	}
816cad1ac60166 Randolph Lin 2025-10-03  161  
816cad1ac60166 Randolph Lin 2025-10-03  162  	pci->num_ob_windows = count;
816cad1ac60166 Randolph Lin 2025-10-03  163  
816cad1ac60166 Randolph Lin 2025-10-03  164  	return 0;
816cad1ac60166 Randolph Lin 2025-10-03  165  }
816cad1ac60166 Randolph Lin 2025-10-03  166  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2025-10-20 11:39 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-03  2:35 [PATCH v6 0/5] Add support for Andes Qilai SoC PCIe controller Randolph Lin
2025-10-03  2:35 ` Randolph Lin
2025-10-03  2:35 ` [PATCH v6 1/5] PCI: dwc: Allow adjusting the number of ob/ib windows in glue driver Randolph Lin
2025-10-03  2:35   ` Randolph Lin
2025-10-14  9:43   ` Niklas Cassel
2025-10-14  9:43     ` Niklas Cassel
2025-10-16 11:12     ` Randolph Lin
2025-10-16 11:12       ` Randolph Lin
2025-10-16 11:54       ` Niklas Cassel
2025-10-16 11:54         ` Niklas Cassel
2025-10-20 11:35         ` Randolph Lin
2025-10-20 11:35           ` Randolph Lin
2025-10-03  2:35 ` [PATCH v6 2/5] dt-bindings: PCI: Add Andes QiLai PCIe support Randolph Lin
2025-10-03  2:35   ` Randolph Lin
2025-10-06 18:52   ` Rob Herring
2025-10-06 18:52     ` Rob Herring
2025-10-03  2:35 ` [PATCH v6 3/5] riscv: dts: andes: Add PCIe node into the QiLai SoC Randolph Lin
2025-10-03  2:35   ` Randolph Lin
2025-10-03  2:35 ` [PATCH v6 4/5] PCI: andes: Add Andes QiLai SoC PCIe host driver support Randolph Lin
2025-10-03  2:35   ` Randolph Lin
2025-10-03  2:35 ` [PATCH v6 5/5] MAINTAINERS: Add maintainers for Andes QiLai PCIe driver Randolph Lin
2025-10-03  2:35   ` Randolph Lin
  -- strict thread matches above, loose matches on Subject: below --
2025-10-09 14:09 [PATCH v6 4/5] PCI: andes: Add Andes QiLai SoC PCIe host driver support kernel test robot
2025-10-14  7:33 ` Dan Carpenter
2025-10-14  7:33 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.