[PATCH v4 01/14] drivers: rename drivers to match compatible string
Walter Lozano
walter.lozano at collabora.com
Thu Jun 25 06:10:04 CEST 2020
When using OF_PLATDATA, the bind process between devices and drivers
is performed trying to match compatible string with driver names.
However driver names are not strictly defined, and also there are different
names used when declaring a driver with U_BOOT_DRIVER, the name of the
symbol used in the linker list and the used in the struct driver_info.
In order to make things a bit more clear, rename the drivers names. This
will also help for further OF_PLATDATA improvements, such as checking
for valid driver names.
Signed-off-by: Walter Lozano <walter.lozano at collabora.com>
---
.../mach-at91/arm926ejs/at91sam9260_devices.c | 6 +--
.../arm926ejs/at91sam9m10g45_devices.c | 10 ++--
arch/arm/mach-rockchip/rk3328/syscon_rk3328.c | 4 +-
board/davinci/da8xxevm/omapl138_lcdk.c | 2 +-
board/sandbox/sandbox.c | 2 +-
drivers/clk/at91/clk-master.c | 4 +-
drivers/clk/at91/clk-peripheral.c | 4 +-
drivers/clk/at91/pmc.c | 4 +-
drivers/core/simple-bus.c | 4 +-
drivers/gpio/at91_gpio.c | 4 +-
drivers/gpio/da8xx_gpio.c | 4 +-
drivers/gpio/mxs_gpio.c | 6 +--
drivers/gpio/rk_gpio.c | 4 +-
drivers/gpio/sandbox.c | 4 +-
drivers/i2c/rk_i2c.c | 4 +-
drivers/input/cros_ec_keyb.c | 4 +-
drivers/misc/cros_ec_sandbox.c | 4 +-
drivers/mmc/davinci_mmc.c | 4 +-
drivers/mmc/mxsmmc.c | 6 +--
drivers/mmc/rockchip_dw_mmc.c | 2 +-
drivers/mtd/spi/sf-uclass.c | 2 +-
drivers/mtd/spi/sf_probe.c | 4 +-
drivers/pinctrl/nxp/pinctrl-mxs.c | 4 +-
drivers/pinctrl/pinctrl-at91.c | 4 +-
drivers/pinctrl/rockchip/pinctrl-rk3188.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3288.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3328.c | 2 +-
drivers/pinctrl/rockchip/pinctrl-rk3368.c | 2 +-
drivers/power/pmic/rk8xx.c | 4 +-
drivers/power/regulator/fixed.c | 4 +-
drivers/ram/rockchip/dmc-rk3368.c | 2 +-
drivers/ram/rockchip/sdram_rk3188.c | 2 +-
drivers/ram/rockchip/sdram_rk3288.c | 2 +-
drivers/ram/rockchip/sdram_rk3328.c | 2 +-
drivers/serial/sandbox.c | 6 +--
drivers/spi/mxs_spi.c | 6 +--
drivers/spi/rk_spi.c | 6 +--
drivers/spi/sandbox_spi.c | 4 +-
drivers/tpm/tpm_tis_sandbox.c | 4 +-
drivers/video/rockchip/rk3288_vop.c | 4 +-
drivers/video/sandbox_sdl.c | 4 +-
drivers/watchdog/at91sam9_wdt.c | 4 +-
test/dm/gpio.c | 2 +-
test/dm/spi.c | 6 +--
test/py/tests/test_bind.py | 54 +++++++++----------
45 files changed, 104 insertions(+), 120 deletions(-)
diff --git a/arch/arm/mach-at91/arm926ejs/at91sam9260_devices.c b/arch/arm/mach-at91/arm926ejs/at91sam9260_devices.c
index c033ed6d16..8122d2f98e 100644
--- a/arch/arm/mach-at91/arm926ejs/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/arm926ejs/at91sam9260_devices.c
@@ -220,7 +220,7 @@ static const struct at91_port_platdata at91sam9260_plat[] = {
};
U_BOOT_DEVICES(at91sam9260_gpios) = {
- { "gpio_at91", &at91sam9260_plat[0] },
- { "gpio_at91", &at91sam9260_plat[1] },
- { "gpio_at91", &at91sam9260_plat[2] },
+ { "atmel_at91rm9200_gpio", &at91sam9260_plat[0] },
+ { "atmel_at91rm9200_gpio", &at91sam9260_plat[1] },
+ { "atmel_at91rm9200_gpio", &at91sam9260_plat[2] },
};
diff --git a/arch/arm/mach-at91/arm926ejs/at91sam9m10g45_devices.c b/arch/arm/mach-at91/arm926ejs/at91sam9m10g45_devices.c
index 89cbeafa20..08ca3edd78 100644
--- a/arch/arm/mach-at91/arm926ejs/at91sam9m10g45_devices.c
+++ b/arch/arm/mach-at91/arm926ejs/at91sam9m10g45_devices.c
@@ -176,9 +176,9 @@ static const struct at91_port_platdata at91sam9260_plat[] = {
};
U_BOOT_DEVICES(at91sam9260_gpios) = {
- { "gpio_at91", &at91sam9260_plat[0] },
- { "gpio_at91", &at91sam9260_plat[1] },
- { "gpio_at91", &at91sam9260_plat[2] },
- { "gpio_at91", &at91sam9260_plat[3] },
- { "gpio_at91", &at91sam9260_plat[4] },
+ { "atmel_at91rm9200_gpio", &at91sam9260_plat[0] },
+ { "atmel_at91rm9200_gpio", &at91sam9260_plat[1] },
+ { "atmel_at91rm9200_gpio", &at91sam9260_plat[2] },
+ { "atmel_at91rm9200_gpio", &at91sam9260_plat[3] },
+ { "atmel_at91rm9200_gpio", &at91sam9260_plat[4] },
};
diff --git a/arch/arm/mach-rockchip/rk3328/syscon_rk3328.c b/arch/arm/mach-rockchip/rk3328/syscon_rk3328.c
index 8a0eceb178..daf74a0e2d 100644
--- a/arch/arm/mach-rockchip/rk3328/syscon_rk3328.c
+++ b/arch/arm/mach-rockchip/rk3328/syscon_rk3328.c
@@ -13,8 +13,8 @@ static const struct udevice_id rk3328_syscon_ids[] = {
{ }
};
-U_BOOT_DRIVER(syscon_rk3328) = {
- .name = "rk3328_syscon",
+U_BOOT_DRIVER(rockchip_rk3328_grf) = {
+ .name = "rockchip_rk3328_grf",
.id = UCLASS_SYSCON,
.of_match = rk3328_syscon_ids,
};
diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c
index 608a7f28eb..269071e503 100644
--- a/board/davinci/da8xxevm/omapl138_lcdk.c
+++ b/board/davinci/da8xxevm/omapl138_lcdk.c
@@ -368,7 +368,7 @@ U_BOOT_DEVICE(omapl138_uart) = {
};
U_BOOT_DEVICE(omapl138_mmc) = {
- .name = "davinci_mmc",
+ .name = "ti_da830_mmc",
};
void spl_board_init(void)
diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c
index 1372003018..bd39109f3b 100644
--- a/board/sandbox/sandbox.c
+++ b/board/sandbox/sandbox.c
@@ -22,7 +22,7 @@ gd_t *gd;
/* Add a simple GPIO device */
U_BOOT_DEVICE(gpio_sandbox) = {
- .name = "gpio_sandbox",
+ .name = "sandbox_gpio",
};
void flush_cache(unsigned long start, unsigned long size)
diff --git a/drivers/clk/at91/clk-master.c b/drivers/clk/at91/clk-master.c
index 4fa33c4715..e078fab7b4 100644
--- a/drivers/clk/at91/clk-master.c
+++ b/drivers/clk/at91/clk-master.c
@@ -25,8 +25,8 @@ static const struct udevice_id at91_master_clk_match[] = {
{}
};
-U_BOOT_DRIVER(at91_master_clk) = {
- .name = "at91-master-clk",
+U_BOOT_DRIVER(atmel_at91rm9200_clk_master) = {
+ .name = "atmel_at91rm9200_clk_master",
.id = UCLASS_CLK,
.of_match = at91_master_clk_match,
.ops = &at91_master_clk_ops,
diff --git a/drivers/clk/at91/clk-peripheral.c b/drivers/clk/at91/clk-peripheral.c
index c55e6214b2..cd9d5e77c0 100644
--- a/drivers/clk/at91/clk-peripheral.c
+++ b/drivers/clk/at91/clk-peripheral.c
@@ -43,8 +43,8 @@ static const struct udevice_id sam9x5_periph_clk_match[] = {
{}
};
-U_BOOT_DRIVER(sam9x5_periph_clk) = {
- .name = "sam9x5-periph-clk",
+U_BOOT_DRIVER(atmel_at91rm9200_clk_peripheral) = {
+ .name = "atmel_at91rm9200_clk_peripheral",
.id = UCLASS_MISC,
.of_match = sam9x5_periph_clk_match,
.bind = sam9x5_periph_clk_bind,
diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c
index f5808449a6..1fede16a0c 100644
--- a/drivers/clk/at91/pmc.c
+++ b/drivers/clk/at91/pmc.c
@@ -24,8 +24,8 @@ static const struct udevice_id at91_pmc_match[] = {
{}
};
-U_BOOT_DRIVER(at91_pmc) = {
- .name = "at91-pmc",
+U_BOOT_DRIVER(atmel_at91rm9200_pmc) = {
+ .name = "atmel_at91rm9200_pmc",
.id = UCLASS_SIMPLE_BUS,
.of_match = at91_pmc_match,
};
diff --git a/drivers/core/simple-bus.c b/drivers/core/simple-bus.c
index 7fc23ef82d..7cc1d46009 100644
--- a/drivers/core/simple-bus.c
+++ b/drivers/core/simple-bus.c
@@ -56,8 +56,8 @@ static const struct udevice_id generic_simple_bus_ids[] = {
{ }
};
-U_BOOT_DRIVER(simple_bus_drv) = {
- .name = "generic_simple_bus",
+U_BOOT_DRIVER(simple_bus) = {
+ .name = "simple_bus",
.id = UCLASS_SIMPLE_BUS,
.of_match = generic_simple_bus_ids,
.flags = DM_FLAG_PRE_RELOC,
diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c
index 3621cf2408..4a8b2e6ff6 100644
--- a/drivers/gpio/at91_gpio.c
+++ b/drivers/gpio/at91_gpio.c
@@ -624,8 +624,8 @@ static const struct udevice_id at91_gpio_ids[] = {
};
#endif
-U_BOOT_DRIVER(gpio_at91) = {
- .name = "gpio_at91",
+U_BOOT_DRIVER(atmel_at91rm9200_gpio) = {
+ .name = "atmel_at91rm9200_gpio",
.id = UCLASS_GPIO,
#if CONFIG_IS_ENABLED(OF_CONTROL)
.of_match = at91_gpio_ids,
diff --git a/drivers/gpio/da8xx_gpio.c b/drivers/gpio/da8xx_gpio.c
index 0d0e9d2254..ab0a5cfd33 100644
--- a/drivers/gpio/da8xx_gpio.c
+++ b/drivers/gpio/da8xx_gpio.c
@@ -553,8 +553,8 @@ static int davinci_gpio_ofdata_to_platdata(struct udevice *dev)
return 0;
}
-U_BOOT_DRIVER(gpio_davinci) = {
- .name = "gpio_davinci",
+U_BOOT_DRIVER(ti_dm6441_gpio) = {
+ .name = "ti_dm6441_gpio",
.id = UCLASS_GPIO,
.ops = &gpio_davinci_ops,
.ofdata_to_platdata = of_match_ptr(davinci_gpio_ofdata_to_platdata),
diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c
index 405e9ac135..e43484d13a 100644
--- a/drivers/gpio/mxs_gpio.c
+++ b/drivers/gpio/mxs_gpio.c
@@ -297,12 +297,8 @@ static const struct udevice_id mxs_gpio_ids[] = {
};
#endif
-U_BOOT_DRIVER(gpio_mxs) = {
-#ifdef CONFIG_MX28
- .name = "fsl_imx28_gpio",
-#else /* CONFIG_MX23 */
+U_BOOT_DRIVER(fsl_imx23_gpio) = {
.name = "fsl_imx23_gpio",
-#endif
.id = UCLASS_GPIO,
.ops = &gpio_mxs_ops,
.probe = mxs_gpio_probe,
diff --git a/drivers/gpio/rk_gpio.c b/drivers/gpio/rk_gpio.c
index 3d96678a45..8cc288581c 100644
--- a/drivers/gpio/rk_gpio.c
+++ b/drivers/gpio/rk_gpio.c
@@ -172,8 +172,8 @@ static const struct udevice_id rockchip_gpio_ids[] = {
{ }
};
-U_BOOT_DRIVER(gpio_rockchip) = {
- .name = "gpio_rockchip",
+U_BOOT_DRIVER(rockchip_gpio_bank) = {
+ .name = "rockchip_gpio_bank",
.id = UCLASS_GPIO,
.of_match = rockchip_gpio_ids,
.ops = &gpio_rockchip_ops,
diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c
index 9549c74c2b..ff46d3c8d1 100644
--- a/drivers/gpio/sandbox.c
+++ b/drivers/gpio/sandbox.c
@@ -243,8 +243,8 @@ static const struct udevice_id sandbox_gpio_ids[] = {
{ }
};
-U_BOOT_DRIVER(gpio_sandbox) = {
- .name = "gpio_sandbox",
+U_BOOT_DRIVER(sandbox_gpio) = {
+ .name = "sandbox_gpio",
.id = UCLASS_GPIO,
.of_match = sandbox_gpio_ids,
.ofdata_to_platdata = sandbox_gpio_ofdata_to_platdata,
diff --git a/drivers/i2c/rk_i2c.c b/drivers/i2c/rk_i2c.c
index 32b2ee8578..eceef80e70 100644
--- a/drivers/i2c/rk_i2c.c
+++ b/drivers/i2c/rk_i2c.c
@@ -483,8 +483,8 @@ static const struct udevice_id rockchip_i2c_ids[] = {
{ }
};
-U_BOOT_DRIVER(i2c_rockchip) = {
- .name = "i2c_rockchip",
+U_BOOT_DRIVER(rockchip_rk3066_i2c) = {
+ .name = "rockchip_rk3066_i2c",
.id = UCLASS_I2C,
.of_match = rockchip_i2c_ids,
.ofdata_to_platdata = rockchip_i2c_ofdata_to_platdata,
diff --git a/drivers/input/cros_ec_keyb.c b/drivers/input/cros_ec_keyb.c
index 8c1a25c73f..6c26157b07 100644
--- a/drivers/input/cros_ec_keyb.c
+++ b/drivers/input/cros_ec_keyb.c
@@ -224,8 +224,8 @@ static const struct udevice_id cros_ec_kbd_ids[] = {
{ }
};
-U_BOOT_DRIVER(cros_ec_kbd) = {
- .name = "cros_ec_kbd",
+U_BOOT_DRIVER(google_cros_ec_keyb) = {
+ .name = "google_cros_ec_keyb",
.id = UCLASS_KEYBOARD,
.of_match = cros_ec_kbd_ids,
.probe = cros_ec_kbd_probe,
diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index 9dd6a18b2b..dc72a2c43d 100644
--- a/drivers/misc/cros_ec_sandbox.c
+++ b/drivers/misc/cros_ec_sandbox.c
@@ -571,8 +571,8 @@ static const struct udevice_id cros_ec_ids[] = {
{ }
};
-U_BOOT_DRIVER(cros_ec_sandbox) = {
- .name = "cros_ec_sandbox",
+U_BOOT_DRIVER(google_cros_ec_sandbox) = {
+ .name = "google_cros_ec_sandbox",
.id = UCLASS_CROS_EC,
.of_match = cros_ec_ids,
.probe = cros_ec_probe,
diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
index ef5cd4e723..4da3827e47 100644
--- a/drivers/mmc/davinci_mmc.c
+++ b/drivers/mmc/davinci_mmc.c
@@ -538,8 +538,8 @@ static const struct udevice_id davinci_mmc_ids[] = {
{},
};
-U_BOOT_DRIVER(davinci_mmc_drv) = {
- .name = "davinci_mmc",
+U_BOOT_DRIVER(ti_da830_mmc) = {
+ .name = "ti_da830_mmc",
.id = UCLASS_MMC,
.of_match = davinci_mmc_ids,
#if CONFIG_BLK
diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c
index 9414eff42b..35c336b499 100644
--- a/drivers/mmc/mxsmmc.c
+++ b/drivers/mmc/mxsmmc.c
@@ -708,12 +708,8 @@ static const struct udevice_id mxsmmc_ids[] = {
};
#endif
-U_BOOT_DRIVER(mxsmmc) = {
-#ifdef CONFIG_MX28
- .name = "fsl_imx28_mmc",
-#else /* CONFIG_MX23 */
+U_BOOT_DRIVER(fsl_imx23_mmc) = {
.name = "fsl_imx23_mmc",
-#endif
.id = UCLASS_MMC,
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
.of_match = mxsmmc_ids,
diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
index a0e1be8794..ef75367b3e 100644
--- a/drivers/mmc/rockchip_dw_mmc.c
+++ b/drivers/mmc/rockchip_dw_mmc.c
@@ -166,7 +166,7 @@ static const struct udevice_id rockchip_dwmmc_ids[] = {
{ }
};
-U_BOOT_DRIVER(rockchip_dwmmc_drv) = {
+U_BOOT_DRIVER(rockchip_rk3288_dw_mshc) = {
.name = "rockchip_rk3288_dw_mshc",
.id = UCLASS_MMC,
.of_match = rockchip_dwmmc_ids,
diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c
index 5ebcca590a..b335cbc90b 100644
--- a/drivers/mtd/spi/sf-uclass.c
+++ b/drivers/mtd/spi/sf-uclass.c
@@ -76,7 +76,7 @@ int spi_flash_probe_bus_cs(unsigned int busnum, unsigned int cs,
str = strdup(name);
#endif
ret = spi_get_bus_and_cs(busnum, cs, max_hz, spi_mode,
- "spi_flash_std", str, &bus, &slave);
+ "jedec_spi_nor", str, &bus, &slave);
if (ret)
return ret;
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
index 72b6ee702d..1b44cc68c6 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
@@ -170,8 +170,8 @@ static const struct udevice_id spi_flash_std_ids[] = {
{ }
};
-U_BOOT_DRIVER(spi_flash_std) = {
- .name = "spi_flash_std",
+U_BOOT_DRIVER(jedec_spi_nor) = {
+ .name = "jedec_spi_nor",
.id = UCLASS_SPI_FLASH,
.of_match = spi_flash_std_ids,
.probe = spi_flash_std_probe,
diff --git a/drivers/pinctrl/nxp/pinctrl-mxs.c b/drivers/pinctrl/nxp/pinctrl-mxs.c
index 8d61dfe863..bd434667b1 100644
--- a/drivers/pinctrl/nxp/pinctrl-mxs.c
+++ b/drivers/pinctrl/nxp/pinctrl-mxs.c
@@ -179,8 +179,8 @@ static const struct udevice_id mxs_pinctrl_match[] = {
{ /* sentinel */ }
};
-U_BOOT_DRIVER(mxs_pinctrl) = {
- .name = "mxs-pinctrl",
+U_BOOT_DRIVER(fsl_imx23_pinctrl) = {
+ .name = "fsl_imx23_pinctrl",
.id = UCLASS_PINCTRL,
.of_match = of_match_ptr(mxs_pinctrl_match),
.probe = mxs_pinctrl_probe,
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 27f274ff02..0cc35042f5 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -517,8 +517,8 @@ static const struct udevice_id at91_pinctrl_match[] = {
{}
};
-U_BOOT_DRIVER(at91_pinctrl) = {
- .name = "pinctrl_at91",
+U_BOOT_DRIVER(atmel_sama5d3_pinctrl) = {
+ .name = "atmel_sama5d3_pinctrl",
.id = UCLASS_PINCTRL,
.of_match = at91_pinctrl_match,
.probe = at91_pinctrl_probe,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3188.c b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
index 043764fc92..f1d76b1c8f 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3188.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
@@ -119,7 +119,7 @@ static const struct udevice_id rk3188_pinctrl_ids[] = {
{ }
};
-U_BOOT_DRIVER(pinctrl_rk3188) = {
+U_BOOT_DRIVER(rockchip_rk3188_pinctrl) = {
.name = "rockchip_rk3188_pinctrl",
.id = UCLASS_PINCTRL,
.of_match = rk3188_pinctrl_ids,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3288.c b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
index 7ae147f304..c617d21b7a 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3288.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
@@ -240,7 +240,7 @@ static const struct udevice_id rk3288_pinctrl_ids[] = {
{ }
};
-U_BOOT_DRIVER(pinctrl_rk3288) = {
+U_BOOT_DRIVER(rockchip_rk3288_pinctrl) = {
.name = "rockchip_rk3288_pinctrl",
.id = UCLASS_PINCTRL,
.of_match = rk3288_pinctrl_ids,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3328.c b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
index 8d37a6f945..6da9eee16e 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3328.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
@@ -315,7 +315,7 @@ static const struct udevice_id rk3328_pinctrl_ids[] = {
{ }
};
-U_BOOT_DRIVER(pinctrl_rk3328) = {
+U_BOOT_DRIVER(rockchip_rk3328_pinctrl) = {
.name = "rockchip_rk3328_pinctrl",
.id = UCLASS_PINCTRL,
.of_match = rk3328_pinctrl_ids,
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3368.c b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
index 6cb7bb45d9..52ecffeddd 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3368.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
@@ -170,7 +170,7 @@ static const struct udevice_id rk3368_pinctrl_ids[] = {
{ }
};
-U_BOOT_DRIVER(pinctrl_rk3368) = {
+U_BOOT_DRIVER(rockchip_rk3368_pinctrl) = {
.name = "rockchip_rk3368_pinctrl",
.id = UCLASS_PINCTRL,
.of_match = rk3368_pinctrl_ids,
diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c
index 52e6d9d8c0..d870ed7113 100644
--- a/drivers/power/pmic/rk8xx.c
+++ b/drivers/power/pmic/rk8xx.c
@@ -182,8 +182,8 @@ static const struct udevice_id rk8xx_ids[] = {
{ }
};
-U_BOOT_DRIVER(pmic_rk8xx) = {
- .name = "rk8xx pmic",
+U_BOOT_DRIVER(rockchip_rk805) = {
+ .name = "rockchip_rk805",
.id = UCLASS_PMIC,
.of_match = rk8xx_ids,
#if CONFIG_IS_ENABLED(PMIC_CHILDREN)
diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c
index 763e671d54..ac3ec7814c 100644
--- a/drivers/power/regulator/fixed.c
+++ b/drivers/power/regulator/fixed.c
@@ -81,8 +81,8 @@ static const struct udevice_id fixed_regulator_ids[] = {
{ },
};
-U_BOOT_DRIVER(fixed_regulator) = {
- .name = "fixed regulator",
+U_BOOT_DRIVER(regulator_fixed) = {
+ .name = "regulator_fixed",
.id = UCLASS_REGULATOR,
.ops = &fixed_regulator_ops,
.of_match = fixed_regulator_ids,
diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c
index 2d82a176db..b97a629eae 100644
--- a/drivers/ram/rockchip/dmc-rk3368.c
+++ b/drivers/ram/rockchip/dmc-rk3368.c
@@ -989,7 +989,7 @@ static const struct udevice_id rk3368_dmc_ids[] = {
{ }
};
-U_BOOT_DRIVER(dmc_rk3368) = {
+U_BOOT_DRIVER(rockchip_rk3368_dmc) = {
.name = "rockchip_rk3368_dmc",
.id = UCLASS_RAM,
.of_match = rk3368_dmc_ids,
diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c
index 9b5eb38ecc..0822898f6f 100644
--- a/drivers/ram/rockchip/sdram_rk3188.c
+++ b/drivers/ram/rockchip/sdram_rk3188.c
@@ -942,7 +942,7 @@ static const struct udevice_id rk3188_dmc_ids[] = {
{ }
};
-U_BOOT_DRIVER(dmc_rk3188) = {
+U_BOOT_DRIVER(rockchip_rk3188_dmc) = {
.name = "rockchip_rk3188_dmc",
.id = UCLASS_RAM,
.of_match = rk3188_dmc_ids,
diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c
index 9f6f555147..0245ad9844 100644
--- a/drivers/ram/rockchip/sdram_rk3288.c
+++ b/drivers/ram/rockchip/sdram_rk3288.c
@@ -1110,7 +1110,7 @@ static const struct udevice_id rk3288_dmc_ids[] = {
{ }
};
-U_BOOT_DRIVER(dmc_rk3288) = {
+U_BOOT_DRIVER(rockchip_rk3288_dmc) = {
.name = "rockchip_rk3288_dmc",
.id = UCLASS_RAM,
.of_match = rk3288_dmc_ids,
diff --git a/drivers/ram/rockchip/sdram_rk3328.c b/drivers/ram/rockchip/sdram_rk3328.c
index 8329f4a352..d91e0c0f95 100644
--- a/drivers/ram/rockchip/sdram_rk3328.c
+++ b/drivers/ram/rockchip/sdram_rk3328.c
@@ -603,7 +603,7 @@ static const struct udevice_id rk3328_dmc_ids[] = {
{ }
};
-U_BOOT_DRIVER(dmc_rk3328) = {
+U_BOOT_DRIVER(rockchip_rk3328_dmc) = {
.name = "rockchip_rk3328_dmc",
.id = UCLASS_RAM,
.of_match = rk3328_dmc_ids,
diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c
index 545ff3f747..36e081f08c 100644
--- a/drivers/serial/sandbox.c
+++ b/drivers/serial/sandbox.c
@@ -252,8 +252,8 @@ static const struct udevice_id sandbox_serial_ids[] = {
{ }
};
-U_BOOT_DRIVER(serial_sandbox) = {
- .name = "serial_sandbox",
+U_BOOT_DRIVER(sandbox_serial) = {
+ .name = "sandbox_serial",
.id = UCLASS_SERIAL,
.of_match = sandbox_serial_ids,
.ofdata_to_platdata = sandbox_serial_ofdata_to_platdata,
@@ -270,7 +270,7 @@ static const struct sandbox_serial_platdata platdata_non_fdt = {
};
U_BOOT_DEVICE(serial_sandbox_non_fdt) = {
- .name = "serial_sandbox",
+ .name = "sandbox_serial",
.platdata = &platdata_non_fdt,
};
#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */
diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c
index 3ca30887fb..087cd50788 100644
--- a/drivers/spi/mxs_spi.c
+++ b/drivers/spi/mxs_spi.c
@@ -606,12 +606,8 @@ static const struct udevice_id mxs_spi_ids[] = {
};
#endif
-U_BOOT_DRIVER(mxs_spi) = {
-#ifdef CONFIG_MX28
- .name = "fsl_imx28_spi",
-#else /* CONFIG_MX23 */
+U_BOOT_DRIVER(fsl_imx23_spi) = {
.name = "fsl_imx23_spi",
-#endif
.id = UCLASS_SPI,
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
.of_match = mxs_spi_ids,
diff --git a/drivers/spi/rk_spi.c b/drivers/spi/rk_spi.c
index 95eeb8307a..d25a87fad6 100644
--- a/drivers/spi/rk_spi.c
+++ b/drivers/spi/rk_spi.c
@@ -551,12 +551,8 @@ static const struct udevice_id rockchip_spi_ids[] = {
{ }
};
-U_BOOT_DRIVER(rockchip_spi) = {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+U_BOOT_DRIVER(rockchip_rk3288_spi) = {
.name = "rockchip_rk3288_spi",
-#else
- .name = "rockchip_spi",
-#endif
.id = UCLASS_SPI,
.of_match = rockchip_spi_ids,
.ops = &rockchip_spi_ops,
diff --git a/drivers/spi/sandbox_spi.c b/drivers/spi/sandbox_spi.c
index 6b610ff823..d3c0e621d3 100644
--- a/drivers/spi/sandbox_spi.c
+++ b/drivers/spi/sandbox_spi.c
@@ -145,8 +145,8 @@ static const struct udevice_id sandbox_spi_ids[] = {
{ }
};
-U_BOOT_DRIVER(spi_sandbox) = {
- .name = "spi_sandbox",
+U_BOOT_DRIVER(sandbox_spi) = {
+ .name = "sandbox_spi",
.id = UCLASS_SPI,
.of_match = sandbox_spi_ids,
.ops = &sandbox_spi_ops,
diff --git a/drivers/tpm/tpm_tis_sandbox.c b/drivers/tpm/tpm_tis_sandbox.c
index 2dff0d3eee..e167d0a2fe 100644
--- a/drivers/tpm/tpm_tis_sandbox.c
+++ b/drivers/tpm/tpm_tis_sandbox.c
@@ -355,8 +355,8 @@ static const struct udevice_id sandbox_tpm_ids[] = {
{ }
};
-U_BOOT_DRIVER(sandbox_tpm) = {
- .name = "sandbox_tpm",
+U_BOOT_DRIVER(google_sandbox_tpm) = {
+ .name = "google_sandbox_tpm",
.id = UCLASS_TPM,
.of_match = sandbox_tpm_ids,
.ops = &sandbox_tpm_ops,
diff --git a/drivers/video/rockchip/rk3288_vop.c b/drivers/video/rockchip/rk3288_vop.c
index 0f91dab1f2..cac86aeaad 100644
--- a/drivers/video/rockchip/rk3288_vop.c
+++ b/drivers/video/rockchip/rk3288_vop.c
@@ -96,8 +96,8 @@ static const struct udevice_id rk3288_vop_ids[] = {
static const struct video_ops rk3288_vop_ops = {
};
-U_BOOT_DRIVER(rk_vop) = {
- .name = "rk3288_vop",
+U_BOOT_DRIVER(rockchip_rk3288_vop) = {
+ .name = "rockchip_rk3288_vop",
.id = UCLASS_VIDEO,
.of_match = rk3288_vop_ids,
.ops = &rk3288_vop_ops,
diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
index 1196e6c671..7e7a7eff02 100644
--- a/drivers/video/sandbox_sdl.c
+++ b/drivers/video/sandbox_sdl.c
@@ -63,8 +63,8 @@ static const struct udevice_id sandbox_sdl_ids[] = {
{ }
};
-U_BOOT_DRIVER(sdl_sandbox) = {
- .name = "sdl_sandbox",
+U_BOOT_DRIVER(sandbox_lcd_sdl) = {
+ .name = "sandbox_lcd_sdl",
.id = UCLASS_VIDEO,
.of_match = sandbox_sdl_ids,
.bind = sandbox_sdl_bind,
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index 48433cc158..cd05acbc28 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -112,8 +112,8 @@ static int at91_wdt_probe(struct udevice *dev)
return 0;
}
-U_BOOT_DRIVER(at91_wdt) = {
- .name = "at91_wdt",
+U_BOOT_DRIVER(atmel_at91sam9260_wdt) = {
+ .name = "atmel_at91sam9260_wdt",
.id = UCLASS_WDT,
.of_match = at91_wdt_ids,
.priv_auto_alloc_size = sizeof(struct at91_wdt_priv),
diff --git a/test/dm/gpio.c b/test/dm/gpio.c
index 7c18e5c411..7133ccffa9 100644
--- a/test/dm/gpio.c
+++ b/test/dm/gpio.c
@@ -211,7 +211,7 @@ static int dm_test_gpio_anon(struct unit_test_state *uts)
/* And the anonymous bank */
ut_assertok(gpio_lookup_name("14", &dev, &offset, &gpio));
- ut_asserteq_str(dev->name, "gpio_sandbox");
+ ut_asserteq_str(dev->name, "sandbox_gpio");
ut_asserteq(14, offset);
ut_asserteq(14, gpio);
diff --git a/test/dm/spi.c b/test/dm/spi.c
index 8e417acc5f..fc859027a7 100644
--- a/test/dm/spi.c
+++ b/test/dm/spi.c
@@ -58,7 +58,7 @@ static int dm_test_spi_find(struct unit_test_state *uts)
*/
ut_asserteq(-ENODEV, spi_find_bus_and_cs(busnum, cs, &bus, &dev));
ut_asserteq(-ENOENT, spi_get_bus_and_cs(busnum, cs, speed, mode,
- "spi_flash_std", "name", &bus,
+ "jedec_spi_nor", "name", &bus,
&slave));
sandbox_sf_unbind_emul(state_get_current(), busnum, cs);
ut_assertok(spi_cs_info(bus, cs, &info));
@@ -69,7 +69,7 @@ static int dm_test_spi_find(struct unit_test_state *uts)
"name"));
ut_assertok(spi_find_bus_and_cs(busnum, cs, &bus, &dev));
ut_assertok(spi_get_bus_and_cs(busnum, cs, speed, mode,
- "spi_flash_std", "name", &bus, &slave));
+ "jedec_spi_nor", "name", &bus, &slave));
ut_assertok(spi_cs_info(bus, cs, &info));
ut_asserteq_ptr(info.dev, slave->dev);
@@ -78,7 +78,7 @@ static int dm_test_spi_find(struct unit_test_state *uts)
ut_assertok(sandbox_sf_bind_emul(state, busnum, cs_b, bus, node,
"name"));
ut_asserteq(-EINVAL, spi_get_bus_and_cs(busnum, cs_b, speed, mode,
- "spi_flash_std", "name", &bus, &slave));
+ "jedec_spi_nor", "name", &bus, &slave));
ut_asserteq(-EINVAL, spi_cs_info(bus, cs_b, &info));
ut_asserteq_ptr(NULL, info.dev);
diff --git a/test/py/tests/test_bind.py b/test/py/tests/test_bind.py
index 20c6050342..e9681c69c5 100644
--- a/test/py/tests/test_bind.py
+++ b/test/py/tests/test_bind.py
@@ -26,45 +26,45 @@ def in_tree(response, name, uclass, drv, depth, last_child):
def test_bind_unbind_with_node(u_boot_console):
#bind /bind-test. Device should come up as well as its children
- response = u_boot_console.run_command('bind /bind-test generic_simple_bus')
+ response = u_boot_console.run_command('bind /bind-test simple_bus')
assert response == ''
tree = u_boot_console.run_command('dm tree')
- assert in_tree(tree, 'bind-test', 'simple_bus', 'generic_simple_bus', 0, True)
+ assert in_tree(tree, 'bind-test', 'simple_bus', 'simple_bus', 0, True)
assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, False)
- assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'generic_simple_bus', 1, True)
+ assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'simple_bus', 1, True)
#Unbind child #1. No error expected and all devices should be there except for bind-test-child1
response = u_boot_console.run_command('unbind /bind-test/bind-test-child1')
assert response == ''
tree = u_boot_console.run_command('dm tree')
- assert in_tree(tree, 'bind-test', 'simple_bus', 'generic_simple_bus', 0, True)
+ assert in_tree(tree, 'bind-test', 'simple_bus', 'simple_bus', 0, True)
assert 'bind-test-child1' not in tree
- assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'generic_simple_bus', 1, True)
+ assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'simple_bus', 1, True)
#bind child #1. No error expected and all devices should be there
response = u_boot_console.run_command('bind /bind-test/bind-test-child1 phy_sandbox')
assert response == ''
tree = u_boot_console.run_command('dm tree')
- assert in_tree(tree, 'bind-test', 'simple_bus', 'generic_simple_bus', 0, True)
+ assert in_tree(tree, 'bind-test', 'simple_bus', 'simple_bus', 0, True)
assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, True)
- assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'generic_simple_bus', 1, False)
+ assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'simple_bus', 1, False)
#Unbind child #2. No error expected and all devices should be there except for bind-test-child2
response = u_boot_console.run_command('unbind /bind-test/bind-test-child2')
assert response == ''
tree = u_boot_console.run_command('dm tree')
- assert in_tree(tree, 'bind-test', 'simple_bus', 'generic_simple_bus', 0, True)
+ assert in_tree(tree, 'bind-test', 'simple_bus', 'simple_bus', 0, True)
assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, True)
assert 'bind-test-child2' not in tree
#Bind child #2. No error expected and all devices should be there
- response = u_boot_console.run_command('bind /bind-test/bind-test-child2 generic_simple_bus')
+ response = u_boot_console.run_command('bind /bind-test/bind-test-child2 simple_bus')
assert response == ''
tree = u_boot_console.run_command('dm tree')
- assert in_tree(tree, 'bind-test', 'simple_bus', 'generic_simple_bus', 0, True)
+ assert in_tree(tree, 'bind-test', 'simple_bus', 'simple_bus', 0, True)
assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, False)
- assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'generic_simple_bus', 1, True)
+ assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'simple_bus', 1, True)
#Unbind parent. No error expected. All devices should be removed and unbound
response = u_boot_console.run_command('unbind /bind-test')
@@ -75,7 +75,7 @@ def test_bind_unbind_with_node(u_boot_console):
assert 'bind-test-child2' not in tree
#try binding invalid node with valid driver
- response = u_boot_console.run_command('bind /not-a-valid-node generic_simple_bus')
+ response = u_boot_console.run_command('bind /not-a-valid-node simple_bus')
assert response != ''
tree = u_boot_console.run_command('dm tree')
assert 'not-a-valid-node' not in tree
@@ -87,12 +87,12 @@ def test_bind_unbind_with_node(u_boot_console):
assert 'bind-test' not in tree
#bind /bind-test. Device should come up as well as its children
- response = u_boot_console.run_command('bind /bind-test generic_simple_bus')
+ response = u_boot_console.run_command('bind /bind-test simple_bus')
assert response == ''
tree = u_boot_console.run_command('dm tree')
- assert in_tree(tree, 'bind-test', 'simple_bus', 'generic_simple_bus', 0, True)
+ assert in_tree(tree, 'bind-test', 'simple_bus', 'simple_bus', 0, True)
assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, False)
- assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'generic_simple_bus', 1, True)
+ assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'simple_bus', 1, True)
response = u_boot_console.run_command('unbind /bind-test')
assert response == ''
@@ -112,7 +112,7 @@ def get_next_line(tree, name):
@pytest.mark.buildconfigspec('cmd_bind')
def test_bind_unbind_with_uclass(u_boot_console):
#bind /bind-test
- response = u_boot_console.run_command('bind /bind-test generic_simple_bus')
+ response = u_boot_console.run_command('bind /bind-test simple_bus')
assert response == ''
#make sure bind-test-child2 is there and get its uclass/index pair
@@ -123,8 +123,8 @@ def test_bind_unbind_with_uclass(u_boot_console):
child2_uclass = child2_line[0].split()[0]
child2_index = int(child2_line[0].split()[1])
- #bind generic_simple_bus as a child of bind-test-child2
- response = u_boot_console.run_command('bind {} {} generic_simple_bus'.format(child2_uclass, child2_index, 'generic_simple_bus'))
+ #bind simple_bus as a child of bind-test-child2
+ response = u_boot_console.run_command('bind {} {} simple_bus'.format(child2_uclass, child2_index, 'simple_bus'))
#check that the child is there and its uclass/index pair is right
tree = u_boot_console.run_command('dm tree')
@@ -132,20 +132,20 @@ def test_bind_unbind_with_uclass(u_boot_console):
child_of_child2_line = get_next_line(tree, 'bind-test-child2')
assert child_of_child2_line
child_of_child2_index = int(child_of_child2_line.split()[1])
- assert in_tree(tree, 'generic_simple_bus', 'simple_bus', 'generic_simple_bus', 2, True)
+ assert in_tree(tree, 'simple_bus', 'simple_bus', 'simple_bus', 2, True)
assert child_of_child2_index == child2_index + 1
#unbind the child and check it has been removed
response = u_boot_console.run_command('unbind simple_bus {}'.format(child_of_child2_index))
assert response == ''
tree = u_boot_console.run_command('dm tree')
- assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'generic_simple_bus', 1, True)
- assert not in_tree(tree, 'generic_simple_bus', 'simple_bus', 'generic_simple_bus', 2, True)
+ assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'simple_bus', 1, True)
+ assert not in_tree(tree, 'simple_bus', 'simple_bus', 'simple_bus', 2, True)
child_of_child2_line = get_next_line(tree, 'bind-test-child2')
assert child_of_child2_line == ''
- #bind generic_simple_bus as a child of bind-test-child2
- response = u_boot_console.run_command('bind {} {} generic_simple_bus'.format(child2_uclass, child2_index, 'generic_simple_bus'))
+ #bind simple_bus as a child of bind-test-child2
+ response = u_boot_console.run_command('bind {} {} simple_bus'.format(child2_uclass, child2_index, 'simple_bus'))
#check that the child is there and its uclass/index pair is right
tree = u_boot_console.run_command('dm tree')
@@ -154,22 +154,22 @@ def test_bind_unbind_with_uclass(u_boot_console):
child_of_child2_line = get_next_line(tree, 'bind-test-child2')
assert child_of_child2_line
child_of_child2_index = int(child_of_child2_line.split()[1])
- assert in_tree(tree, 'generic_simple_bus', 'simple_bus', 'generic_simple_bus', 2, True)
+ assert in_tree(tree, 'simple_bus', 'simple_bus', 'simple_bus', 2, True)
assert child_of_child2_index == child2_index + 1
#unbind the child and check it has been removed
- response = u_boot_console.run_command('unbind {} {} generic_simple_bus'.format(child2_uclass, child2_index, 'generic_simple_bus'))
+ response = u_boot_console.run_command('unbind {} {} simple_bus'.format(child2_uclass, child2_index, 'simple_bus'))
assert response == ''
tree = u_boot_console.run_command('dm tree')
- assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'generic_simple_bus', 1, True)
+ assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'simple_bus', 1, True)
child_of_child2_line = get_next_line(tree, 'bind-test-child2')
assert child_of_child2_line == ''
#unbind the child again and check it doesn't change the tree
tree_old = u_boot_console.run_command('dm tree')
- response = u_boot_console.run_command('unbind {} {} generic_simple_bus'.format(child2_uclass, child2_index, 'generic_simple_bus'))
+ response = u_boot_console.run_command('unbind {} {} simple_bus'.format(child2_uclass, child2_index, 'simple_bus'))
tree_new = u_boot_console.run_command('dm tree')
assert response == ''
--
2.20.1
More information about the U-Boot
mailing list