git: a813b0965d8e - main - sdhci: Make ext_resources non-optional

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Mon, 21 Feb 2022 16:29:48 UTC
The branch main has been updated by manu:

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

commit a813b0965d8e9765135ad92a78ce62c8b762b99f
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2022-01-11 09:41:23 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-02-21 16:28:46 +0000

    sdhci: Make ext_resources non-optional
    
    EXT_RESOURCES have been introduced in 12-CURRENT and all supported
    releases have it enabled in their kernel config.
    
    MFC after:      1 month
    Differential Revision:  https://reviews.freebsd.org/D33824
---
 sys/dev/sdhci/sdhci_fdt.c        | 12 ------------
 sys/dev/sdhci/sdhci_xenon_acpi.c |  2 --
 2 files changed, 14 deletions(-)

diff --git a/sys/dev/sdhci/sdhci_fdt.c b/sys/dev/sdhci/sdhci_fdt.c
index 24a1d054849f..51b009a411c8 100644
--- a/sys/dev/sdhci/sdhci_fdt.c
+++ b/sys/dev/sdhci/sdhci_fdt.c
@@ -52,13 +52,11 @@ __FBSDID("$FreeBSD$");
 #include <dev/ofw/ofw_bus.h>
 #include <dev/ofw/ofw_bus_subr.h>
 
-#ifdef EXT_RESOURCES
 #include <dev/ofw/ofw_subr.h>
 #include <dev/extres/clk/clk.h>
 #include <dev/extres/clk/clk_fixed.h>
 #include <dev/extres/syscon/syscon.h>
 #include <dev/extres/phy/phy.h>
-#endif
 
 #include <dev/mmc/bridge.h>
 
@@ -69,10 +67,8 @@ __FBSDID("$FreeBSD$");
 
 #include "opt_mmccam.h"
 
-#ifdef EXT_RESOURCES
 #include "clkdev_if.h"
 #include "syscon_if.h"
-#endif
 
 #define	MAX_SLOTS		6
 #define	SDHCI_FDT_ARMADA38X	1
@@ -81,7 +77,6 @@ __FBSDID("$FreeBSD$");
 #define	SDHCI_FDT_QUALCOMM	4
 #define	SDHCI_FDT_RK3399	5
 
-#ifdef EXT_RESOURCES
 #define	RK3399_GRF_EMMCCORE_CON0		0xf000
 #define	 RK3399_CORECFG_BASECLKFREQ		0xff00
 #define	 RK3399_CORECFG_TIMEOUTCLKUNIT		(1 << 7)
@@ -93,7 +88,6 @@ __FBSDID("$FreeBSD$");
 #define	SHIFTIN(x, mask)	((x) * LOWEST_SET_BIT(mask))
 
 #define	EMMCCARDCLK_ID		1000
-#endif
 
 static struct ofw_compat_data compat_data[] = {
 	{ "marvell,armada-380-sdhci",	SDHCI_FDT_ARMADA38X },
@@ -120,14 +114,11 @@ struct sdhci_fdt_softc {
 	bool		wp_inverted;	/* WP pin is inverted */
 	bool		no_18v;		/* No 1.8V support */
 
-#ifdef EXT_RESOURCES
 	clk_t		clk_xin;	/* xin24m fixed clock */
 	clk_t		clk_ahb;	/* ahb clock */
 	phy_t		phy;		/* phy to be used */
-#endif
 };
 
-#ifdef EXT_RESOURCES
 struct rk3399_emmccardclk_sc {
 	device_t	clkdev;
 	bus_addr_t	reg;
@@ -320,7 +311,6 @@ sdhci_init_rk3399(device_t dev)
 
 	return (0);
 }
-#endif
 
 static uint8_t
 sdhci_fdt_read_1(device_t dev, struct sdhci_slot *slot, bus_size_t off)
@@ -488,7 +478,6 @@ sdhci_fdt_attach(device_t dev)
 		return (ENOMEM);
 	}
 
-#ifdef EXT_RESOURCES
 	if (ofw_bus_search_compatible(dev, compat_data)->ocd_data ==
 	    SDHCI_FDT_RK3399) {
 		/* Initialize SDHCI */
@@ -498,7 +487,6 @@ sdhci_fdt_attach(device_t dev)
 			return (err);
 		}
 	}
-#endif
 
 	/* Scan all slots. */
 	slots = sc->num_slots;	/* number of slots determined in probe(). */
diff --git a/sys/dev/sdhci/sdhci_xenon_acpi.c b/sys/dev/sdhci/sdhci_xenon_acpi.c
index 1bd4c03c67e4..9bb781ff75a6 100644
--- a/sys/dev/sdhci/sdhci_xenon_acpi.c
+++ b/sys/dev/sdhci/sdhci_xenon_acpi.c
@@ -44,9 +44,7 @@ __FBSDID("$FreeBSD$");
 #include <contrib/dev/acpica/include/accommon.h>
 #include <dev/acpica/acpivar.h>
 
-#ifdef EXT_RESOURCES
 #include <dev/extres/regulator/regulator.h>
-#endif
 
 #include <dev/sdhci/sdhci.h>
 #include <dev/sdhci/sdhci_xenon.h>