]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: Rename U_BOOT_DRIVER_ALIAS to DM_DRIVER_ALIAS
authorSimon Glass <sjg@chromium.org>
Tue, 29 Dec 2020 03:34:57 +0000 (20:34 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 5 Jan 2021 19:26:35 +0000 (12:26 -0700)
We use the U_BOOT_ prefix (i.e. U_BOOT_DRIVER) to declare a driver but
in every other case we just use DM_. Update the alias macros to use the
DM_ prefix.

We could perhaps rename U_BOOT_DRIVER() to DM_DRIVER(), but this macro
is widely used and there is at least some benefit to indicating it us a
U-Boot driver, particularly for code ported from Linux. So for now, let's
keep that name.

Signed-off-by: Simon Glass <sjg@chromium.org>
19 files changed:
doc/driver-model/of-plat.rst
drivers/gpio/mxc_gpio.c
drivers/gpio/mxs_gpio.c
drivers/gpio/sandbox.c
drivers/i2c/rk_i2c.c
drivers/mmc/fsl_esdhc_imx.c
drivers/mmc/mxsmmc.c
drivers/mmc/rockchip_dw_mmc.c
drivers/mtd/spi/sf_probe.c
drivers/pinctrl/nxp/pinctrl-imx6.c
drivers/pinctrl/nxp/pinctrl-mxs.c
drivers/pinctrl/pinctrl-at91.c
drivers/power/pmic/rk8xx.c
drivers/serial/ns16550.c
drivers/spi/mxs_spi.c
drivers/spi/rk_spi.c
include/dm/device.h
tools/dtoc/dtb_platdata.py
tools/dtoc/dtoc_test_scan_drivers.cxx

index 21b45f6a7e7d01ea41b2c4abff3982ad0cc5923b..78afbdbcc952fd437c936bae1809a2e0afa17de3 100644 (file)
@@ -184,7 +184,7 @@ via U_BOOT_DRIVER(). This effectively means that a U_BOOT_DRIVER() with a
 it to a valid name for C) is needed, so a dedicated driver is required for
 each 'compatible' string.
 
-In order to make this a bit more flexible U_BOOT_DRIVER_ALIAS macro can be
+In order to make this a bit more flexible DM_DRIVER_ALIAS macro can be
 used to declare an alias for a driver name, typically a 'compatible' string.
 This macro produces no code, but it is by dtoc tool.
 
@@ -195,7 +195,7 @@ fix-ups required by dtoc. It is not currently used. The values in 'clocks' are
 the index of the driver_info for the target device followed by any phandle
 arguments. This is used to support device_get_by_driver_info_idx().
 
-During the build process dtoc parses both U_BOOT_DRIVER and U_BOOT_DRIVER_ALIAS
+During the build process dtoc parses both U_BOOT_DRIVER and DM_DRIVER_ALIAS
 to build a list of valid driver names and driver aliases. If the 'compatible'
 string used for a device does not not match a valid driver name, it will be
 checked against the list of driver aliases in order to get the right driver
@@ -297,7 +297,7 @@ For example:
             .plat_auto = sizeof(struct mmc_plat),
     };
 
-    U_BOOT_DRIVER_ALIAS(mmc_drv, vendor_mmc) /* matches compatible string */
+    DM_DRIVER_ALIAS(mmc_drv, vendor_mmc) /* matches compatible string */
 
 Note that struct mmc_plat is defined in the C file, not in a header. This
 is to avoid needing to include dt-structs.h in a header file. The idea is to
index 6280fb5984025559d3881c796caf120af35cdfe3..06e6b2279f6e3ab6f87521bf9c6319a8dda23773 100644 (file)
@@ -345,7 +345,7 @@ U_BOOT_DRIVER(gpio_mxc) = {
        .bind   = mxc_gpio_bind,
 };
 
-U_BOOT_DRIVER_ALIAS(gpio_mxc, fsl_imx6q_gpio)
+DM_DRIVER_ALIAS(gpio_mxc, fsl_imx6q_gpio)
 
 #if !CONFIG_IS_ENABLED(OF_CONTROL)
 static const struct mxc_gpio_plat mxc_plat[] = {
index fd5e0ea5c259b76b75d35e79113f4d856320379e..4b2b18fdb53878636484c42bb2650dbb6c529fb6 100644 (file)
@@ -306,5 +306,5 @@ U_BOOT_DRIVER(fsl_imx23_gpio) = {
 #endif
 };
 
-U_BOOT_DRIVER_ALIAS(fsl_imx23_gpio, fsl_imx28_gpio)
+DM_DRIVER_ALIAS(fsl_imx23_gpio, fsl_imx28_gpio)
 #endif /* DM_GPIO */
index f8fa4baa2c30b24a29ba643fd7425d48257571da..dc8d506e8d4435e0a6912c6238d0a938383add80 100644 (file)
@@ -327,7 +327,7 @@ U_BOOT_DRIVER(sandbox_gpio) = {
        ACPI_OPS_PTR(&gpio_sandbox_acpi_ops)
 };
 
-U_BOOT_DRIVER_ALIAS(sandbox_gpio, sandbox_gpio_alias)
+DM_DRIVER_ALIAS(sandbox_gpio, sandbox_gpio_alias)
 
 /* pincontrol: used only to check GPIO pin configuration (pinmux command) */
 
index 704bafe23890bf7300b10f4506aa67f4db1b3574..f8fac45b6ca0b8786e00e080b63731fd993ca783 100644 (file)
@@ -495,4 +495,4 @@ U_BOOT_DRIVER(rockchip_rk3066_i2c) = {
        .ops    = &rockchip_i2c_ops,
 };
 
-U_BOOT_DRIVER_ALIAS(rockchip_rk3066_i2c, rockchip_rk3288_i2c)
+DM_DRIVER_ALIAS(rockchip_rk3066_i2c, rockchip_rk3288_i2c)
index 34c2dceb1882a874ace266ed74470e43444222af..c528d345cdf539bdca2bb69806de77a2d685c0c8 100644 (file)
@@ -1711,5 +1711,5 @@ U_BOOT_DRIVER(fsl_esdhc) = {
        .priv_auto      = sizeof(struct fsl_esdhc_priv),
 };
 
-U_BOOT_DRIVER_ALIAS(fsl_esdhc, fsl_imx6q_usdhc)
+DM_DRIVER_ALIAS(fsl_esdhc, fsl_imx6q_usdhc)
 #endif
index b3fb559a677cc7a99ea3b52264c168c77295c0e4..8fd41764152fa291e6908057a097e008f139aa6a 100644 (file)
@@ -722,5 +722,5 @@ U_BOOT_DRIVER(fsl_imx23_mmc) = {
        .plat_auto      = sizeof(struct mxsmmc_plat),
 };
 
-U_BOOT_DRIVER_ALIAS(fsl_imx23_mmc, fsl_imx28_mmc)
+DM_DRIVER_ALIAS(fsl_imx23_mmc, fsl_imx28_mmc)
 #endif /* CONFIG_DM_MMC */
index 75db81ba4caadcd7eb3cd509fc755c8815449889..1be3c1741fd4db2d27d606030e189901fe0be061 100644 (file)
@@ -180,8 +180,8 @@ U_BOOT_DRIVER(rockchip_rk3288_dw_mshc) = {
        .plat_auto      = sizeof(struct rockchip_mmc_plat),
 };
 
-U_BOOT_DRIVER_ALIAS(rockchip_rk3288_dw_mshc, rockchip_rk3328_dw_mshc)
-U_BOOT_DRIVER_ALIAS(rockchip_rk3288_dw_mshc, rockchip_rk3368_dw_mshc)
+DM_DRIVER_ALIAS(rockchip_rk3288_dw_mshc, rockchip_rk3328_dw_mshc)
+DM_DRIVER_ALIAS(rockchip_rk3288_dw_mshc, rockchip_rk3368_dw_mshc)
 
 #ifdef CONFIG_PWRSEQ
 static int rockchip_dwmmc_pwrseq_set_power(struct udevice *dev, bool enable)
index 630787df1bf6cd9bd02e7eff42347f57fc8d4b12..6c874348676af130fab8e7bf947c1792ba829824 100644 (file)
@@ -170,6 +170,6 @@ U_BOOT_DRIVER(jedec_spi_nor) = {
        .ops            = &spi_flash_std_ops,
 };
 
-U_BOOT_DRIVER_ALIAS(jedec_spi_nor, spansion_m25p16)
+DM_DRIVER_ALIAS(jedec_spi_nor, spansion_m25p16)
 
 #endif /* CONFIG_DM_SPI_FLASH */
index 3cb0bf3b5afaeb9f8d2c84fae4875d004f75a5ea..6994dbb61a3ddf74126f28e708b1175305604089 100644 (file)
@@ -52,4 +52,4 @@ U_BOOT_DRIVER(fsl_imx6q_iomuxc) = {
        .flags = DM_FLAG_PRE_RELOC,
 };
 
-U_BOOT_DRIVER_ALIAS(fsl_imx6q_iomuxc, fsl_imx6dl_iomuxc)
+DM_DRIVER_ALIAS(fsl_imx6q_iomuxc, fsl_imx6dl_iomuxc)
index 5ada2ac4052562b628e2635c6e103ff76b9aa371..449a0aa8b5fb9764c63c6eb803f6c50ba7e239a0 100644 (file)
@@ -192,4 +192,4 @@ U_BOOT_DRIVER(fsl_imx23_pinctrl) = {
        .ops = &mxs_pinctrl_ops,
 };
 
-U_BOOT_DRIVER_ALIAS(fsl_imx23_pinctrl, fsl_imx28_pinctrl)
+DM_DRIVER_ALIAS(fsl_imx23_pinctrl, fsl_imx28_pinctrl)
index 74bfd3c3dcab930f7b8c422f21ed1bfac92f44d7..ddaad55ddc512de17ee3e1e72b68065f88ad6c55 100644 (file)
@@ -528,4 +528,4 @@ U_BOOT_DRIVER(atmel_sama5d3_pinctrl) = {
        .ops = &at91_pinctrl_ops,
 };
 
-U_BOOT_DRIVER_ALIAS(atmel_sama5d3_pinctrl, atmel_at91rm9200_pinctrl)
+DM_DRIVER_ALIAS(atmel_sama5d3_pinctrl, atmel_at91rm9200_pinctrl)
index 2f547a314d90b19bf56898c52f97f140b1f961c7..5f442fea689d3075f40d35dc1e583170a07b52a1 100644 (file)
@@ -195,4 +195,4 @@ U_BOOT_DRIVER(rockchip_rk805) = {
        .ops = &rk8xx_ops,
 };
 
-U_BOOT_DRIVER_ALIAS(rockchip_rk805, rockchip_rk808)
+DM_DRIVER_ALIAS(rockchip_rk805, rockchip_rk808)
index 508c134b94f33bcaed0575aa99e22aabaa4e8189..65c6db073ec400ced49d7f423813b5aa492b2ed0 100644 (file)
@@ -621,9 +621,9 @@ U_BOOT_DRIVER(ns16550_serial) = {
 #endif
 };
 
-U_BOOT_DRIVER_ALIAS(ns16550_serial, rockchip_rk3328_uart)
-U_BOOT_DRIVER_ALIAS(ns16550_serial, rockchip_rk3368_uart)
-U_BOOT_DRIVER_ALIAS(ns16550_serial, ti_da830_uart)
+DM_DRIVER_ALIAS(ns16550_serial, rockchip_rk3328_uart)
+DM_DRIVER_ALIAS(ns16550_serial, rockchip_rk3368_uart)
+DM_DRIVER_ALIAS(ns16550_serial, ti_da830_uart)
 #endif
 #endif /* SERIAL_PRESENT */
 
index 7f632d98bb6a28e0a2d49639a5d1171a99b66fa3..d41352a0bb8ce29d377dbe4dfa1a5ef14150e892 100644 (file)
@@ -493,4 +493,4 @@ U_BOOT_DRIVER(fsl_imx23_spi) = {
        .probe  = mxs_spi_probe,
 };
 
-U_BOOT_DRIVER_ALIAS(fsl_imx23_spi, fsl_imx28_spi)
+DM_DRIVER_ALIAS(fsl_imx23_spi, fsl_imx28_spi)
index 51abebb947834b88896728489e7af4319752efe1..40bd8851b7c071ec6de2c777ebc1b931d21f40f5 100644 (file)
@@ -565,4 +565,4 @@ U_BOOT_DRIVER(rockchip_rk3288_spi) = {
        .probe  = rockchip_spi_probe,
 };
 
-U_BOOT_DRIVER_ALIAS(rockchip_rk3288_spi, rockchip_rk3368_spi)
+DM_DRIVER_ALIAS(rockchip_rk3288_spi, rockchip_rk3368_spi)
index 68990301051003e73d0ca37820f640291b748336..f5b4cd6876e975f52a27948784f97ad943156242 100644 (file)
@@ -343,7 +343,7 @@ struct driver {
  * produce no code but its information will be parsed by tools like
  * dtoc
  */
-#define U_BOOT_DRIVER_ALIAS(__name, __alias)
+#define DM_DRIVER_ALIAS(__name, __alias)
 
 /**
  * dev_get_plat() - Get the platform data for a device
index 1a6a511b015c895d301d89598fd80115ed09c12c..e12aaa5399fcabe0801795f88a1bd09b78d36195 100644 (file)
@@ -187,7 +187,7 @@ class DtbPlatdata():
             value: Driver for that driver
         _driver_aliases: Dict that holds aliases for driver names
             key: Driver alias declared with
-                U_BOOT_DRIVER_ALIAS(driver_alias, driver_name)
+                DM_DRIVER_ALIAS(driver_alias, driver_name)
             value: Driver name declared with U_BOOT_DRIVER(driver_name)
         _drivers_additional: List of additional drivers to use during scanning
         _dirname: Directory to hold output files, or None for none (all files
@@ -416,9 +416,9 @@ class DtbPlatdata():
                 self._drivers[driver] = Driver(driver)
 
             # The following re will search for driver aliases declared as
-            # U_BOOT_DRIVER_ALIAS(alias, driver_name)
+            # DM_DRIVER_ALIAS(alias, driver_name)
             driver_aliases = re.findall(
-                r'U_BOOT_DRIVER_ALIAS\(\s*(\w+)\s*,\s*(\w+)\s*\)',
+                r'DM_DRIVER_ALIAS\(\s*(\w+)\s*,\s*(\w+)\s*\)',
                 buff)
 
             for alias in driver_aliases: # pragma: no cover
index 557c692ba2c12fab03991b799df6ba6b6ca1e697..f448767670eeca47be5d62b86ad46f23f4a096fd 100644 (file)
@@ -1 +1 @@
-U_BOOT_DRIVER_ALIAS(sandbox_gpio, sandbox_gpio_alias2)
+DM_DRIVER_ALIAS(sandbox_gpio, sandbox_gpio_alias2)