* [PATCH] usb: tegra: use MODULE_FIRMWARE if SOC is ENABLED
@ 2026-03-23 14:02 Nicolas Chauvet
2026-03-23 14:02 ` Nicolas Chauvet
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Chauvet @ 2026-03-23 14:02 UTC (permalink / raw)
To: Thierry Reding, Jonathan Hunter, Mathias Nyman,
Greg Kroah-Hartman
Cc: linux-tegra, linux-usb, Nicolas Chauvet
This allows to reduce the size of the initramfs by only selecting
the related firmware when a given SOC is enabled.
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
---
drivers/usb/host/xhci-tegra.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
index 3f6aa2440b05..5587302a69dd 100644
--- a/drivers/usb/host/xhci-tegra.c
+++ b/drivers/usb/host/xhci-tegra.c
@@ -2566,7 +2566,9 @@ static const struct tegra_xusb_soc tegra124_soc = {
.smi_intr = XUSB_CFG_ARU_SMI_INTR,
},
};
+#if IS_ENABLED(CONFIG_ARCH_TEGRA_124_SOC) || IS_ENABLED(CONFIG_ARCH_TEGRA_132_SOC)
MODULE_FIRMWARE("nvidia/tegra124/xusb.bin");
+#endif
static const char * const tegra210_supply_names[] = {
"dvddio-pex",
@@ -2604,11 +2606,15 @@ static const struct tegra_xusb_soc tegra210_soc = {
.smi_intr = XUSB_CFG_ARU_SMI_INTR,
},
};
+#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
MODULE_FIRMWARE("nvidia/tegra210/xusb.bin");
+#endif
static const char * const tegra186_supply_names[] = {
};
+#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC)
MODULE_FIRMWARE("nvidia/tegra186/xusb.bin");
+#endif
static const struct tegra_xusb_phy_type tegra186_phy_types[] = {
{ .name = "usb3", .num = 3, },
@@ -2681,7 +2687,9 @@ static const struct tegra_xusb_soc tegra194_soc = {
},
.lpm_support = true,
};
+#if IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC)
MODULE_FIRMWARE("nvidia/tegra194/xusb.bin");
+#endif
static const struct tegra_xusb_soc_ops tegra234_ops = {
.mbox_reg_readl = &bar2_readl,
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH] usb: tegra: use MODULE_FIRMWARE if SOC is ENABLED
2026-03-23 14:02 [PATCH] usb: tegra: use MODULE_FIRMWARE if SOC is ENABLED Nicolas Chauvet
@ 2026-03-23 14:02 ` Nicolas Chauvet
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Chauvet @ 2026-03-23 14:02 UTC (permalink / raw)
To: Thierry Reding, Jonathan Hunter, Mathias Nyman,
Greg Kroah-Hartman
Cc: linux-tegra, linux-usb, Nicolas Chauvet
This allows to reduce the size of the initramfs by only selecting
the related firmware when a given SOC is enabled.
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
---
drivers/usb/host/xhci-tegra.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
index 3f6aa2440b05..5587302a69dd 100644
--- a/drivers/usb/host/xhci-tegra.c
+++ b/drivers/usb/host/xhci-tegra.c
@@ -2566,7 +2566,9 @@ static const struct tegra_xusb_soc tegra124_soc = {
.smi_intr = XUSB_CFG_ARU_SMI_INTR,
},
};
+#if IS_ENABLED(CONFIG_ARCH_TEGRA_124_SOC) || IS_ENABLED(CONFIG_ARCH_TEGRA_132_SOC)
MODULE_FIRMWARE("nvidia/tegra124/xusb.bin");
+#endif
static const char * const tegra210_supply_names[] = {
"dvddio-pex",
@@ -2604,11 +2606,15 @@ static const struct tegra_xusb_soc tegra210_soc = {
.smi_intr = XUSB_CFG_ARU_SMI_INTR,
},
};
+#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
MODULE_FIRMWARE("nvidia/tegra210/xusb.bin");
+#endif
static const char * const tegra186_supply_names[] = {
};
+#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC)
MODULE_FIRMWARE("nvidia/tegra186/xusb.bin");
+#endif
static const struct tegra_xusb_phy_type tegra186_phy_types[] = {
{ .name = "usb3", .num = 3, },
@@ -2681,7 +2687,9 @@ static const struct tegra_xusb_soc tegra194_soc = {
},
.lpm_support = true,
};
+#if IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC)
MODULE_FIRMWARE("nvidia/tegra194/xusb.bin");
+#endif
static const struct tegra_xusb_soc_ops tegra234_ops = {
.mbox_reg_readl = &bar2_readl,
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-23 14:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23 14:02 [PATCH] usb: tegra: use MODULE_FIRMWARE if SOC is ENABLED Nicolas Chauvet
2026-03-23 14:02 ` Nicolas Chauvet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox