mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 13:43:28 +00:00
dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()
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>
This commit is contained in:
parent
8629d30a32
commit
65e25bea59
73 changed files with 110 additions and 110 deletions
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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__);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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__);
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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__);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
||||
/**
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in a new issue