]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()
authorSimon Glass <sjg@chromium.org>
Tue, 29 Dec 2020 03:34:56 +0000 (20:34 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 5 Jan 2021 19:26:35 +0000 (12:26 -0700)
In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>
73 files changed:
arch/arm/lib/gic-v3-its.c
arch/arm/mach-aspeed/ast2500/clk_ast2500.c
arch/arm/mach-k3/am6_init.c
arch/arm/mach-k3/common.c
arch/arm/mach-k3/j721e_init.c
arch/arm/mach-mediatek/mt7629/init.c
arch/arm/mach-mediatek/mt8516/init.c
arch/arm/mach-rockchip/misc.c
arch/arm/mach-rockchip/px30/clk_px30.c
arch/arm/mach-rockchip/rk3036/clk_rk3036.c
arch/arm/mach-rockchip/rk3128/clk_rk3128.c
arch/arm/mach-rockchip/rk3188/clk_rk3188.c
arch/arm/mach-rockchip/rk322x/clk_rk322x.c
arch/arm/mach-rockchip/rk3288/clk_rk3288.c
arch/arm/mach-rockchip/rk3308/clk_rk3308.c
arch/arm/mach-rockchip/rk3328/clk_rk3328.c
arch/arm/mach-rockchip/rk3368/clk_rk3368.c
arch/arm/mach-rockchip/rk3399/clk_rk3399.c
arch/arm/mach-rockchip/rv1108/clk_rv1108.c
arch/arm/mach-socfpga/clock_manager_agilex.c
arch/arm/mach-stm32mp/bsec.c
arch/arm/mach-stm32mp/cmd_stm32key.c
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
arch/arm/mach-stm32mp/cpu.c
arch/arm/mach-uniphier/micro-support-card.c
arch/arm/mach-zynq/clk.c
arch/arm/mach-zynq/timer.c
arch/mips/mach-mtmips/mt7628/init.c
arch/riscv/lib/sifive_clint.c
board/dhelectronics/dh_stm32mp1/board.c
board/google/gru/gru.c
board/nvidia/jetson-tk1/jetson-tk1.c
board/nvidia/nyan-big/nyan-big.c
board/renesas/ulcb/cpld.c
board/sifive/fu540/fu540.c
board/st/common/cmd_stboard.c
board/st/common/stm32mp_dfu.c
board/st/common/stpmic1.c
board/st/common/stusb160x.c
board/st/stm32mp1/stm32mp1.c
board/ti/j721e/evm.c
board/toradex/apalis-tk1/apalis-tk1.c
drivers/clk/clk_stm32mp1.c
drivers/clk/clk_zynqmp.c
drivers/clk/imx/clk-imx8.c
drivers/clk/mediatek/clk-mtk.c
drivers/clk/sifive/fu540-prci.c
drivers/firmware/scmi/scmi_agent-uclass.c
drivers/gpio/gpio-uclass.c
drivers/misc/i2c_eeprom.c
drivers/misc/rockchip-efuse.c
drivers/misc/stm32mp_fuse.c
drivers/mtd/nand/raw/arasan_nfc.c
drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c
drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c
drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c
drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c
drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c
drivers/mtd/nand/raw/davinci_nand.c
drivers/mtd/nand/raw/denali_dt.c
drivers/mtd/nand/raw/mxs_nand_dt.c
drivers/mtd/nand/raw/octeontx_nand.c
drivers/mtd/nand/raw/pxa3xx_nand.c
drivers/mtd/nand/raw/stm32_fmc2_nand.c
drivers/mtd/nand/raw/tegra_nand.c
drivers/mtd/nand/raw/vf610_nfc.c
drivers/mtd/nand/raw/zynq_nand.c
drivers/reset/reset-ast2500.c
drivers/video/lg4573.c
include/dm/device.h
include/dm/uclass.h
test/dm/core.c
test/dm/test-fdt.c

index a1657e385366478d5a8eff6042003f75bdbf8bf7..f5a921b3d1befe3721fe7af63919c111facca7b9 100644 (file)
@@ -43,10 +43,10 @@ static int gic_v3_its_get_gic_addr(struct gic_v3_its_priv *priv)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_IRQ,
-                                         DM_GET_DRIVER(arm_gic_v3_its), &dev);
+                                         DM_DRIVER_GET(arm_gic_v3_its), &dev);
        if (ret) {
                pr_err("%s: failed to get %s irq device\n", __func__,
-                      DM_GET_DRIVER(arm_gic_v3_its)->name);
+                      DM_DRIVER_GET(arm_gic_v3_its)->name);
                return ret;
        }
 
@@ -74,17 +74,17 @@ static int gic_v3_its_get_gic_lpi_addr(struct gic_v3_its_priv *priv)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_SYSCON,
-                                         DM_GET_DRIVER(gic_lpi_syscon), &dev);
+                                         DM_DRIVER_GET(gic_lpi_syscon), &dev);
        if (ret) {
                pr_err("%s: failed to get %s syscon device\n", __func__,
-                      DM_GET_DRIVER(gic_lpi_syscon)->name);
+                      DM_DRIVER_GET(gic_lpi_syscon)->name);
                return ret;
        }
 
        regmap = syscon_get_regmap(dev);
        if (!regmap) {
                pr_err("%s: failed to regmap for %s syscon device\n", __func__,
-                      DM_GET_DRIVER(gic_lpi_syscon)->name);
+                      DM_DRIVER_GET(gic_lpi_syscon)->name);
                return -ENODEV;
        }
        priv->lpi_base = regmap->ranges[0].start;
index 3e9f5e57ed012c9c34104027d82109b1093208f6..02bd3f67c96aeee166f641101ce2d15f51f57537 100644 (file)
@@ -12,7 +12,7 @@
 int ast_get_clk(struct udevice **devp)
 {
        return uclass_get_device_by_driver(UCLASS_CLK,
-                       DM_GET_DRIVER(aspeed_ast2500_scu), devp);
+                       DM_DRIVER_GET(aspeed_ast2500_scu), devp);
 }
 
 void *ast_get_scu(void)
index 0fed5aec59d26d8d4127523bf6cbbb3a018e7e6b..dea470c02f70dcc10124d56e916751953453ed18 100644 (file)
@@ -238,7 +238,7 @@ void board_init_f(ulong dummy)
        do_board_detect();
 
 #if defined(CONFIG_CPU_V7R) && defined(CONFIG_K3_AVS0)
-       ret = uclass_get_device_by_driver(UCLASS_MISC, DM_GET_DRIVER(k3_avs),
+       ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(k3_avs),
                                          &dev);
        if (ret)
                printf("AVS init failed: %d\n", ret);
index 8c903f14ff879fb57a5e0359c509be2c734f39c2..8b54e0cf52966de4ef57947613b02cc3194350f1 100644 (file)
@@ -33,7 +33,7 @@ struct ti_sci_handle *get_ti_sci_handle(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_FIRMWARE,
-                                         DM_GET_DRIVER(ti_sci), &dev);
+                                         DM_DRIVER_GET(ti_sci), &dev);
        if (ret)
                panic("Failed to get SYSFW (%d)\n", ret);
 
index 0201690f93cea396385c09d1ba62ee3578da9b33..1a4f796e5efa6924cd5ed77f596f03f4d03557bb 100644 (file)
@@ -206,7 +206,7 @@ void board_init_f(ulong dummy)
                do_board_detect();
 
 #if defined(CONFIG_CPU_V7R) && defined(CONFIG_K3_AVS0)
-       ret = uclass_get_device_by_driver(UCLASS_MISC, DM_GET_DRIVER(k3_avs),
+       ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(k3_avs),
                                          &dev);
        if (ret)
                printf("AVS init failed: %d\n", ret);
index c260413a57a16af5ce5bdff78fedc1ee81ea4fb7..1f102dddd4f9fad62e2e3052794655153864a0f3 100644 (file)
@@ -40,7 +40,7 @@ int mtk_pll_early_init(void)
        int ret, i;
 
        ret = uclass_get_device_by_driver(UCLASS_CLK,
-                       DM_GET_DRIVER(mtk_clk_apmixedsys), &dev);
+                       DM_DRIVER_GET(mtk_clk_apmixedsys), &dev);
        if (ret)
                return ret;
 
@@ -59,7 +59,7 @@ int mtk_pll_early_init(void)
 
        /* setup mcu bus */
        ret = uclass_get_device_by_driver(UCLASS_SYSCON,
-                       DM_GET_DRIVER(mtk_mcucfg), &dev);
+                       DM_DRIVER_GET(mtk_mcucfg), &dev);
        if (ret)
                return ret;
 
index 13be39122115c73952e8fa3e48d797138fed83e3..2ffa5595cfc2c821b16a602c5c5fb3b055d6de51 100644 (file)
@@ -52,7 +52,7 @@ int mtk_pll_early_init(void)
        int ret, i;
 
        ret = uclass_get_device_by_driver(UCLASS_CLK,
-                       DM_GET_DRIVER(mtk_clk_apmixedsys), &dev);
+                       DM_DRIVER_GET(mtk_clk_apmixedsys), &dev);
        if (ret)
                return ret;
 
index 28c7c7214cbc8d161049edfc732a893ebf15be40..87eebd9872def4575fbecd734328f899d1e51117 100644 (file)
@@ -67,10 +67,10 @@ int rockchip_cpuid_from_efuse(const u32 cpuid_offset,
        /* retrieve the device */
 #if CONFIG_IS_ENABLED(ROCKCHIP_EFUSE)
        ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                         DM_GET_DRIVER(rockchip_efuse), &dev);
+                                         DM_DRIVER_GET(rockchip_efuse), &dev);
 #elif CONFIG_IS_ENABLED(ROCKCHIP_OTP)
        ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                         DM_GET_DRIVER(rockchip_otp), &dev);
+                                         DM_DRIVER_GET(rockchip_otp), &dev);
 #endif
        if (ret) {
                debug("%s: could not find efuse device\n", __func__);
index 98a1bcd224fafc84064e31825847e225c63d839d..7edf1321feb339f882139e9e48a5fd4933da8417 100644 (file)
@@ -13,7 +13,7 @@
 int rockchip_get_clk(struct udevice **devp)
 {
        return uclass_get_device_by_driver(UCLASS_CLK,
-                       DM_GET_DRIVER(rockchip_px30_cru), devp);
+                       DM_DRIVER_GET(rockchip_px30_cru), devp);
 }
 
 void *rockchip_get_cru(void)
index 5d0def3b524c71c7515fcd2947776df990fd36aa..116dccd7b87a7a8cdee5ae4d83728bd8191a4038 100644 (file)
@@ -14,7 +14,7 @@
 int rockchip_get_clk(struct udevice **devp)
 {
        return uclass_get_device_by_driver(UCLASS_CLK,
-                       DM_GET_DRIVER(rockchip_rk3036_cru), devp);
+                       DM_DRIVER_GET(rockchip_rk3036_cru), devp);
 }
 
 void *rockchip_get_cru(void)
index f9ce1f723488d276a9a89104a618c8ea4e0c658d..a1b038c64866f1d013267e32c802ed73b46c4ce1 100644 (file)
@@ -13,7 +13,7 @@
 int rockchip_get_clk(struct udevice **devp)
 {
        return uclass_get_device_by_driver(UCLASS_CLK,
-                       DM_GET_DRIVER(rockchip_rk3128_cru), devp);
+                       DM_DRIVER_GET(rockchip_rk3128_cru), devp);
 }
 
 void *rockchip_get_cru(void)
index a0dcac373248732a9330115a1f4ad0ed2a6af6f1..94d1d23e1f457b82ad6adf0483acdebb144d11a0 100644 (file)
@@ -14,7 +14,7 @@
 int rockchip_get_clk(struct udevice **devp)
 {
        return uclass_get_device_by_driver(UCLASS_CLK,
-                       DM_GET_DRIVER(rockchip_rk3188_cru), devp);
+                       DM_DRIVER_GET(rockchip_rk3188_cru), devp);
 }
 
 void *rockchip_get_cru(void)
index fc5abd736e8e09451225750f2880c3dee37b578c..2e57672b246d438bca3dc793d4d9b96d38b0c7f9 100644 (file)
@@ -13,7 +13,7 @@
 int rockchip_get_clk(struct udevice **devp)
 {
        return uclass_get_device_by_driver(UCLASS_CLK,
-                       DM_GET_DRIVER(rockchip_rk322x_cru), devp);
+                       DM_DRIVER_GET(rockchip_rk322x_cru), devp);
 }
 
 void *rockchip_get_cru(void)
index e05bd06a8d2e95648083013abb7f058bf7812806..fb4c0891d0dcdb957ece5ef172dbc0a62dbd98cf 100644 (file)
@@ -14,7 +14,7 @@
 int rockchip_get_clk(struct udevice **devp)
 {
        return uclass_get_device_by_driver(UCLASS_CLK,
-                       DM_GET_DRIVER(rockchip_rk3288_cru), devp);
+                       DM_DRIVER_GET(rockchip_rk3288_cru), devp);
 }
 
 void *rockchip_get_cru(void)
index 1feb23722408e008edb7259e15aef40befc6e4c9..ccda53380c6fb49a6bd48d7cfee6632fa02404ec 100644 (file)
@@ -13,7 +13,7 @@
 int rockchip_get_clk(struct udevice **devp)
 {
        return uclass_get_device_by_driver(UCLASS_CLK,
-                       DM_GET_DRIVER(rockchip_rk3308_cru), devp);
+                       DM_DRIVER_GET(rockchip_rk3308_cru), devp);
 }
 
 void *rockchip_get_cru(void)
index e5375514def68032edfe83374cf3b3eea8a83161..70c0eb6f98e7419610229c786c0e1df1fb4002f9 100644 (file)
@@ -12,7 +12,7 @@
 int rockchip_get_clk(struct udevice **devp)
 {
        return uclass_get_device_by_driver(UCLASS_CLK,
-                       DM_GET_DRIVER(rockchip_rk3328_cru), devp);
+                       DM_DRIVER_GET(rockchip_rk3328_cru), devp);
 }
 
 void *rockchip_get_cru(void)
index 9a33c67bc94df70efe8705d9355e989e87e5bad8..b075319720d9230e59b1996b637cdad216a2ca88 100644 (file)
@@ -14,7 +14,7 @@
 int rockchip_get_clk(struct udevice **devp)
 {
        return uclass_get_device_by_driver(UCLASS_CLK,
-                       DM_GET_DRIVER(rockchip_rk3368_cru), devp);
+                       DM_DRIVER_GET(rockchip_rk3368_cru), devp);
 }
 
 void *rockchip_get_cru(void)
index d23a5e9435cb8fb0554624f4dad884fc8234e4d1..9d9a837fc7489e09ce66ffa29f4619d913b359bb 100644 (file)
@@ -14,7 +14,7 @@
 static int rockchip_get_cruclk(struct udevice **devp)
 {
        return uclass_get_device_by_driver(UCLASS_CLK,
-                       DM_GET_DRIVER(clk_rk3399), devp);
+                       DM_DRIVER_GET(clk_rk3399), devp);
 }
 
 void *rockchip_get_cru(void)
@@ -35,7 +35,7 @@ void *rockchip_get_cru(void)
 static int rockchip_get_pmucruclk(struct udevice **devp)
 {
        return uclass_get_device_by_driver(UCLASS_CLK,
-                       DM_GET_DRIVER(rockchip_rk3399_pmuclk), devp);
+                       DM_DRIVER_GET(rockchip_rk3399_pmuclk), devp);
 }
 
 void *rockchip_get_pmucru(void)
index b37ae1c494569ab9934d1a7a38bd91ec729d5e25..44b53c407a78ca5839a8d24a6d154aad765b4d40 100644 (file)
@@ -14,7 +14,7 @@
 int rockchip_get_clk(struct udevice **devp)
 {
        return uclass_get_device_by_driver(UCLASS_CLK,
-                       DM_GET_DRIVER(clk_rv1108), devp);
+                       DM_DRIVER_GET(clk_rv1108), devp);
 }
 
 void *rockchip_get_cru(void)
index 6188a8c3d2db2c56c87c908fee203eed173bda42..a960176da77ce6adb8ec4bcc119634ced3321c16 100644 (file)
@@ -24,7 +24,7 @@ static ulong cm_get_rate_dm(u32 id)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_CLK,
-                                         DM_GET_DRIVER(socfpga_agilex_clk),
+                                         DM_DRIVER_GET(socfpga_agilex_clk),
                                          &dev);
        if (ret)
                return 0;
index 85a9e6f84e73e3b72f6ac26eac3d75cfcdb725e1..84e0bddcd44c57b45ec7856d8d25464b02869a5f 100644 (file)
@@ -525,7 +525,7 @@ bool bsec_dbgswenable(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                         DM_GET_DRIVER(stm32mp_bsec), &dev);
+                                         DM_DRIVER_GET(stm32mp_bsec), &dev);
        if (ret || !dev) {
                pr_debug("bsec driver not available\n");
                return false;
index f191085a12d074d345edc432ab5a76649ab919a9..544bab38480f68b0cc7704cfa691b64875dc2127 100644 (file)
@@ -31,7 +31,7 @@ static void fuse_hash_value(u32 addr, bool print)
        int i, ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                         DM_GET_DRIVER(stm32mp_bsec),
+                                         DM_DRIVER_GET(stm32mp_bsec),
                                          &dev);
        if (ret) {
                pr_err("Can't find stm32mp_bsec driver\n");
index a777827c55ea09d62997d24b328f7a10c264700a..fc9a2af545940fb14c5eeb256b2d12c64778865b 100644 (file)
@@ -1340,7 +1340,7 @@ int stm32prog_pmic_read(struct stm32prog_data *data, u32 offset, u8 *buffer,
 
        pr_debug("%s: %x %lx\n", __func__, offset, *size);
        ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                         DM_GET_DRIVER(stpmic1_nvm),
+                                         DM_DRIVER_GET(stpmic1_nvm),
                                          &dev);
        if (ret)
                return ret;
@@ -1351,7 +1351,7 @@ int stm32prog_pmic_read(struct stm32prog_data *data, u32 offset, u8 *buffer,
                memset(data->pmic_part, 0, PMIC_SIZE);
 
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(stpmic1_nvm),
+                                                 DM_DRIVER_GET(stpmic1_nvm),
                                                  &dev);
                if (ret)
                        return ret;
@@ -1389,7 +1389,7 @@ int stm32prog_pmic_start(struct stm32prog_data *data)
        }
 
        ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                         DM_GET_DRIVER(stpmic1_nvm),
+                                         DM_DRIVER_GET(stpmic1_nvm),
                                          &dev);
        if (ret)
                return ret;
index 1520c6eaed6fb38e1a5ef7837679ceadf96b1cb9..29c0d92195ce6d8c66e59ac198b53efd1155acca 100644 (file)
@@ -318,7 +318,7 @@ static u32 get_otp(int index, int shift, int mask)
        u32 otp = 0;
 
        ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                         DM_GET_DRIVER(stm32mp_bsec),
+                                         DM_DRIVER_GET(stm32mp_bsec),
                                          &dev);
 
        if (!ret)
@@ -563,7 +563,7 @@ __weak int setup_mac_address(void)
                return 0;
 
        ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                         DM_GET_DRIVER(stm32mp_bsec),
+                                         DM_DRIVER_GET(stm32mp_bsec),
                                          &dev);
        if (ret)
                return ret;
@@ -601,7 +601,7 @@ static int setup_serial_number(void)
                return 0;
 
        ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                         DM_GET_DRIVER(stm32mp_bsec),
+                                         DM_DRIVER_GET(stm32mp_bsec),
                                          &dev);
        if (ret)
                return ret;
index dbd156ffceca25cc80c4791d80e4c8b120e03ef9..95780f79c2c3b002645896177bf4e83497b88b61 100644 (file)
@@ -95,7 +95,7 @@ void support_card_init(void)
 
        /* The system bus must be initialized for access to the support card. */
        ret = uclass_get_device_by_driver(UCLASS_SIMPLE_BUS,
-                                         DM_GET_DRIVER(uniphier_system_bus_driver),
+                                         DM_DRIVER_GET(uniphier_system_bus_driver),
                                          &dev);
        if (ret)
                return;
index 1ace117fc8e59ea897b057345a05bd32323a793b..856047613c198860d4ca22ad1695aaf83a026c69 100644 (file)
@@ -40,7 +40,7 @@ int set_cpu_clk_info(void)
        int i, ret;
 
        ret = uclass_get_device_by_driver(UCLASS_CLK,
-               DM_GET_DRIVER(zynq_clk), &dev);
+               DM_DRIVER_GET(zynq_clk), &dev);
        if (ret)
                return ret;
 
@@ -75,7 +75,7 @@ int soc_clk_dump(void)
        int i, ret;
 
        ret = uclass_get_device_by_driver(UCLASS_CLK,
-               DM_GET_DRIVER(zynq_clk), &dev);
+               DM_DRIVER_GET(zynq_clk), &dev);
        if (ret)
                return ret;
 
index cc0e24cbfede723373718ebe6177db15374cffe8..37193157d9ecd8c1e9468148ab093d7b06a527ad 100644 (file)
@@ -68,7 +68,7 @@ int timer_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_CLK,
-               DM_GET_DRIVER(zynq_clk), &dev);
+               DM_DRIVER_GET(zynq_clk), &dev);
        if (ret)
                return ret;
 
index 77d1f2ea0dc5049d5f3ad009e18c953488097b50..33538647a2d6cdf8035f942b59e2e3df7fb9e1c5 100644 (file)
@@ -74,7 +74,7 @@ int print_cpuinfo(void)
               ddr ? "" : "2", chipmode & 0x01 ? 4 : 3,
               chipmode & 0x02 ? "XTAL" : "CPLL");
 
-       ret = uclass_get_device_by_driver(UCLASS_CLK, DM_GET_DRIVER(mt7628_clk),
+       ret = uclass_get_device_by_driver(UCLASS_CLK, DM_DRIVER_GET(mt7628_clk),
                                          &clkdev);
        if (ret)
                return ret;
index c8079dc510c271722163a771b249a4513981436e..cfa288a01a84b0268aac8b1cb48412c49b7e436e 100644 (file)
@@ -25,7 +25,7 @@ int riscv_init_ipi(void)
        struct udevice *dev;
 
        ret = uclass_get_device_by_driver(UCLASS_TIMER,
-                                         DM_GET_DRIVER(sifive_clint), &dev);
+                                         DM_DRIVER_GET(sifive_clint), &dev);
        if (ret)
                return ret;
 
index f42d395098bcc5c03bcfb6aec2afe51c1050b70c..35669c252bf625dd19908832c62cc7540142748e 100644 (file)
@@ -343,7 +343,7 @@ int g_dnl_board_usb_cable_connected(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_USB_GADGET_GENERIC,
-                                         DM_GET_DRIVER(dwc2_udc_otg),
+                                         DM_DRIVER_GET(dwc2_udc_otg),
                                          &dwc2_udc_otg);
        if (!ret)
                debug("dwc2_udc_otg init failed\n");
@@ -475,11 +475,11 @@ static void sysconf_init(void)
         *      but this value need to be consistent with board design
         */
        ret = uclass_get_device_by_driver(UCLASS_PMIC,
-                                         DM_GET_DRIVER(stm32mp_pwr_pmic),
+                                         DM_DRIVER_GET(stm32mp_pwr_pmic),
                                          &pwr_dev);
        if (!ret) {
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(stm32mp_bsec),
+                                                 DM_DRIVER_GET(stm32mp_bsec),
                                                  &dev);
                if (ret) {
                        pr_err("Can't find stm32mp_bsec driver\n");
index 441a1a376a9a2a8566a66dec2dfe2abcc73a1f9a..23080c1798b78f7bd5901e026cdfb5130e52165d 100644 (file)
@@ -45,7 +45,7 @@ int board_early_init_r(void)
         * setting up.
         */
        ret = uclass_get_device_by_driver(UCLASS_CLK,
-                                         DM_GET_DRIVER(clk_rk3399), &clk);
+                                         DM_DRIVER_GET(clk_rk3399), &clk);
        if (ret) {
                debug("%s: CLK init failed: %d\n", __func__, ret);
                return ret;
index 9eccdc4a832feabbdabe605d068403989c199048..d349531261ed09695fdd88c58c7c67d697a35861 100644 (file)
@@ -60,7 +60,7 @@ int tegra_pcie_board_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_PMIC,
-                                         DM_GET_DRIVER(pmic_as3722), &dev);
+                                         DM_DRIVER_GET(pmic_as3722), &dev);
        if (ret) {
                debug("%s: Failed to find PMIC\n", __func__);
                return ret;
index 71c71ed6ec231e26e6bd5bf597013ca1f0adb98b..06a36f8ed3871920702999ebc2958feff7ba2284 100644 (file)
@@ -52,7 +52,7 @@ int tegra_lcd_pmic_init(int board_id)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_PMIC,
-                                         DM_GET_DRIVER(pmic_as3722), &dev);
+                                         DM_DRIVER_GET(pmic_as3722), &dev);
        if (ret) {
                debug("%s: Failed to find PMIC\n", __func__);
                return ret;
index e3fa3526b75d773fc6e2b945cf950fc30cb0adac..ebb2d6f7420f01053cc725960f33bb8d3c5f8779 100644 (file)
@@ -91,7 +91,7 @@ static int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc,
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_SYSRESET,
-                                         DM_GET_DRIVER(sysreset_renesas_ulcb),
+                                         DM_DRIVER_GET(sysreset_renesas_ulcb),
                                          &dev);
        if (ret)
                return ret;
index 54e5a4c16739e46ca97f2bf74719278a71270d76..a4e78220cbaefc582c42357ac98b13e1d6d17b0b 100644 (file)
@@ -58,7 +58,7 @@ static u32 fu540_read_serialnum(void)
 
        /* init OTP */
        ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                         DM_GET_DRIVER(sifive_otp), &dev);
+                                         DM_DRIVER_GET(sifive_otp), &dev);
 
        if (ret) {
                debug("%s: could not find otp device\n", __func__);
index e1038619f0c957210c39941f6c36800fe495cdd9..2fba3831685af139a44d51122f1c89a616f1c277 100644 (file)
@@ -85,7 +85,7 @@ static int do_stboard(struct cmd_tbl *cmdtp, int flag, int argc,
                return CMD_RET_USAGE;
 
        ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                         DM_GET_DRIVER(stm32mp_bsec),
+                                         DM_DRIVER_GET(stm32mp_bsec),
                                          &dev);
 
        ret = misc_read(dev, STM32_BSEC_OTP(BSEC_OTP_BOARD),
index aab7d741ac609fee8613d38cdc9883b1920090b3..9c3d115dce7384e3e8144daed93303ee6271d467 100644 (file)
@@ -163,7 +163,7 @@ static int dfu_otp_read(u64 offset, u8 *buffer, long *size)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                         DM_GET_DRIVER(stm32mp_bsec),
+                                         DM_DRIVER_GET(stm32mp_bsec),
                                          &dev);
        if (ret)
                return ret;
@@ -184,7 +184,7 @@ static int dfu_pmic_read(u64 offset, u8 *buffer, long *size)
        struct udevice *dev;
 
        ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                         DM_GET_DRIVER(stpmic1_nvm),
+                                         DM_DRIVER_GET(stpmic1_nvm),
                                          &dev);
        if (ret)
                return ret;
index 3aa379e8a50f8de820c18bd52a7e3170fd097efc..a313b817c57290f1d3e3e0c2ace443025ce1ea97 100644 (file)
@@ -20,7 +20,7 @@ int board_ddr_power_init(enum ddr_type ddr_type)
        u32 buck2;
 
        ret = uclass_get_device_by_driver(UCLASS_PMIC,
-                                         DM_GET_DRIVER(pmic_stpmic1), &dev);
+                                         DM_DRIVER_GET(pmic_stpmic1), &dev);
        if (ret)
                /* No PMIC on board */
                return 0;
@@ -187,7 +187,7 @@ void stpmic1_init(u32 voltage_mv)
        struct udevice *dev;
 
        if (uclass_get_device_by_driver(UCLASS_PMIC,
-                                       DM_GET_DRIVER(pmic_stpmic1), &dev))
+                                       DM_DRIVER_GET(pmic_stpmic1), &dev))
                return;
 
        /* update VDDCORE = BUCK1 */
index f1197f9faa48ece7c7a763ac41f29fbffc329f81..e0a2b76353afb0660dcc75a41e2a30b4f1e5f423 100644 (file)
@@ -22,7 +22,7 @@ int stusb160x_cable_connected(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_I2C_GENERIC,
-                                         DM_GET_DRIVER(stusb160x),
+                                         DM_DRIVER_GET(stusb160x),
                                          &dev);
        if (ret < 0)
                return ret;
index 8a3ce0a6f591524a401762c112b6105d64eab3ea..08393b27eb27f48571c7db04cf81d93cb6952b3a 100644 (file)
@@ -116,7 +116,7 @@ int checkboard(void)
        /* display the STMicroelectronics board identification */
        if (CONFIG_IS_ENABLED(CMD_STBOARD)) {
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(stm32mp_bsec),
+                                                 DM_DRIVER_GET(stm32mp_bsec),
                                                  &dev);
                if (!ret)
                        ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_BOARD),
@@ -196,7 +196,7 @@ int g_dnl_board_usb_cable_connected(void)
                return ret;
 
        ret = uclass_get_device_by_driver(UCLASS_USB_GADGET_GENERIC,
-                                         DM_GET_DRIVER(dwc2_udc_otg),
+                                         DM_DRIVER_GET(dwc2_udc_otg),
                                          &dwc2_udc_otg);
        if (!ret)
                debug("dwc2_udc_otg init failed\n");
@@ -464,11 +464,11 @@ static void sysconf_init(void)
         *      but this value need to be consistent with board design
         */
        ret = uclass_get_device_by_driver(UCLASS_PMIC,
-                                         DM_GET_DRIVER(stm32mp_pwr_pmic),
+                                         DM_DRIVER_GET(stm32mp_pwr_pmic),
                                          &pwr_dev);
        if (!ret && IS_ENABLED(CONFIG_DM_REGULATOR)) {
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(stm32mp_bsec),
+                                                 DM_DRIVER_GET(stm32mp_bsec),
                                                  &dev);
                if (ret) {
                        pr_err("Can't find stm32mp_bsec driver\n");
@@ -618,7 +618,7 @@ static void board_ev1_init(void)
        struct udevice *dev;
 
        /* configure IRQ line on EV1 for touchscreen before LCD reset */
-       uclass_get_device_by_driver(UCLASS_NOP, DM_GET_DRIVER(goodix), &dev);
+       uclass_get_device_by_driver(UCLASS_NOP, DM_DRIVER_GET(goodix), &dev);
 }
 
 /* board dependent setup after realloc */
@@ -680,7 +680,7 @@ int board_late_init(void)
                        }
                }
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(stm32mp_bsec),
+                                                 DM_DRIVER_GET(stm32mp_bsec),
                                                  &dev);
 
                if (!ret)
index d8711eb90050d55ea762a88eb8a23aacbccd479a..44969e80b4d59d8eda85a8b60b39acdbc05808e4 100644 (file)
@@ -411,7 +411,7 @@ void spl_board_init(void)
 #ifdef CONFIG_ESM_K3
        if (board_ti_k3_is("J721EX-PM2-SOM")) {
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(k3_esm), &dev);
+                                                 DM_DRIVER_GET(k3_esm), &dev);
                if (ret)
                        printf("ESM init failed: %d\n", ret);
        }
@@ -420,7 +420,7 @@ void spl_board_init(void)
 #ifdef CONFIG_ESM_PMIC
        if (board_ti_k3_is("J721EX-PM2-SOM")) {
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(pmic_esm),
+                                                 DM_DRIVER_GET(pmic_esm),
                                                  &dev);
                if (ret)
                        printf("ESM PMIC init failed: %d\n", ret);
index e7a2186c2c42cd8228aa82ac641ff84ce12ed205..b97617cfca363aadbc10ced5c1eb6fe472403696 100644 (file)
@@ -155,7 +155,7 @@ int tegra_pcie_board_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_PMIC,
-                                         DM_GET_DRIVER(pmic_as3722), &dev);
+                                         DM_DRIVER_GET(pmic_as3722), &dev);
        if (ret) {
                pr_err("failed to find AS3722 PMIC: %d\n", ret);
                return ret;
@@ -194,7 +194,7 @@ void tegra_pcie_board_port_reset(struct tegra_pcie_port *port)
                int ret;
 
                ret = uclass_get_device_by_driver(UCLASS_PMIC,
-                                                 DM_GET_DRIVER(pmic_as3722),
+                                                 DM_DRIVER_GET(pmic_as3722),
                                                  &dev);
                if (ret) {
                        debug("%s: Failed to find PMIC\n", __func__);
index 72cbcdf6a21a75adaf5075b67f7ccbbed086d428..5bea2b60b9baa377c98a2f2defb17cb3ff4792b2 100644 (file)
@@ -2253,7 +2253,7 @@ int soc_clk_dump(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_CLK,
-                                         DM_GET_DRIVER(stm32mp1_clock),
+                                         DM_DRIVER_GET(stm32mp1_clock),
                                          &dev);
        if (ret)
                return ret;
index a9988d8f1a82dcbabcae05b363150118afff9328..e8acca00660df06ae8b87d2ad27cf2a1677676e5 100644 (file)
@@ -617,7 +617,7 @@ int soc_clk_dump(void)
        int i, ret;
 
        ret = uclass_get_device_by_driver(UCLASS_CLK,
-               DM_GET_DRIVER(zynqmp_clk), &dev);
+               DM_DRIVER_GET(zynqmp_clk), &dev);
        if (ret)
                return ret;
 
index 27a652a625ab0f2498422b8bca05a21bfbc72548..8484613eed5c37f5c0cc247e12eeb91c6d8e7656 100644 (file)
@@ -51,7 +51,7 @@ int soc_clk_dump(void)
        int i, ret;
 
        ret = uclass_get_device_by_driver(UCLASS_CLK,
-                                         DM_GET_DRIVER(imx8_clk), &dev);
+                                         DM_DRIVER_GET(imx8_clk), &dev);
        if (ret)
                return ret;
 
index 388471b03a90af150ae1515201130e8f3b7d13b9..d43b8a0648c2f2ac09df890a5b16bae69d306b55 100644 (file)
@@ -296,7 +296,7 @@ static ulong mtk_topckgen_get_factor_rate(struct clk *clk, u32 off)
        switch (fdiv->flags & CLK_PARENT_MASK) {
        case CLK_PARENT_APMIXED:
                rate = mtk_clk_find_parent_rate(clk, fdiv->parent,
-                               DM_GET_DRIVER(mtk_clk_apmixedsys));
+                               DM_DRIVER_GET(mtk_clk_apmixedsys));
                break;
        case CLK_PARENT_TOPCKGEN:
                rate = mtk_clk_find_parent_rate(clk, fdiv->parent, NULL);
@@ -474,11 +474,11 @@ static ulong mtk_clk_gate_get_rate(struct clk *clk)
        switch (gate->flags & CLK_PARENT_MASK) {
        case CLK_PARENT_APMIXED:
                return mtk_clk_find_parent_rate(clk, gate->parent,
-                               DM_GET_DRIVER(mtk_clk_apmixedsys));
+                               DM_DRIVER_GET(mtk_clk_apmixedsys));
                break;
        case CLK_PARENT_TOPCKGEN:
                return mtk_clk_find_parent_rate(clk, gate->parent,
-                               DM_GET_DRIVER(mtk_clk_topckgen));
+                               DM_DRIVER_GET(mtk_clk_topckgen));
                break;
 
        default:
index 9a08c148a0d632745fa8e995f79a6395fa26ddd4..b3882d0b77d13be66a63f2149bda2082b7901f47 100644 (file)
@@ -537,7 +537,7 @@ static int __prci_consumer_reset(const char *rst_name, bool trigger)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_RESET,
-                                         DM_GET_DRIVER(sifive_reset),
+                                         DM_DRIVER_GET(sifive_reset),
                                          &dev);
        if (ret) {
                dev_err(dev, "Reset driver not found: %d\n", ret);
index b3d3f0a51b098c39b7260fde731342534abe736f..516e690ac2d5496a98a2731fef70c5369af008e8 100644 (file)
@@ -73,11 +73,11 @@ static int scmi_bind_protocols(struct udevice *dev)
                switch (protocol_id) {
                case SCMI_PROTOCOL_ID_CLOCK:
                        if (IS_ENABLED(CONFIG_CLK_SCMI))
-                               drv = DM_GET_DRIVER(scmi_clock);
+                               drv = DM_DRIVER_GET(scmi_clock);
                        break;
                case SCMI_PROTOCOL_ID_RESET_DOMAIN:
                        if (IS_ENABLED(CONFIG_RESET_SCMI))
-                               drv = DM_GET_DRIVER(scmi_reset_domain);
+                               drv = DM_DRIVER_GET(scmi_reset_domain);
                        break;
                default:
                        break;
index 952c111b087cc833503c07d03d1d002ff181a733..bad6b71e0c38b78d1c115ad09085808aa95aacbe 100644 (file)
@@ -306,7 +306,7 @@ int gpio_hog_probe_all(void)
        for (uclass_first_device(UCLASS_NOP, &dev);
             dev;
             uclass_find_next_device(&dev)) {
-               if (dev->driver == DM_GET_DRIVER(gpio_hog)) {
+               if (dev->driver == DM_DRIVER_GET(gpio_hog)) {
                        ret = device_probe(dev);
                        if (ret) {
                                printf("Failed to probe device %s err: %d\n",
index 9ffd28f597d941f729d9da42f738c883ce29e59c..5926c91a2ec9c777e053ee76a0aff25aed233b59 100644 (file)
@@ -131,7 +131,7 @@ static int i2c_eeprom_std_bind(struct udevice *dev)
                if (!name)
                        continue;
 
-               device_bind(dev, DM_GET_DRIVER(i2c_eeprom_partition), name,
+               device_bind(dev, DM_DRIVER_GET(i2c_eeprom_partition), name,
                            NULL, partition, NULL);
        }
 
index be25389e0e35d0b0b3fde91ce8e3215290e77ce1..083ee65e0ad71f6e9a9ec94ed077bdfeca69d209 100644 (file)
@@ -58,7 +58,7 @@ static int dump_efuses(struct cmd_tbl *cmdtp, int flag,
 
        /* retrieve the device */
        ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                         DM_GET_DRIVER(rockchip_efuse), &dev);
+                                         DM_DRIVER_GET(rockchip_efuse), &dev);
        if (ret) {
                printf("%s: no misc-device found\n", __func__);
                return 0;
index 0eed3459734b0a0711eb2f17f975b871447df80b..9fd6c367dc61bc4d58e5742f8cebb09648484131 100644 (file)
@@ -26,7 +26,7 @@ int fuse_read(u32 bank, u32 word, u32 *val)
        switch (bank) {
        case STM32MP_OTP_BANK:
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(stm32mp_bsec),
+                                                 DM_DRIVER_GET(stm32mp_bsec),
                                                  &dev);
                if (ret)
                        return ret;
@@ -41,7 +41,7 @@ int fuse_read(u32 bank, u32 word, u32 *val)
 #ifdef CONFIG_PMIC_STPMIC1
        case STM32MP_NVM_BANK:
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(stpmic1_nvm),
+                                                 DM_DRIVER_GET(stpmic1_nvm),
                                                  &dev);
                if (ret)
                        return ret;
@@ -71,7 +71,7 @@ int fuse_prog(u32 bank, u32 word, u32 val)
        switch (bank) {
        case STM32MP_OTP_BANK:
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(stm32mp_bsec),
+                                                 DM_DRIVER_GET(stm32mp_bsec),
                                                  &dev);
                if (ret)
                        return ret;
@@ -86,7 +86,7 @@ int fuse_prog(u32 bank, u32 word, u32 val)
 #ifdef CONFIG_PMIC_STPMIC1
        case STM32MP_NVM_BANK:
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(stpmic1_nvm),
+                                                 DM_DRIVER_GET(stpmic1_nvm),
                                                  &dev);
                if (ret)
                        return ret;
@@ -115,7 +115,7 @@ int fuse_sense(u32 bank, u32 word, u32 *val)
        switch (bank) {
        case STM32MP_OTP_BANK:
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(stm32mp_bsec),
+                                                 DM_DRIVER_GET(stm32mp_bsec),
                                                  &dev);
                if (ret)
                        return ret;
@@ -129,7 +129,7 @@ int fuse_sense(u32 bank, u32 word, u32 *val)
 #ifdef CONFIG_PMIC_STPMIC1
        case STM32MP_NVM_BANK:
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(stpmic1_nvm),
+                                                 DM_DRIVER_GET(stpmic1_nvm),
                                                  &dev);
                if (ret)
                        return ret;
@@ -159,7 +159,7 @@ int fuse_override(u32 bank, u32 word, u32 val)
        switch (bank) {
        case STM32MP_OTP_BANK:
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(stm32mp_bsec),
+                                                 DM_DRIVER_GET(stm32mp_bsec),
                                                  &dev);
                if (ret)
                        return ret;
@@ -174,7 +174,7 @@ int fuse_override(u32 bank, u32 word, u32 val)
 #ifdef CONFIG_PMIC_STPMIC1
        case STM32MP_NVM_BANK:
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(stpmic1_nvm),
+                                                 DM_DRIVER_GET(stpmic1_nvm),
                                                  &dev);
                if (ret)
                        return ret;
index d4e8f8df87d83a964e6fd777100e3b2d27ef3d52..4621bfb03e385c3b4be9a731aece8a323918340d 100644 (file)
@@ -1319,7 +1319,7 @@ void board_nand_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MTD,
-                                         DM_GET_DRIVER(arasan_nand), &dev);
+                                         DM_DRIVER_GET(arasan_nand), &dev);
        if (ret && ret != -ENODEV)
                pr_err("Failed to initialize %s. (error %d)\n", dev->name, ret);
 }
index 71682cb6e79a28e3c2e0531a59967b06d2dcbb29..aa095c439ba1b4b55624295d32e64cddd94fcf38 100644 (file)
@@ -118,7 +118,7 @@ void board_nand_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MTD,
-                                         DM_GET_DRIVER(bcm63158_nand), &dev);
+                                         DM_DRIVER_GET(bcm63158_nand), &dev);
        if (ret && ret != -ENODEV)
                pr_err("Failed to initialize %s. (error %d)\n", dev->name,
                       ret);
index f424194ecca7bf09691a8fc69e3d0a9eb68b004d..e4bf1936810a52bfd685d338459fcf12a3accf5e 100644 (file)
@@ -111,7 +111,7 @@ void board_nand_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MTD,
-                                         DM_GET_DRIVER(bcm6368_nand), &dev);
+                                         DM_DRIVER_GET(bcm6368_nand), &dev);
        if (ret && ret != -ENODEV)
                pr_err("Failed to initialize %s. (error %d)\n", dev->name,
                       ret);
index 47ddde4f9b0c13db82cab43fd4750af747131d83..586ea3d8fbb48aea67aaab2b189d60e97ccaf63a 100644 (file)
@@ -117,7 +117,7 @@ void board_nand_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MTD,
-                                         DM_GET_DRIVER(bcm68360_nand), &dev);
+                                         DM_DRIVER_GET(bcm68360_nand), &dev);
        if (ret && ret != -ENODEV)
                pr_err("Failed to initialize %s. (error %d)\n", dev->name,
                       ret);
index 646495096c2d61c9519ab496b94371f952f56625..85f318bd779a7a4ad5784bf0c88e16aa998e9209 100644 (file)
@@ -117,7 +117,7 @@ void board_nand_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MTD,
-                                         DM_GET_DRIVER(bcm6838_nand), &dev);
+                                         DM_DRIVER_GET(bcm6838_nand), &dev);
        if (ret && ret != -ENODEV)
                pr_err("Failed to initialize %s. (error %d)\n", dev->name,
                       ret);
index 7573cd944ff56e1d7a86134402350a371c9d5267..a5e159ad521fc2cd753f99f0d66b52bc674cf967 100644 (file)
@@ -118,7 +118,7 @@ void board_nand_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MTD,
-                                         DM_GET_DRIVER(bcm6858_nand), &dev);
+                                         DM_DRIVER_GET(bcm6858_nand), &dev);
        if (ret && ret != -ENODEV)
                pr_err("Failed to initialize %s. (error %d)\n", dev->name,
                       ret);
index 4645cc16997dc2782356b537903b4a548440013d..9ad3a57690e5be6b063fd6069d390550b74232da 100644 (file)
@@ -825,7 +825,7 @@ void board_nand_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MTD,
-                                         DM_GET_DRIVER(davinci_nand), &dev);
+                                         DM_DRIVER_GET(davinci_nand), &dev);
        if (ret && ret != -ENODEV)
                pr_err("Failed to initialize %s: %d\n", dev->name, ret);
 }
index 140ef7f725ee71e60a87a593b25d8ad70c21616f..cf4df0168a31e1754c080bea33362bc208a0c2cd 100644 (file)
@@ -181,7 +181,7 @@ void board_nand_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MTD,
-                                         DM_GET_DRIVER(denali_nand_dt),
+                                         DM_DRIVER_GET(denali_nand_dt),
                                          &dev);
        if (ret && ret != -ENODEV)
                pr_err("Failed to initialize Denali NAND controller. (error %d)\n",
index 78a423dbbf4ae6f649d096f8c1b54b534770f410..878796d5552aadc6b214e4dcf4e88107962d4204 100644 (file)
@@ -177,7 +177,7 @@ void board_nand_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MTD,
-                                         DM_GET_DRIVER(mxs_nand_dt),
+                                         DM_DRIVER_GET(mxs_nand_dt),
                                          &dev);
        if (ret && ret != -ENODEV)
                pr_err("Failed to initialize MXS NAND controller. (error %d)\n",
index 64433cf6ccc3bc211409feecb44a70a9ec79ebb1..9997135ef937c4f5a3d53eaeef294034fff1b42a 100644 (file)
@@ -2233,14 +2233,14 @@ void board_nand_init(void)
 
        if (IS_ENABLED(CONFIG_NAND_OCTEONTX_HW_ECC)) {
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(octeontx_pci_bchpf),
+                                                 DM_DRIVER_GET(octeontx_pci_bchpf),
                                                  &dev);
                if (ret && ret != -ENODEV) {
                        pr_err("Failed to initialize OcteonTX BCH PF controller. (error %d)\n",
                               ret);
                }
                ret = uclass_get_device_by_driver(UCLASS_MISC,
-                                                 DM_GET_DRIVER(octeontx_pci_bchvf),
+                                                 DM_DRIVER_GET(octeontx_pci_bchvf),
                                                  &dev);
                if (ret && ret != -ENODEV) {
                        pr_err("Failed to initialize OcteonTX BCH VF controller. (error %d)\n",
@@ -2249,7 +2249,7 @@ void board_nand_init(void)
        }
 
        ret = uclass_get_device_by_driver(UCLASS_MTD,
-                                         DM_GET_DRIVER(octeontx_pci_nand),
+                                         DM_DRIVER_GET(octeontx_pci_nand),
                                          &dev);
        if (ret && ret != -ENODEV)
                pr_err("Failed to initialize OcteonTX NAND controller. (error %d)\n",
index e923ce363a0879c268f71c8144ab347d28327ff3..f6233756d853dc555eb29a575756b60a3f035ec0 100644 (file)
@@ -1947,7 +1947,7 @@ void board_nand_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MTD,
-                       DM_GET_DRIVER(pxa3xx_nand), &dev);
+                       DM_DRIVER_GET(pxa3xx_nand), &dev);
        if (ret && ret != -ENODEV) {
                pr_err("Failed to initialize %s. (error %d)\n", dev->name,
                           ret);
index 8fe7ec1343e62d15128b3e49a6774e0aa9671e8a..b8561b2516c523eea8272ba23613a0bb8a0a45c2 100644 (file)
@@ -1042,7 +1042,7 @@ void board_nand_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MTD,
-                                         DM_GET_DRIVER(stm32_fmc2_nfc),
+                                         DM_DRIVER_GET(stm32_fmc2_nfc),
                                          &dev);
        if (ret && ret != -ENODEV)
                pr_err("Failed to initialize STM32 FMC2 NFC controller. (error %d)\n",
index 797fc23050442385259223d25aa5d33220497719..a530127cb7793d06ecba587be5b30cfa5a810127 100644 (file)
@@ -999,7 +999,7 @@ void board_nand_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MTD,
-                                         DM_GET_DRIVER(tegra_nand), &dev);
+                                         DM_DRIVER_GET(tegra_nand), &dev);
        if (ret && ret != -ENODEV)
                pr_err("Failed to initialize %s. (error %d)\n", dev->name,
                       ret);
index 422b9c57a88c54348094cd33fb9e8d8a91a1a047..e33953ec7c64b5f747d8af394288abef162e9150 100644 (file)
@@ -794,7 +794,7 @@ void board_nand_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MTD,
-                                         DM_GET_DRIVER(vf610_nfc_dt),
+                                         DM_DRIVER_GET(vf610_nfc_dt),
                                          &dev);
        if (ret && ret != -ENODEV)
                pr_err("Failed to initialize NAND controller. (error %d)\n",
index 7cf0ccb656c283a85ec97aaae4b923004b7335b4..15d4a238e6f3afb11aaf66341a4a37e8c9c2e157 100644 (file)
@@ -1295,7 +1295,7 @@ void board_nand_init(void)
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_MTD,
-                                         DM_GET_DRIVER(zynq_nand), &dev);
+                                         DM_DRIVER_GET(zynq_nand), &dev);
        if (ret && ret != -ENODEV)
                pr_err("Failed to initialize %s. (error %d)\n", dev->name, ret);
 }
index a229d490f36dd811fbe01c5735fa15e7a884ca86..c3d650fc6b0848a961e3b44843ab98b15cbda5da 100644 (file)
@@ -72,7 +72,7 @@ static int ast2500_reset_probe(struct udevice *dev)
 
        /* get SCU base from clock device */
        rc = uclass_get_device_by_driver(UCLASS_CLK,
-                                        DM_GET_DRIVER(aspeed_ast2500_scu), &scu_dev);
+                                        DM_DRIVER_GET(aspeed_ast2500_scu), &scu_dev);
        if (rc) {
                debug("%s: clock device not found, rc=%d\n", __func__, rc);
                return rc;
index abf40bddfbe7f2c52889510e0389e1619800bebb..dd87fc461b95417fe3d14b7dd5029b55392c7408 100644 (file)
@@ -219,7 +219,7 @@ static int do_lgset(struct cmd_tbl *cmdtp, int flag, int argc,
        int ret;
 
        ret = uclass_get_device_by_driver(UCLASS_DISPLAY,
-                                         DM_GET_DRIVER(lg4573_lcd), &dev);
+                                         DM_DRIVER_GET(lg4573_lcd), &dev);
        if (ret) {
                printf("%s: Could not get lg4573 device\n", __func__);
                return ret;
index e16ba2405f986c6b6d2754098c820b4e76da2daa..68990301051003e73d0ca37820f640291b748336 100644 (file)
@@ -335,7 +335,7 @@ struct driver {
        ll_entry_declare(struct driver, __name, driver)
 
 /* Get a pointer to a given driver */
-#define DM_GET_DRIVER(__name)                                          \
+#define DM_DRIVER_GET(__name)                                          \
        ll_entry_get(struct driver, __name, driver)
 
 /**
index f06339e4d69eaa51413d1336b7aaae64521fca7a..b5f066dbf48bf3da2de23a96c97741a0b5315dbb 100644 (file)
@@ -264,7 +264,7 @@ int uclass_get_device_by_phandle(enum uclass_id id, struct udevice *parent,
  * uclass_get_device_by_driver() - Get a uclass device for a driver
  *
  * This searches the devices in the uclass for one that uses the given
- * driver. Use DM_GET_DRIVER(name) for the @drv argument, where 'name' is
+ * driver. Use DM_DRIVER_GET(name) for the @drv argument, where 'name' is
  * the driver name - as used in U_BOOT_DRIVER(name).
  *
  * The device is probed to activate it ready for use.
index 82b7a668ddc653786c6e4b194febb5844948a15b..1f5ca570dc7a9f511680c466ae0055d55970188e 100644 (file)
@@ -1052,7 +1052,7 @@ static int dm_test_inactive_child(struct unit_test_state *uts)
         */
        ut_asserteq(-ENODEV, device_find_first_inactive_child(parent,
                                                        UCLASS_TEST, &dev1));
-       ut_assertok(device_bind(parent, DM_GET_DRIVER(test_drv),
+       ut_assertok(device_bind(parent, DM_DRIVER_GET(test_drv),
                                "test_child", 0, ofnode_null(), &dev1));
 
        ut_assertok(device_find_first_inactive_child(parent, UCLASS_TEST,
index 711bf20a9c53853dd0ed959957fa9f13d8fba32f..b53539055b60e34a5c488edf0602612f920ba485 100644 (file)
@@ -328,7 +328,7 @@ static int dm_test_fdt_uclass_seq_more(struct unit_test_state *uts)
 
        /* Check creating a device with an alias */
        node = ofnode_path("/some-bus/c-test@1");
-       ut_assertok(device_bind(dm_root(), DM_GET_DRIVER(testfdt_drv),
+       ut_assertok(device_bind(dm_root(), DM_DRIVER_GET(testfdt_drv),
                                "c-test@1", NULL, node, &dev));
        ut_asserteq(12, dev_seq(dev));
        ut_assertok(uclass_get_device_by_seq(UCLASS_TEST_FDT, 12, &dev));
@@ -348,11 +348,11 @@ static int dm_test_fdt_uclass_seq_more(struct unit_test_state *uts)
         *
         * So next available is 19
         */
-       ut_assertok(device_bind(dm_root(), DM_GET_DRIVER(testfdt_drv),
+       ut_assertok(device_bind(dm_root(), DM_DRIVER_GET(testfdt_drv),
                                "fred", NULL, ofnode_null(), &dev));
        ut_asserteq(19, dev_seq(dev));
 
-       ut_assertok(device_bind(dm_root(), DM_GET_DRIVER(testfdt_drv),
+       ut_assertok(device_bind(dm_root(), DM_DRIVER_GET(testfdt_drv),
                                "fred2", NULL, ofnode_null(), &dev));
        ut_asserteq(20, dev_seq(dev));