global: Correct duplicate U_BOOT_DRIVER entry names

The U_BOOT_DRIVER macro creates a list of drivers used at link time, and
all entries here must be unique. This in turn means that all entries in
the code should also be unique in order to not lead to build failures
later with unexpected build combinations. Typically, the problem we have
here is when a driver is obviously based on another driver and didn't
update this particular field and so while the name field reflects
something unique the linker entry itself is not. In a few places this
provides a more suitable string name as well, however.

Reviewed-by: Marek Vasut <marek.vasut+usb@mailbox.org>
Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com> # Tegra
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Tom Rini
2026-03-23 16:55:37 -06:00
parent 9eb3592cbc
commit 8c212d6e2e
40 changed files with 46 additions and 46 deletions

View File

@@ -205,7 +205,7 @@ static const struct udevice_id broadwell_syscon_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(syscon_intel_me) = { U_BOOT_DRIVER(syscon_intel_me_broadwell) = {
.name = "intel_me_syscon", .name = "intel_me_syscon",
.id = UCLASS_SYSCON, .id = UCLASS_SYSCON,
.of_match = broadwell_syscon_ids, .of_match = broadwell_syscon_ids,

View File

@@ -166,7 +166,7 @@ static const struct udevice_id ivybridge_syscon_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(syscon_intel_me) = { U_BOOT_DRIVER(syscon_intel_me_ivybridge) = {
.name = "intel_me_syscon", .name = "intel_me_syscon",
.id = UCLASS_SYSCON, .id = UCLASS_SYSCON,
.of_match = ivybridge_syscon_ids, .of_match = ivybridge_syscon_ids,

View File

@@ -421,7 +421,7 @@ static const struct udevice_id imx28_clk_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(fsl_imx28_clkctrl) = { U_BOOT_DRIVER(btt_dummy_fsl_imx28_clkctrl) = {
.name = "fsl_imx28_clkctrl", .name = "fsl_imx28_clkctrl",
.id = UCLASS_CLK, .id = UCLASS_CLK,
.of_match = imx28_clk_ids, .of_match = imx28_clk_ids,

View File

@@ -351,7 +351,7 @@ static const struct udevice_id imx28_clk_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(fsl_imx28_clkctrl) = { U_BOOT_DRIVER(xea_dummy_fsl_imx28_clkctrl) = {
.name = "fsl_imx28_clkctrl", .name = "fsl_imx28_clkctrl",
.id = UCLASS_CLK, .id = UCLASS_CLK,
.of_match = imx28_clk_ids, .of_match = imx28_clk_ids,

View File

@@ -79,7 +79,7 @@ static const struct blk_ops efi_blk_ops = {
.write = efi_bl_write, .write = efi_bl_write,
}; };
U_BOOT_DRIVER(efi_block) = { U_BOOT_DRIVER(efi_media_block) = {
.name = "efi_block", .name = "efi_block",
.id = UCLASS_BLK, .id = UCLASS_BLK,
.ops = &efi_blk_ops, .ops = &efi_blk_ops,

View File

@@ -136,7 +136,7 @@ static const struct udevice_id at91_sckc_match[] = {
{} {}
}; };
U_BOOT_DRIVER(at91_sckc) = { U_BOOT_DRIVER(at91sam9x5_sckc) = {
.name = "at91-sckc", .name = "at91-sckc",
.id = UCLASS_SIMPLE_BUS, .id = UCLASS_SIMPLE_BUS,
.of_match = at91_sckc_match, .of_match = at91_sckc_match,
@@ -368,7 +368,7 @@ static const struct udevice_id at91_system_clk_match[] = {
{} {}
}; };
U_BOOT_DRIVER(at91_system_clk) = { U_BOOT_DRIVER(at91rm9200_system_clk) = {
.name = "at91-system-clk", .name = "at91-system-clk",
.id = UCLASS_MISC, .id = UCLASS_MISC,
.of_match = at91_system_clk_match, .of_match = at91_system_clk_match,

View File

@@ -162,7 +162,7 @@ static const struct udevice_id sam9x60_sckc_ids[] = {
{ /* Sentinel. */ }, { /* Sentinel. */ },
}; };
U_BOOT_DRIVER(at91_sckc) = { U_BOOT_DRIVER(sam9x60_sckc) = {
.name = UBOOT_DM_CLK_AT91_SCKC, .name = UBOOT_DM_CLK_AT91_SCKC,
.id = UCLASS_CLK, .id = UCLASS_CLK,
.of_match = sam9x60_sckc_ids, .of_match = sam9x60_sckc_ids,

View File

@@ -712,7 +712,7 @@ static struct clk_ops meson_clk_ops = {
#endif #endif
}; };
U_BOOT_DRIVER(meson_clk) = { U_BOOT_DRIVER(meson_clk_a1) = {
.name = "meson-clk-a1", .name = "meson-clk-a1",
.id = UCLASS_CLK, .id = UCLASS_CLK,
.of_match = meson_clk_ids, .of_match = meson_clk_ids,

View File

@@ -962,7 +962,7 @@ static const struct udevice_id meson_clk_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(meson_clk) = { U_BOOT_DRIVER(meson_clk_gxbb) = {
.name = "meson_clk", .name = "meson_clk",
.id = UCLASS_CLK, .id = UCLASS_CLK,
.of_match = meson_clk_ids, .of_match = meson_clk_ids,

View File

@@ -84,7 +84,7 @@ static const struct udevice_id npcm7xx_clk_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(clk_npcm) = { U_BOOT_DRIVER(clk_npcm750) = {
.name = "clk_npcm", .name = "clk_npcm",
.id = UCLASS_CLK, .id = UCLASS_CLK,
.of_match = npcm7xx_clk_ids, .of_match = npcm7xx_clk_ids,

View File

@@ -87,7 +87,7 @@ static const struct udevice_id npcm8xx_clk_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(clk_npcm) = { U_BOOT_DRIVER(clk_npcm845) = {
.name = "clk_npcm", .name = "clk_npcm",
.id = UCLASS_CLK, .id = UCLASS_CLK,
.of_match = npcm8xx_clk_ids, .of_match = npcm8xx_clk_ids,

View File

@@ -2193,7 +2193,7 @@ static int stm32mp1_clk_probe(struct udevice *dev)
return 0; return 0;
} }
U_BOOT_DRIVER(stm32mp1_clock) = { U_BOOT_DRIVER(stm32mp13_clock) = {
.name = "stm32mp13_clk", .name = "stm32mp13_clk",
.id = UCLASS_CLK, .id = UCLASS_CLK,
.ops = &stm32_clk_ops, .ops = &stm32_clk_ops,

View File

@@ -2866,7 +2866,7 @@ static const struct udevice_id udma_ids[] = {
{ /* Sentinel */ }, { /* Sentinel */ },
}; };
U_BOOT_DRIVER(ti_edma3) = { U_BOOT_DRIVER(ti_udma) = {
.name = "ti-udma", .name = "ti-udma",
.id = UCLASS_DMA, .id = UCLASS_DMA,
.of_match = udma_ids, .of_match = udma_ids,

View File

@@ -117,7 +117,7 @@ static const struct udevice_id tegra186_bpmp_i2c_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(i2c_gpio) = { U_BOOT_DRIVER(tegra186_bpmp_i2c) = {
.name = "tegra186_bpmp_i2c", .name = "tegra186_bpmp_i2c",
.id = UCLASS_I2C, .id = UCLASS_I2C,
.of_match = tegra186_bpmp_i2c_ids, .of_match = tegra186_bpmp_i2c_ids,

View File

@@ -243,7 +243,7 @@ static const struct udevice_id bcm2835_sdhci_match[] = {
{ /* sentinel */ } { /* sentinel */ }
}; };
U_BOOT_DRIVER(sdhci_cdns) = { U_BOOT_DRIVER(sdhci_bcm2835) = {
.name = "sdhci-bcm2835", .name = "sdhci-bcm2835",
.id = UCLASS_MMC, .id = UCLASS_MMC,
.of_match = bcm2835_sdhci_match, .of_match = bcm2835_sdhci_match,

View File

@@ -1686,7 +1686,7 @@ static int fsl_esdhc_bind(struct udevice *dev)
return mmc_bind(dev, &plat->mmc, &plat->cfg); return mmc_bind(dev, &plat->mmc, &plat->cfg);
} }
U_BOOT_DRIVER(fsl_esdhc) = { U_BOOT_DRIVER(fsl_esdhc_imx) = {
.name = "fsl_esdhc", .name = "fsl_esdhc",
.id = UCLASS_MMC, .id = UCLASS_MMC,
.of_match = fsl_esdhc_ids, .of_match = fsl_esdhc_ids,

View File

@@ -745,7 +745,7 @@ static const struct udevice_id sdhci_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(arasan_sdhci_drv) = { U_BOOT_DRIVER(rockchip_sdhci_5_1_drv) = {
.name = "rockchip_sdhci_5_1", .name = "rockchip_sdhci_5_1",
.id = UCLASS_MMC, .id = UCLASS_MMC,
.of_match = sdhci_ids, .of_match = sdhci_ids,

View File

@@ -597,7 +597,7 @@ static const struct udevice_id xgmac_eth_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(eth_xgmac) = { U_BOOT_DRIVER(calxeda_hb_xgmac) = {
.name = "eth_xgmac", .name = "eth_xgmac",
.id = UCLASS_ETH, .id = UCLASS_ETH,
.of_match = xgmac_eth_ids, .of_match = xgmac_eth_ids,

View File

@@ -1206,7 +1206,7 @@ static const struct udevice_id xgmac_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(eth_xgmac) = { U_BOOT_DRIVER(dwc_eth_xgmac) = {
.name = "eth_xgmac", .name = "eth_xgmac",
.id = UCLASS_ETH, .id = UCLASS_ETH,
.of_match = of_match_ptr(xgmac_ids), .of_match = of_match_ptr(xgmac_ids),

View File

@@ -152,7 +152,7 @@ static const struct udevice_id qe_uec_mdio_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(mvmdio) = { U_BOOT_DRIVER(qe_uec_mdio) = {
.name = "qe_uec_mdio", .name = "qe_uec_mdio",
.id = UCLASS_MDIO, .id = UCLASS_MDIO,
.of_match = qe_uec_mdio_ids, .of_match = qe_uec_mdio_ids,

View File

@@ -1138,7 +1138,7 @@ static const struct udevice_id netsec_ids[] = {
{} {}
}; };
U_BOOT_DRIVER(ave) = { U_BOOT_DRIVER(synquacer_netsec) = {
.name = "synquacer_netsec", .name = "synquacer_netsec",
.id = UCLASS_ETH, .id = UCLASS_ETH,
.of_match = netsec_ids, .of_match = netsec_ids,

View File

@@ -1283,7 +1283,7 @@ static const struct udevice_id meson_g12a_pinctrl_match[] = {
{ }, { },
}; };
U_BOOT_DRIVER(meson_axg_pinctrl) = { U_BOOT_DRIVER(meson_g12a_pinctrl) = {
.name = "meson-g12a-pinctrl", .name = "meson-g12a-pinctrl",
.id = UCLASS_PINCTRL, .id = UCLASS_PINCTRL,
.of_match = of_match_ptr(meson_g12a_pinctrl_match), .of_match = of_match_ptr(meson_g12a_pinctrl_match),

View File

@@ -182,8 +182,8 @@ static const struct udevice_id tegra_pinctrl_ids[] = {
{ }, { },
}; };
U_BOOT_DRIVER(tegra_pinctrl) = { U_BOOT_DRIVER(tegra20_pinctrl) = {
.name = "tegra_pinctrl", .name = "tegra20_pinctrl",
.id = UCLASS_PINCTRL, .id = UCLASS_PINCTRL,
.of_match = tegra_pinctrl_ids, .of_match = tegra_pinctrl_ids,
.bind = tegra_pinctrl_bind, .bind = tegra_pinctrl_bind,

View File

@@ -46,7 +46,7 @@ static int stm32_reset_probe(struct udevice *dev)
return stm32_reset_core_probe(dev, &stm32mp1_reset_data); return stm32_reset_core_probe(dev, &stm32mp1_reset_data);
} }
U_BOOT_DRIVER(stm32mp25_rcc_reset) = { U_BOOT_DRIVER(stm32mp1_rcc_reset) = {
.name = "stm32mp1_reset", .name = "stm32mp1_reset",
.id = UCLASS_RESET, .id = UCLASS_RESET,
.probe = stm32_reset_probe, .probe = stm32_reset_probe,

View File

@@ -347,8 +347,8 @@ static const struct udevice_id mvebu_spi_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(mvebu_spi) = { U_BOOT_DRIVER(kirkwood_spi) = {
.name = "mvebu_spi", .name = "kirkwood_spi",
.id = UCLASS_SPI, .id = UCLASS_SPI,
.of_match = mvebu_spi_ids, .of_match = mvebu_spi_ids,
.ops = &mvebu_spi_ops, .ops = &mvebu_spi_ops,

View File

@@ -307,8 +307,8 @@ static const struct udevice_id mvebu_spi_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(mvebu_spi) = { U_BOOT_DRIVER(mvebu_a3700_spi) = {
.name = "mvebu_spi", .name = "mvebu_a3700_spi",
.id = UCLASS_SPI, .id = UCLASS_SPI,
.of_match = mvebu_spi_ids, .of_match = mvebu_spi_ids,
.ops = &mvebu_spi_ops, .ops = &mvebu_spi_ops,

View File

@@ -80,7 +80,7 @@ static struct sysreset_ops socfpga_sysreset = {
.request = socfpga_sysreset_request, .request = socfpga_sysreset_request,
}; };
U_BOOT_DRIVER(sysreset_socfpga) = { U_BOOT_DRIVER(sysreset_socfpga_soc64) = {
.id = UCLASS_SYSRESET, .id = UCLASS_SYSRESET,
.name = "socfpga_sysreset", .name = "socfpga_sysreset",
.ops = &socfpga_sysreset, .ops = &socfpga_sysreset,

View File

@@ -533,7 +533,7 @@ static const struct udevice_id dwc3_meson_g12a_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(dwc3_generic_wrapper) = { U_BOOT_DRIVER(dwc3_meson_g12a) = {
.name = "dwc3-meson-g12a", .name = "dwc3-meson-g12a",
.id = UCLASS_SIMPLE_BUS, .id = UCLASS_SIMPLE_BUS,
.of_match = dwc3_meson_g12a_ids, .of_match = dwc3_meson_g12a_ids,

View File

@@ -430,7 +430,7 @@ static const struct udevice_id dwc3_meson_gxl_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(dwc3_generic_wrapper) = { U_BOOT_DRIVER(dwc3_meson_gxl) = {
.name = "dwc3-meson-gxl", .name = "dwc3-meson-gxl",
.id = UCLASS_SIMPLE_BUS, .id = UCLASS_SIMPLE_BUS,
.of_match = dwc3_meson_gxl_ids, .of_match = dwc3_meson_gxl_ids,

View File

@@ -249,7 +249,7 @@ static const struct udevice_id ehci_usb_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(usb_ehci) = { U_BOOT_DRIVER(ehci_exynos) = {
.name = "ehci_exynos", .name = "ehci_exynos",
.id = UCLASS_USB, .id = UCLASS_USB,
.of_match = ehci_usb_ids, .of_match = ehci_usb_ids,

View File

@@ -117,7 +117,7 @@ void ci_init_after_reset(struct ehci_ctrl *ctrl)
} }
#endif #endif
U_BOOT_DRIVER(usb_ehci) = { U_BOOT_DRIVER(ehci_msm) = {
.name = "ehci_msm", .name = "ehci_msm",
.id = UCLASS_USB, .id = UCLASS_USB,
.of_to_plat = ehci_usb_of_to_plat, .of_to_plat = ehci_usb_of_to_plat,

View File

@@ -969,7 +969,7 @@ static const struct udevice_id ehci_usb_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(usb_ehci) = { U_BOOT_DRIVER(ehci_tegra) = {
.name = "ehci_tegra", .name = "ehci_tegra",
.id = UCLASS_USB, .id = UCLASS_USB,
.of_match = ehci_usb_ids, .of_match = ehci_usb_ids,

View File

@@ -344,7 +344,7 @@ static const struct udevice_id vf_usb_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(usb_ehci) = { U_BOOT_DRIVER(ehci_vf) = {
.name = "ehci_vf", .name = "ehci_vf",
.id = UCLASS_USB, .id = UCLASS_USB,
.of_match = vf_usb_ids, .of_match = vf_usb_ids,

View File

@@ -165,7 +165,7 @@ static const struct udevice_id da8xx_ohci_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(ohci_generic) = { U_BOOT_DRIVER(ohci_da8xx) = {
.name = "ohci-da8xx", .name = "ohci-da8xx",
.id = UCLASS_USB, .id = UCLASS_USB,
.of_match = da8xx_ohci_ids, .of_match = da8xx_ohci_ids,

View File

@@ -279,7 +279,7 @@ static const struct udevice_id pic32_musb_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(usb_musb) = { U_BOOT_DRIVER(musb_pic32) = {
.name = "pic32-musb", .name = "pic32-musb",
.id = UCLASS_USB, .id = UCLASS_USB,
.of_match = pic32_musb_ids, .of_match = pic32_musb_ids,

View File

@@ -188,7 +188,7 @@ static const struct udevice_id sc5xx_musb_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(usb_musb) = { U_BOOT_DRIVER(musb_sc5xx) = {
.name = "sc5xx-musb", .name = "sc5xx-musb",
.id = UCLASS_USB, .id = UCLASS_USB,
.of_match = sc5xx_musb_ids, .of_match = sc5xx_musb_ids,

View File

@@ -545,7 +545,7 @@ static const struct udevice_id sunxi_musb_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(usb_musb) = { U_BOOT_DRIVER(musb_sunxi) = {
.name = "sunxi-musb", .name = "sunxi-musb",
#ifdef CONFIG_USB_MUSB_HOST #ifdef CONFIG_USB_MUSB_HOST
.id = UCLASS_USB, .id = UCLASS_USB,

View File

@@ -177,8 +177,8 @@ static const struct udevice_id rk_mipi_dsi_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(rk_mipi_dsi) = { U_BOOT_DRIVER(rk3288_mipi_dsi) = {
.name = "rk_mipi_dsi", .name = "rk3288_mipi_dsi",
.id = UCLASS_DISPLAY, .id = UCLASS_DISPLAY,
.of_match = rk_mipi_dsi_ids, .of_match = rk_mipi_dsi_ids,
.of_to_plat = rk_mipi_of_to_plat, .of_to_plat = rk_mipi_of_to_plat,

View File

@@ -168,8 +168,8 @@ static const struct udevice_id rk_mipi_dsi_ids[] = {
{ } { }
}; };
U_BOOT_DRIVER(rk_mipi_dsi) = { U_BOOT_DRIVER(rk3399_mipi_dsi) = {
.name = "rk_mipi_dsi", .name = "rk3399_mipi_dsi",
.id = UCLASS_DISPLAY, .id = UCLASS_DISPLAY,
.of_match = rk_mipi_dsi_ids, .of_match = rk_mipi_dsi_ids,
.of_to_plat = rk_mipi_of_to_plat, .of_to_plat = rk_mipi_of_to_plat,

View File

@@ -130,7 +130,7 @@ static const struct udevice_id smcwd_dt_ids[] = {
{} {}
}; };
U_BOOT_DRIVER(wdt_sandbox) = { U_BOOT_DRIVER(arm_smc_wdt) = {
.name = "smcwd", .name = "smcwd",
.id = UCLASS_WDT, .id = UCLASS_WDT,
.of_match = smcwd_dt_ids, .of_match = smcwd_dt_ids,