Module Name:    src
Committed By:   jmcneill
Date:           Sun Jun 30 17:55:28 UTC 2024

Modified Files:
        src/sys/arch/evbarm/fdt: fdt_machdep.c
        src/sys/dev/fdt: fdtvar.h

Log Message:
fdt: Add a fp_device_register_post_config callback to fdt_platform.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/evbarm/fdt/fdt_machdep.c
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/fdt/fdtvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbarm/fdt/fdt_machdep.c
diff -u src/sys/arch/evbarm/fdt/fdt_machdep.c:1.107 src/sys/arch/evbarm/fdt/fdt_machdep.c:1.108
--- src/sys/arch/evbarm/fdt/fdt_machdep.c:1.107	Fri Jan 19 09:09:04 2024
+++ src/sys/arch/evbarm/fdt/fdt_machdep.c	Sun Jun 30 17:55:28 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.107 2024/01/19 09:09:04 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.108 2024/06/30 17:55:28 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill <jmcne...@invisible.ca>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.107 2024/01/19 09:09:04 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.108 2024/06/30 17:55:28 jmcneill Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -497,6 +497,11 @@ fdt_device_register(device_t self, void 
 static void
 fdt_device_register_post_config(device_t self, void *aux)
 {
+	const struct fdt_platform *plat = fdt_platform_find();
+
+	if (plat && plat->fp_device_register_post_config)
+		plat->fp_device_register_post_config(self, aux);
+
 #if NUKBD > 0 && NWSDISPLAY > 0
 	if (device_is_a(self, "wsdisplay")) {
 		struct wsdisplay_softc *sc = device_private(self);

Index: src/sys/dev/fdt/fdtvar.h
diff -u src/sys/dev/fdt/fdtvar.h:1.79 src/sys/dev/fdt/fdtvar.h:1.80
--- src/sys/dev/fdt/fdtvar.h:1.79	Mon Jun 12 12:58:17 2023
+++ src/sys/dev/fdt/fdtvar.h	Sun Jun 30 17:55:28 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: fdtvar.h,v 1.79 2023/06/12 12:58:17 skrll Exp $ */
+/* $NetBSD: fdtvar.h,v 1.80 2024/06/30 17:55:28 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcne...@invisible.ca>
@@ -318,6 +318,7 @@ struct fdt_platform {
 	void			(*fp_startup)(void);
 	void			(*fp_init_attach_args)(struct fdt_attach_args *);
 	void			(*fp_device_register)(device_t, void *);
+	void			(*fp_device_register_post_config)(device_t, void *);
 	void			(*fp_reset)(void);
 	void			(*fp_delay)(u_int);
 	u_int			(*fp_uart_freq)(void);

Reply via email to