]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
drivers: rename drivers to match compatible string
authorWalter Lozano <walter.lozano@collabora.com>
Thu, 25 Jun 2020 04:10:04 +0000 (01:10 -0300)
committerSimon Glass <sjg@chromium.org>
Fri, 10 Jul 2020 00:57:22 +0000 (18:57 -0600)
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@collabora.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Add a fix for sandbox of-platdata to avoid using an invalid ANSI colour:
Signed-off-by: Simon Glass <sjg@chromium.org>
45 files changed:
arch/arm/mach-at91/arm926ejs/at91sam9260_devices.c
arch/arm/mach-at91/arm926ejs/at91sam9m10g45_devices.c
arch/arm/mach-rockchip/rk3328/syscon_rk3328.c
board/davinci/da8xxevm/omapl138_lcdk.c
board/sandbox/sandbox.c
drivers/clk/at91/clk-master.c
drivers/clk/at91/clk-peripheral.c
drivers/clk/at91/pmc.c
drivers/core/simple-bus.c
drivers/gpio/at91_gpio.c
drivers/gpio/da8xx_gpio.c
drivers/gpio/mxs_gpio.c
drivers/gpio/rk_gpio.c
drivers/gpio/sandbox.c
drivers/i2c/rk_i2c.c
drivers/input/cros_ec_keyb.c
drivers/misc/cros_ec_sandbox.c
drivers/mmc/davinci_mmc.c
drivers/mmc/mxsmmc.c
drivers/mmc/rockchip_dw_mmc.c
drivers/mtd/spi/sf-uclass.c
drivers/mtd/spi/sf_probe.c
drivers/pinctrl/nxp/pinctrl-mxs.c
drivers/pinctrl/pinctrl-at91.c
drivers/pinctrl/rockchip/pinctrl-rk3188.c
drivers/pinctrl/rockchip/pinctrl-rk3288.c
drivers/pinctrl/rockchip/pinctrl-rk3328.c
drivers/pinctrl/rockchip/pinctrl-rk3368.c
drivers/power/pmic/rk8xx.c
drivers/power/regulator/fixed.c
drivers/ram/rockchip/dmc-rk3368.c
drivers/ram/rockchip/sdram_rk3188.c
drivers/ram/rockchip/sdram_rk3288.c
drivers/ram/rockchip/sdram_rk3328.c
drivers/serial/sandbox.c
drivers/spi/mxs_spi.c
drivers/spi/rk_spi.c
drivers/spi/sandbox_spi.c
drivers/tpm/tpm_tis_sandbox.c
drivers/video/rockchip/rk3288_vop.c
drivers/video/sandbox_sdl.c
drivers/watchdog/at91sam9_wdt.c
test/dm/gpio.c
test/dm/spi.c
test/py/tests/test_bind.py

index c033ed6d16cdee023d5935243dc71bbfde8fc25f..8122d2f98e4e388038bee786a763a18d236a971e 100644 (file)
@@ -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] },
 };
index 89cbeafa20130c187914fa8e19a45d0e016c056a..08ca3edd782d8376a324658d7ca7e874915156cf 100644 (file)
@@ -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] },
 };
index 8a0eceb17877b15495ea4d56a91ff675ea3892a3..daf74a0e2d370fca68b4795541cad2d12607b5d3 100644 (file)
@@ -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,
 };
index 84603cb117104dfc3f4800a3948609c58bc34045..b60c83b47ff91f46829dba0274e2e9545348a79f 100644 (file)
@@ -380,7 +380,7 @@ static const struct davinci_mmc_plat mmc_platdata = {
        },
 };
 U_BOOT_DEVICE(omapl138_mmc) = {
-       .name = "davinci_mmc",
+       .name = "ti_da830_mmc",
        .platdata = &mmc_platdata,
 };
 
index 137200301874a5514844c2d269334cf5b490c613..bd39109f3b78b80527e711688e1d3b71ccfa660f 100644 (file)
@@ -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)
index 4fa33c4715c91fd54fb2b308444154ca374a25a0..e078fab7b41561d567f44459ba5010b31d60f12a 100644 (file)
@@ -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,
index c55e6214b2267abdae9a259e9526d10ef8e69c18..cd9d5e77c0278e3d97d6bb236e5799411d10e7cf 100644 (file)
@@ -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,
index 9d9d77d861d758c7bc73873f02875aa4b395773a..f6b9367f2e0136486ae8286275ae48e9896fffc4 100644 (file)
@@ -25,8 +25,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,
 };
index 7fc23ef82d8822a04f5c2070c2a96f9b387d1f3d..7cc1d46009ffc9f94533f1f1350cd89319588b0a 100644 (file)
@@ -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,
index 3621cf240888a0e550a873b7b10377d7a27f4637..4a8b2e6ff6103f93ad17bcc7ef1426c7be969d17 100644 (file)
@@ -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,
index 0d0e9d22549de90a5d04f8ba41aeaf2ad422d57e..ab0a5cfd330c3473483f7f8c81a0bc692fc3d5d6 100644 (file)
@@ -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),
index 815339a1560edc4c2dcb89e2097341f768c2288c..bc697435d8bb5ce6033cb06ddab15e1fa0768b1c 100644 (file)
@@ -299,12 +299,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,
index 3d96678a45a71a0ada12767aeba690ff33fa29fe..8cc288581c99f98db2848ac95fda1b77f2c764b4 100644 (file)
@@ -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,
index 98b7fa4bb3918618499ef7e0c19d5f423a7d352e..1df2d8d017af2411a590aad2bd24406d84903a18 100644 (file)
@@ -244,8 +244,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,
index fa6f69f400c00b0ba1625d21fa37c44b95c95b11..cbe959b5909d1f9664e9cee6b22bb67c24b83629 100644 (file)
@@ -485,8 +485,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,
index 6f12ec8b0ac438cc4bf83bb2bd07185bf2e3bfbb..00bf58f2b5d257b8b4fb33d38134a47b921f6cf1 100644 (file)
@@ -225,8 +225,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,
index c9fa7abd718a4fbf71de4c08aef505810c28079f..a191f061b8983db6e5b5243239f64e371373d808 100644 (file)
@@ -572,8 +572,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,
index 4ef9f7cc8bcb35b9ebae0ec682a0ba0471664db1..f3ccd021d802f76dc9e870d228f3ca1c71672810 100644 (file)
@@ -522,7 +522,7 @@ static const struct udevice_id davinci_mmc_ids[] = {
        {},
 };
 #endif
-U_BOOT_DRIVER(davinci_mmc_drv) = {
+U_BOOT_DRIVER(ti_da830_mmc) = {
        .name = "davinci_mmc",
        .id             = UCLASS_MMC,
 #if CONFIG_IS_ENABLED(OF_CONTROL)
index e3c352b44a85e49f6e3ab8e43b52c9a2f24668d1..03a50773a055d3a8b84c5041f18aabbddb5b6e50 100644 (file)
@@ -711,12 +711,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,
index 638107a7ff66f9082c85fda911d7ab5a9e6d5453..c5aeffc1c01c8a3c3e8bddfe8a03567662db78eb 100644 (file)
@@ -168,7 +168,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,
index 9ce2ecb99ac2679347499c15aca27b11170304ee..09c11439b08adbc5b4c1e2ac355527e77056a117 100644 (file)
@@ -68,7 +68,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;
 
index afda241dd067a7337ecd588979962594466c38cb..3dcd57d27151d8b9f0623fca6304176255340c50 100644 (file)
@@ -160,8 +160,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,
index a403114f21cb5cf0ea9833d0726109c32dd208b0..99a43a3a74c28b96f710a71b06250c9301822f62 100644 (file)
@@ -180,8 +180,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,
index b3fa124cfbf3363977ffed8412c3d9cfd4f6de0b..def723690d2565a98ecca50abe9d4e122953d31d 100644 (file)
@@ -519,8 +519,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,
index afde80985450624bbf3ca6cd9aca48648d09ace1..8f197110e5e4b300078367aed6438a3bbfc39fe9 100644 (file)
@@ -120,7 +120,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,
index faaa2ce1f705275d73ff5b99810b43deaabbc47a..011ca286ec9e6363c0c02e2cf1e85a36773ca368 100644 (file)
@@ -242,7 +242,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,
index f9160f26c78e97c7671326cff90f1658e49d4f49..61eb9e0af0c9b5cf2675ec211326aadb1badaf6e 100644 (file)
@@ -317,7 +317,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,
index 7a6059959ef176890997bb27757df5c4a907cc31..d8ccd4de576118337109c24df3a5963d8e2b392f 100644 (file)
@@ -171,7 +171,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,
index 195884bde9c0c8a9e3480df533f68ee9f8a4afd8..517c87ed0d72f9a33af6ebdb34f1eb0909d5d161 100644 (file)
@@ -183,8 +183,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)
index f9f9659621c2cf06f05938e29f1ccbfe807cbc46..b5f7aec3530c0fc79ceea2a6d59ba94198c050a8 100644 (file)
@@ -82,8 +82,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,
index 92457a1fa427c80e2e919dfc099d44d1deb50611..4fa632152fdad15b3ab481359f473140e36a35fe 100644 (file)
@@ -992,7 +992,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,
index 7aedb4fbac712f4543708d287316ae71ff0ba54b..06f9eba1a5b8ecbe984294edce345fbc70f8dec3 100644 (file)
@@ -945,7 +945,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,
index 64d704ef267372a8e8add19d787b86f0ca266bd0..26e8d059b5d837967ded6f1757a538ac67a5f195 100644 (file)
@@ -1113,7 +1113,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,
index 3f3926f9e4c63d7d4d999f206647be6abc030827..98c7feb6cfab47218473740956219fd40fd53c40 100644 (file)
@@ -606,7 +606,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,
index 545ff3f74724ceafea73a78d87d90e5f02cb6373..f09d291e043c4f2b8c7cdd69ab0f95f547807a4a 100644 (file)
@@ -93,7 +93,9 @@ static int sandbox_serial_putc(struct udevice *dev, const char ch)
        struct sandbox_serial_priv *priv = dev_get_priv(dev);
        struct sandbox_serial_platdata *plat = dev->platdata;
 
-       if (priv->start_of_line && plat->colour != -1) {
+       /* With of-platdata we don't real the colour correctly, so disable it */
+       if (!CONFIG_IS_ENABLED(OF_PLATDATA) && priv->start_of_line &&
+           plat->colour != -1) {
                priv->start_of_line = false;
                output_ansi_colour(plat->colour);
        }
@@ -252,8 +254,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 +272,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) */
index e231e96e58102207ab8d2aa42967382af3434a58..4b8e242501a9908be5c8ed92ca24a506c09d079d 100644 (file)
@@ -486,12 +486,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,
index 833cb04922ebb97e6d2dc74549c28ac23370de74..5c1828aedacca3155c3f5ceb2cb63b95649d809f 100644 (file)
@@ -553,12 +553,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,
index b0a46c886815925027c5c3cf5a790083f1ebcd16..570ae285f2a97a69de94f12a799e6d7307485700 100644 (file)
@@ -146,8 +146,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,
index 2dff0d3eee93b2c404ddd36317442bddb3953946..e167d0a2fe3d24948ce10e55b68ef775b5318e9e 100644 (file)
@@ -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,
index 25ef25b870b03b77e730d3c7f34a151f5055979b..68d1507cda4646e651666a1745eb9d9f77327df2 100644 (file)
@@ -97,8 +97,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,
index f529a350fbff60067fadc808a0a7c1116748b312..d806f35debba783f7be4c68126509e18de7070df 100644 (file)
@@ -72,8 +72,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,
index 18756e34dfab0293b4449f3a9af6ce4e79536c4d..33f5c351d5be875b3a9c4b5e7e88cc90a6b9eeb6 100644 (file)
@@ -113,8 +113,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),
index fcee1fe5983faca5398b9f6bfc2e0be2d0b9dec9..e3be57b602b5a1f121c7a93c44f5d65930e1591a 100644 (file)
@@ -244,7 +244,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);
 
index 474008cde0db657887a44a1ff2c2f58ac6937f67..ff2cddd24593ba116fe46c3d3f81be0afda54a12 100644 (file)
@@ -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);
 
index 20c6050342a9061ffb1bd33437a008be427259dd..e9681c69c54e46c12d9d7eaf64ece89632806dbf 100644 (file)
@@ -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 == ''