git: a8566c71ce46 - main - hym8563: Fix 32-bit powerpc build

From: Justin Hibbits <jhibbits_at_FreeBSD.org>
Date: Wed, 01 Jul 2026 02:42:21 UTC
The branch main has been updated by jhibbits:

URL: https://cgit.FreeBSD.org/src/commit/?id=a8566c71ce4640d1339a64384f0089cffb249b2c

commit a8566c71ce4640d1339a64384f0089cffb249b2c
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2026-07-01 02:30:31 +0000
Commit:     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2026-07-01 02:42:05 +0000

    hym8563: Fix 32-bit powerpc build
    
    Depend on clknode_if.h in the module Makefile, so that it gets
    explicitly built for the module.  Also, reduce the #if guards to only
    the new clock output code, and gate them on all powerpc, not just
    powerpc64.
    
    Fixes:  6b77d34f("HYM8563: Add support for clock output.")
    Reviewed by:    mmel
    Differential Revision:  https://reviews.freebsd.org/D57795
---
 sys/dev/iicbus/rtc/hym8563.c     | 18 +++++++++++-------
 sys/modules/i2c/hym8563/Makefile |  1 +
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/sys/dev/iicbus/rtc/hym8563.c b/sys/dev/iicbus/rtc/hym8563.c
index 56c5e88edc83..ef1d838bc99f 100644
--- a/sys/dev/iicbus/rtc/hym8563.c
+++ b/sys/dev/iicbus/rtc/hym8563.c
@@ -40,8 +40,10 @@
 #include <sys/lock.h>
 #include <sys/module.h>
 
-#if defined(FDT) && !defined(__powerpc64__) 
+#if defined(FDT)
+#if !defined(__powerpc__)
 #include <dev/clk/clk.h>
+#endif
 #include <dev/ofw/ofw_bus.h>
 #include <dev/ofw/ofw_bus_subr.h>
 #endif
@@ -89,11 +91,13 @@ struct hym8563_softc {
 	struct intr_config_hook		init_hook;
 };
 
-#if defined(FDT) && !defined(__powerpc64__) 
+#if defined(FDT)
+#if !defined(__powerpc__)
 /* Clock class and method */
 struct hym8563_clk_sc {
 	device_t		base_dev;
 };
+#endif
 
 
 static struct ofw_compat_data compat_data[] = {
@@ -131,7 +135,7 @@ hym8563_write_1(device_t dev, uint8_t reg, uint8_t val)
 	return (iicdev_writeto(dev, reg, &val, 1, IIC_WAIT));
 }
 
-#if defined(FDT) && !defined(__powerpc64__) 
+#if defined(FDT) && !defined(__powerpc__)
 static int
 hym8563_clk_set_gate(struct clknode *clk, bool enable)
 {
@@ -430,7 +434,7 @@ static int
 hym8563_probe(device_t dev)
 {
 
-#if defined(FDT) && !defined(__powerpc64__) 
+#if defined(FDT)
 	if (!ofw_bus_status_okay(dev))
 		return (ENXIO);
 
@@ -450,7 +454,7 @@ hym8563_attach(device_t dev)
 	sc = device_get_softc(dev);
 	sc->dev = dev;
 
-#if defined(FDT) && !defined(__powerpc64__) 
+#if defined(FDT) && !defined(__powerpc__)
 	if (hym8563_attach_clocks(sc) != 0)
 		return(ENXIO);
 #endif
@@ -494,6 +498,6 @@ EARLY_DRIVER_MODULE(hym8563, iicbus, hym8563_driver, NULL, NULL,
     BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_FIRST);
 MODULE_VERSION(hym8563, 1);
 MODULE_DEPEND(hym8563, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER);
-#if defined(FDT) && !defined(__powerpc64__) 
+#if defined(FDT)
 IICBUS_FDT_PNP_INFO(compat_data);
-#endif
\ No newline at end of file
+#endif
diff --git a/sys/modules/i2c/hym8563/Makefile b/sys/modules/i2c/hym8563/Makefile
index e0377ccd6c7f..197bb3664dfd 100644
--- a/sys/modules/i2c/hym8563/Makefile
+++ b/sys/modules/i2c/hym8563/Makefile
@@ -3,6 +3,7 @@ KMOD=	hym8563
 SRCS=	hym8563.c
 
 SRCS+=	bus_if.h \
+	clknode_if.h \
 	clock_if.h \
 	device_if.h \
 	iicbus_if.h \