[PATCH] phy: tegra: Clean-up Makefile for Tegra186
Jon Hunter
jonathanh at nvidia.com
Tue Oct 13 11:17:55 PDT 2026
On 13/10/2026 17:07, Thierry Reding wrote:
> On Mon, Oct 12, 2026 at 12:16:31PM +0100, Jon Hunter wrote:
>> The Makefile for the Tegra XUSB PHY driver has an entry for every Tegra
>> SoC that compiles the xusb-tegra186.c file. Clean this up by adding a
>> new Kconfig option called PHY_TEGRA186_XUSB that when defined compiles
>> the xusb-tegra186.c file.
>>
>> Finally, update the xusb.[ch] files to use this new config option as
>> well instead of using the individual SoC Kconfig options.
>>
>> Signed-off-by: Jon Hunter <jonathanh at nvidia.com>
...
>> diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
>> index 89ce9ac87300..79a3624faa10 100644
>> --- a/drivers/phy/tegra/xusb.c
>> +++ b/drivers/phy/tegra/xusb.c
>> @@ -60,31 +60,23 @@ static const struct of_device_id tegra_xusb_padctl_of_match[] = {
>> .data = &tegra210_xusb_padctl_soc,
>> },
>> #endif
>> -#if defined(CONFIG_ARCH_TEGRA_186_SOC)
>> +#if defined(CONFIG_PHY_TEGRA186_XUSB)
>> {
>> .compatible = "nvidia,tegra186-xusb-padctl",
>> .data = &tegra186_xusb_padctl_soc,
>> },
>> -#endif
>> -#if defined(CONFIG_ARCH_TEGRA_194_SOC)
>> {
>> .compatible = "nvidia,tegra194-xusb-padctl",
>> .data = &tegra194_xusb_padctl_soc,
>> },
>> -#endif
>> -#if defined(CONFIG_ARCH_TEGRA_234_SOC)
>> {
>> .compatible = "nvidia,tegra234-xusb-padctl",
>> .data = &tegra234_xusb_padctl_soc,
>> },
>> -#endif
>> -#if defined(CONFIG_ARCH_TEGRA_238_SOC)
>> {
>> .compatible = "nvidia,tegra238-xusb-padctl",
>> .data = &tegra238_xusb_padctl_soc,
>> },
>> -#endif
>> -#if defined(CONFIG_ARCH_TEGRA_264_SOC)
>> {
>> .compatible = "nvidia,tegra264-xusb-padctl",
>> .data = &tegra264_xusb_padctl_soc,
>
> And this means you now get data for all SoCs as soon as one of them is
> enabled. Yes, I know that most of the time we want to build multi-SoC
> kernels anyway, but it now is not just a clean up anymore.
So you already get all the data for all the SoCs. This is simply
populating the compatible string and pointer for the data structure in
the match table.
Prior to commit 8f56fdf3d8cb ("phy: tegra: Add support for Tegra238 XUSB
pad controller") it was possible to only have some of the SoC data
present, however, due to all the inter-dependencies between all the
underlying structures, IMO it became pointless and messy.
So I still see this as a clean-up overall.
Jon
--
nvpublic
More information about the linux-phy
mailing list