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

From: Michal Meloun <meloun.michal_at_gmail.com>
Date: Wed, 23 Feb 2022 13:00:27 UTC

On 23.02.2022 13:32, Emmanuel Vadot wrote:
> On Wed, 23 Feb 2022 13:02:21 +0100
> Mateusz Guzik <mjguzik@gmail.com> wrote:
> 
>> On 2/23/22, Emmanuel Vadot <manu@bidouilliste.com> wrote:
>>> On Tue, 22 Feb 2022 20:05:45 +0100
>>> Mateusz Guzik <mjguzik@gmail.com> wrote:
>>>
>>>> This broke numerous kernels in tinderbox:
>>>> arm EFIKA_MX kernel failed, check _.arm.EFIKA_MX for details
>>>> arm ALPINE kernel failed, check _.arm.ALPINE for details
>>>> arm ZEDBOARD kernel failed, check _.arm.ZEDBOARD for details
>>>> arm VYBRID kernel failed, check _.arm.VYBRID for details
>>>> arm IMX53 kernel failed, check _.arm.IMX53 for details
>>>> arm ARMADA38X kernel failed, check _.arm.ARMADA38X for details
>>>> powerpc MPC85XX kernel failed, check _.powerpc.MPC85XX for details
>>>> powerpc QORIQ64 kernel failed, check _.powerpc.QORIQ64 for details
>>>
>>>   I've fixed the arm kernels and QORIQ64.
>>>   MPC85XX still fails on some atomic function and that doesn't seems to
>>> be because of me.
>>>
>>
>> Everything builds fine for me now (including MPC85XX), but ZEDBOARD still fails:
>> /usr/src/sys/dev/iicbus/ofw_iicbus.c:45:10: fatal error:
>> 'ofw_iicbus_if.h' file not found
>> #include "ofw_iicbus_if.h"
>>           ^~~~~~~~~~~~~~~~~
> 
>   I didn't touched anything related to this.
> 
That's mine. Give me an hour.
Michal

>>>   Cheers,
>>>
>>>>
>>>> On 2/21/22, Emmanuel Vadot <manu@freebsd.org> wrote:
>>>>> 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>
>>>>>
>>>>
>>>>
>>>> --
>>>> Mateusz Guzik <mjguzik gmail.com>
>>>
>>>
>>> --
>>> Emmanuel Vadot <manu@bidouilliste.com> <manu@FreeBSD.org>
>>>
>>
>>
>> -- 
>> Mateusz Guzik <mjguzik gmail.com>
> 
>