[PATCH v4 0/3] PCI: ultrarisc: Add DP1000 PCIe clock support
Jia Wang <[email protected]> Fri, 31 Jul 2026 09:14:27 +0800
| Newsgroups | org.kernel.feeds.b4-sent,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci |
|---|---|
| Message-ID | <[email protected]> |
Add clock handling for the UltraRISC DP1000 DesignWare PCIe host controller. The DP1000 PCIe controller depends on three input clocks: core, dbi, and aux. The driver accesses DBI registers during host initialization, so the clocks must be enabled before the controller registers are touched. This series documents the required clocks in the device tree binding, enables the core, dbi, and aux clocks before DesignWare host initialization, and keeps them managed across probe failure, detach, and system suspend/resume. It also switches the driver to module_platform_driver() so the existing tristate Kconfig option builds correctly as a module. Testing: - Build and module build tested with ARCH=riscv. - Boot tested on UltraRISC DP1000. - Validated the PCIe binding with dt_binding_check and dtbs_check. Signed-off-by: Jia Wang <[email protected]> --- Changes in v4: - Use devm_clk_bulk_get_all() instead of hardcoding clock names in the driver. - Drop clks_enabled and simplify the clock enable/disable helpers. - Keep the suspend guard for the failed-resume case without disabling the clocks again when the guard is hit. - Keep module_platform_driver(), but drop the .remove callback. - Link to v3: https://patch.msgid.link/[email protected] Changes in v3: - Track whether the PCIe clocks are enabled and make clock enable/disable helpers idempotent. - Skip dw_pcie_suspend_noirq() when the controller is already suspended to avoid register access with clocks disabled after a failed resume. - Disable clocks again if dw_pcie_resume_noirq() fails after clocks were re-enabled. - Add a remove callback to deinitialize the DesignWare host when the module build support is added. - Link to v2: https://patch.msgid.link/[email protected] Changes in v2: - Add Fixes and Acked-by tags to the binding patch. - Add a Fixes tag to the driver clock handling patch. - Fix the suspend/resume clock handling so clocks are disabled only after a successful suspend and kept enabled on resume failure. - Add a module build fix by switching to module_platform_driver(). - Link to v1: https://patch.msgid.link/[email protected] To: Xincheng Zhang <[email protected]> To: Jia Wang <[email protected]> To: Lorenzo Pieralisi <[email protected]> To: Krzysztof WilczyĆski <[email protected]> To: Manivannan Sadhasivam <[email protected]> To: Rob Herring <[email protected]> To: Bjorn Helgaas <[email protected]> To: Krzysztof Kozlowski <[email protected]> To: Conor Dooley <[email protected]> Cc: Krzysztof Kozlowski <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] --- Jia Wang (3): dt-bindings: pci: ultrarisc: add required DP1000 PCIe clocks PCI: ultrarisc: get and enable DP1000 PCIe clocks PCI: ultrarisc: use module_platform_driver() .../bindings/pci/ultrarisc,dp1000-pcie.yaml | 16 ++++ drivers/pci/controller/dwc/pcie-ultrarisc.c | 87 ++++++++++++++++++++-- 2 files changed, 95 insertions(+), 8 deletions(-) --- base-commit: a13c140cc289c0b7b3770bce5b3ad42ab35074aa change-id: 20260617-ultrarisc-pci-clk-ac19047af1ea Best regards, -- Jia Wang <[email protected]>