[PATCH] clk: ultrarisc: Register DP1000 clock provider earlier

From: Jia Wang

Date: Wed Aug 19 2026 - 22:52:03 EST


The DP1000 PCIe and clock drivers both register at the device initcall
level. Since the PCIe driver is linked first, its probe runs before the
clock provider is available and defers.

sysfb_init() runs at the same initcall level before deferred probes are
retried. It claims the firmware framebuffer aperture, so the later PCIe
host probe cannot allocate the overlapping prefetchable window and the
GPU is not enumerated.

Register the clock provider with subsys_initcall() when built in so PCIe
host probing completes before sysfb_init(). Keep module builds using the
normal module init and exit paths.

Fixes: 3948a36be42b ("clk: ultrarisc: Add DP1000 clock driver")
Signed-off-by: Jia Wang <wangjia@xxxxxxxxxxxxx>
---
Register the built-in DP1000 clock provider earlier so the PCIe host can
complete resource allocation before sysfb claims the firmware framebuffer
aperture.

This patch is based on the clk-next branch.

Validated on a DP1000 system with a PCIe GPU across repeated cold boots.
---
drivers/clk/ultrarisc/clk-dp1000.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/ultrarisc/clk-dp1000.c b/drivers/clk/ultrarisc/clk-dp1000.c
index ffea77c4cca0..8073e179c67a 100644
--- a/drivers/clk/ultrarisc/clk-dp1000.c
+++ b/drivers/clk/ultrarisc/clk-dp1000.c
@@ -3,6 +3,7 @@
* Copyright (C) 2026 UltraRISC Technology (Shanghai) Co., Ltd.
*/

+#include <linux/init.h>
#include <linux/module.h>

#include <dt-bindings/clock/ultrarisc,dp1000-clk.h>
@@ -147,7 +148,23 @@ static struct platform_driver dp1000_clk_driver = {
.of_match_table = dp1000_clk_of_match,
},
};
-module_platform_driver(dp1000_clk_driver);
+
+/*
+ * PCI host drivers are registered before sysfb_init() through link order.
+ * Register the clock provider earlier so the host controllers do not defer
+ * probing until after sysfb has claimed the firmware framebuffer aperture.
+ */
+static int __init dp1000_clk_init(void)
+{
+ return platform_driver_register(&dp1000_clk_driver);
+}
+subsys_initcall(dp1000_clk_init);
+
+static void __exit dp1000_clk_exit(void)
+{
+ platform_driver_unregister(&dp1000_clk_driver);
+}
+module_exit(dp1000_clk_exit);

MODULE_IMPORT_NS("CLK_ULTRARISC");
MODULE_DESCRIPTION("UltraRISC DP1000 clock controller");

---
base-commit: ef96a64997e62fc5cc91fb3bc7a3fc1046fef259
change-id: 20260820-ultrarisc-clock-fix-ae7a375294a7

Best regards,
--
Jia Wang <wangjia@xxxxxxxxxxxxx>