git: ddc1d4b0722b - main - modules: fix some riscv module logic

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Mon, 20 Oct 2025 23:42:19 UTC
The branch main has been updated by mhorne:

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

commit ddc1d4b0722bd63934f503c43a5ee35d871355ee
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2025-10-20 23:11:53 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2025-10-20 23:37:13 +0000

    modules: fix some riscv module logic
    
    The change which enabled the sdhci_fdt module build on riscv
    inadvertently enabled the neta module as well. This driver is not needed
    on this platform.
    
    Move each entry to a respective identical conditional blocks.
    
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Fixes:  e9dd9f95f82f ("riscv: Add the sdhci_fdt driver to the build")
---
 sys/modules/Makefile | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 02ed6a0480e6..3086be864307 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -683,6 +683,7 @@ _irdma=		irdma
 .if !empty(OPT_FDT)
 _allwinner=	allwinner
 _if_cgem=	if_cgem
+_sdhci_fdt=	sdhci_fdt
 .endif
 .endif
 
@@ -726,14 +727,6 @@ _rockchip=	rockchip
 _imx=		imx
 .endif
 
-.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
-    ${MACHINE_CPUARCH} == "riscv"
-.if !empty(OPT_FDT)
-_sdhci_fdt=	sdhci_fdt
-.endif
-_neta=		neta
-.endif
-
 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
 _agp=		agp
 .if ${MACHINE_CPUARCH} == "i386" || !empty(COMPAT_FREEBSD32_ENABLED)
@@ -928,7 +921,8 @@ _nvram+=	powermac_nvram
 
 .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "aarch64"
 _bcm283x_clkman=  bcm283x_clkman
-_bcm283x_pwm=  bcm283x_pwm
+_bcm283x_pwm=	bcm283x_pwm
+_neta=		neta
 .endif
 
 .if ${MACHINE_CPUARCH} == "amd64"