From 20e442ab2df355450006574fff178c746d254a18 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 28 Dec 2020 20:34:54 -0700 Subject: dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO() The current macro is a misnomer since it does not declare a device directly. Instead, it declares driver_info record which U-Boot uses at runtime to create a device. The distinction seems somewhat minor most of the time, but is becomes quite confusing when we actually want to declare a device, with of-platdata. We are left trying to distinguish between a device which isn't actually device, and a device that is (perhaps an 'instance'?) It seems better to rename this macro to describe what it actually is. The macros is not widely used, since boards should use devicetree to declare devices. Rename it to U_BOOT_DRVINFO(), which indicates clearly that this is declaring a new driver_info record, not a device. Signed-off-by: Simon Glass --- drivers/crypto/fsl/fsl_rsa.c | 2 +- drivers/crypto/rsa_mod_exp/mod_exp_sw.c | 2 +- drivers/demo/demo-pdata.c | 10 +++++----- drivers/gpio/imx_rgpio2p.c | 4 ++-- drivers/gpio/mxc_gpio.c | 2 +- drivers/remoteproc/sandbox_testproc.c | 2 +- drivers/rtc/emul_rtc.c | 2 +- drivers/serial/sandbox.c | 2 +- drivers/sysreset/sysreset_sandbox.c | 4 ++-- drivers/timer/sandbox_timer.c | 2 +- drivers/video/sunxi/sunxi_de2.c | 2 +- drivers/video/sunxi/sunxi_dw_hdmi.c | 2 +- drivers/video/sunxi/sunxi_lcd.c | 2 +- 13 files changed, 19 insertions(+), 19 deletions(-) (limited to 'drivers') diff --git a/drivers/crypto/fsl/fsl_rsa.c b/drivers/crypto/fsl/fsl_rsa.c index ed2a54f..897ee85 100644 --- a/drivers/crypto/fsl/fsl_rsa.c +++ b/drivers/crypto/fsl/fsl_rsa.c @@ -55,6 +55,6 @@ U_BOOT_DRIVER(fsl_rsa_mod_exp) = { .ops = &fsl_mod_exp_ops, }; -U_BOOT_DEVICE(fsl_rsa) = { +U_BOOT_DRVINFO(fsl_rsa) = { .name = "fsl_rsa_mod_exp", }; diff --git a/drivers/crypto/rsa_mod_exp/mod_exp_sw.c b/drivers/crypto/rsa_mod_exp/mod_exp_sw.c index 4ce85b3..7bed444 100644 --- a/drivers/crypto/rsa_mod_exp/mod_exp_sw.c +++ b/drivers/crypto/rsa_mod_exp/mod_exp_sw.c @@ -35,6 +35,6 @@ U_BOOT_DRIVER(mod_exp_sw) = { .flags = DM_FLAG_PRE_RELOC, }; -U_BOOT_DEVICE(mod_exp_sw) = { +U_BOOT_DRVINFO(mod_exp_sw) = { .name = "mod_exp_sw", }; diff --git a/drivers/demo/demo-pdata.c b/drivers/demo/demo-pdata.c index b504c31..818f775 100644 --- a/drivers/demo/demo-pdata.c +++ b/drivers/demo/demo-pdata.c @@ -20,27 +20,27 @@ static const struct dm_demo_pdata yellow_hexagon = { .sides = 6. }; -U_BOOT_DEVICE(demo0) = { +U_BOOT_DRVINFO(demo0) = { .name = "demo_shape_drv", .plat = &red_square, }; -U_BOOT_DEVICE(demo1) = { +U_BOOT_DRVINFO(demo1) = { .name = "demo_simple_drv", .plat = &red_square, }; -U_BOOT_DEVICE(demo2) = { +U_BOOT_DRVINFO(demo2) = { .name = "demo_shape_drv", .plat = &green_triangle, }; -U_BOOT_DEVICE(demo3) = { +U_BOOT_DRVINFO(demo3) = { .name = "demo_simple_drv", .plat = &yellow_hexagon, }; -U_BOOT_DEVICE(demo4) = { +U_BOOT_DRVINFO(demo4) = { .name = "demo_shape_drv", .plat = &yellow_hexagon, }; diff --git a/drivers/gpio/imx_rgpio2p.c b/drivers/gpio/imx_rgpio2p.c index a5a290a..0e2874c 100644 --- a/drivers/gpio/imx_rgpio2p.c +++ b/drivers/gpio/imx_rgpio2p.c @@ -158,7 +158,7 @@ static int imx_rgpio2p_bind(struct udevice *dev) /* * If plat already exsits, directly return. * Actually only when DT is not supported, plat - * is statically initialized in U_BOOT_DEVICES.Here + * is statically initialized in U_BOOT_DRVINFOS.Here * will return. */ if (plat) @@ -216,7 +216,7 @@ static const struct imx_rgpio2p_plat imx_plat[] = { { 5, (struct gpio_regs *)RGPIO2P_GPIO6_BASE_ADDR }, }; -U_BOOT_DEVICES(imx_rgpio2ps) = { +U_BOOT_DRVINFOS(imx_rgpio2ps) = { { "imx_rgpio2p", &imx_plat[0] }, { "imx_rgpio2p", &imx_plat[1] }, { "imx_rgpio2p", &imx_plat[2] }, diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c index 9fc217a..6280fb5 100644 --- a/drivers/gpio/mxc_gpio.c +++ b/drivers/gpio/mxc_gpio.c @@ -372,7 +372,7 @@ static const struct mxc_gpio_plat mxc_plat[] = { #endif }; -U_BOOT_DEVICES(mxc_gpios) = { +U_BOOT_DRVINFOS(mxc_gpios) = { { "gpio_mxc", &mxc_plat[0] }, { "gpio_mxc", &mxc_plat[1] }, { "gpio_mxc", &mxc_plat[2] }, diff --git a/drivers/remoteproc/sandbox_testproc.c b/drivers/remoteproc/sandbox_testproc.c index ee2ee73..6836eca 100644 --- a/drivers/remoteproc/sandbox_testproc.c +++ b/drivers/remoteproc/sandbox_testproc.c @@ -352,7 +352,7 @@ static struct dm_rproc_uclass_pdata proc_3_test = { .mem_type = RPROC_INTERNAL_MEMORY_MAPPED, }; -U_BOOT_DEVICE(proc_3_demo) = { +U_BOOT_DRVINFO(proc_3_demo) = { .name = "sandbox_test_proc", .plat = &proc_3_test, }; diff --git a/drivers/rtc/emul_rtc.c b/drivers/rtc/emul_rtc.c index 1dc80ca..8f0e1ab 100644 --- a/drivers/rtc/emul_rtc.c +++ b/drivers/rtc/emul_rtc.c @@ -91,6 +91,6 @@ U_BOOT_DRIVER(rtc_emul) = { .priv_auto = sizeof(struct emul_rtc), }; -U_BOOT_DEVICE(rtc_emul) = { +U_BOOT_DRVINFO(rtc_emul) = { .name = "rtc_emul", }; diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c index 19368ba..756738c 100644 --- a/drivers/serial/sandbox.c +++ b/drivers/serial/sandbox.c @@ -241,7 +241,7 @@ static const struct sandbox_serial_plat platdata_non_fdt = { .colour = -1, }; -U_BOOT_DEVICE(serial_sandbox_non_fdt) = { +U_BOOT_DRVINFO(serial_sandbox_non_fdt) = { .name = "sandbox_serial", .plat = &platdata_non_fdt, }; diff --git a/drivers/sysreset/sysreset_sandbox.c b/drivers/sysreset/sysreset_sandbox.c index 8eca7d8..0868582 100644 --- a/drivers/sysreset/sysreset_sandbox.c +++ b/drivers/sysreset/sysreset_sandbox.c @@ -47,7 +47,7 @@ static int sandbox_sysreset_request(struct udevice *dev, enum sysreset_t type) /* * If we have a device tree, the device we created from platform data - * (see the U_BOOT_DEVICE() declaration below) should not do anything. + * (see the U_BOOT_DRVINFO() declaration below) should not do anything. * If we are that device, return an error. */ if (state->fdt_fname && !dev_has_ofnode(dev)) @@ -135,7 +135,7 @@ U_BOOT_DRIVER(warm_sysreset_sandbox) = { #if !CONFIG_IS_ENABLED(OF_PLATDATA) /* This is here in case we don't have a device tree */ -U_BOOT_DEVICE(sysreset_sandbox_non_fdt) = { +U_BOOT_DRVINFO(sysreset_sandbox_non_fdt) = { .name = "sysreset_sandbox", }; #endif diff --git a/drivers/timer/sandbox_timer.c b/drivers/timer/sandbox_timer.c index 135c0f3..2075cd4 100644 --- a/drivers/timer/sandbox_timer.c +++ b/drivers/timer/sandbox_timer.c @@ -65,6 +65,6 @@ U_BOOT_DRIVER(sandbox_timer) = { }; /* This is here in case we don't have a device tree */ -U_BOOT_DEVICE(sandbox_timer_non_fdt) = { +U_BOOT_DRVINFO(sandbox_timer_non_fdt) = { .name = "sandbox_timer", }; diff --git a/drivers/video/sunxi/sunxi_de2.c b/drivers/video/sunxi/sunxi_de2.c index 50657a7..a3e21aa 100644 --- a/drivers/video/sunxi/sunxi_de2.c +++ b/drivers/video/sunxi/sunxi_de2.c @@ -319,7 +319,7 @@ U_BOOT_DRIVER(sunxi_de2) = { .flags = DM_FLAG_PRE_RELOC, }; -U_BOOT_DEVICE(sunxi_de2) = { +U_BOOT_DRVINFO(sunxi_de2) = { .name = "sunxi_de2" }; diff --git a/drivers/video/sunxi/sunxi_dw_hdmi.c b/drivers/video/sunxi/sunxi_dw_hdmi.c index 3e8d715..0b8cefc 100644 --- a/drivers/video/sunxi/sunxi_dw_hdmi.c +++ b/drivers/video/sunxi/sunxi_dw_hdmi.c @@ -398,6 +398,6 @@ U_BOOT_DRIVER(sunxi_dw_hdmi) = { .priv_auto = sizeof(struct sunxi_dw_hdmi_priv), }; -U_BOOT_DEVICE(sunxi_dw_hdmi) = { +U_BOOT_DRVINFO(sunxi_dw_hdmi) = { .name = "sunxi_dw_hdmi" }; diff --git a/drivers/video/sunxi/sunxi_lcd.c b/drivers/video/sunxi/sunxi_lcd.c index dd2bb1f..635edf6 100644 --- a/drivers/video/sunxi/sunxi_lcd.c +++ b/drivers/video/sunxi/sunxi_lcd.c @@ -146,7 +146,7 @@ U_BOOT_DRIVER(sunxi_lcd) = { }; #ifdef CONFIG_MACH_SUN50I -U_BOOT_DEVICE(sunxi_lcd) = { +U_BOOT_DRVINFO(sunxi_lcd) = { .name = "sunxi_lcd" }; #endif -- cgit v1.1