summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-29 06:34:54 +0300
committerSimon Glass <sjg@chromium.org>2021-01-05 22:26:35 +0300
commit20e442ab2df355450006574fff178c746d254a18 (patch)
tree7e4eae44adf14d155a5cb028a909cdcf8174eab3 /drivers
parentbe3bd3bb177ec913050745131687089c1ff69c44 (diff)
downloadu-boot-20e442ab2df355450006574fff178c746d254a18.tar.xz
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 <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/fsl/fsl_rsa.c2
-rw-r--r--drivers/crypto/rsa_mod_exp/mod_exp_sw.c2
-rw-r--r--drivers/demo/demo-pdata.c10
-rw-r--r--drivers/gpio/imx_rgpio2p.c4
-rw-r--r--drivers/gpio/mxc_gpio.c2
-rw-r--r--drivers/remoteproc/sandbox_testproc.c2
-rw-r--r--drivers/rtc/emul_rtc.c2
-rw-r--r--drivers/serial/sandbox.c2
-rw-r--r--drivers/sysreset/sysreset_sandbox.c4
-rw-r--r--drivers/timer/sandbox_timer.c2
-rw-r--r--drivers/video/sunxi/sunxi_de2.c2
-rw-r--r--drivers/video/sunxi/sunxi_dw_hdmi.c2
-rw-r--r--drivers/video/sunxi/sunxi_lcd.c2
13 files changed, 19 insertions, 19 deletions
diff --git a/drivers/crypto/fsl/fsl_rsa.c b/drivers/crypto/fsl/fsl_rsa.c
index ed2a54f6ec..897ee855ea 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 4ce85b3224..7bed444c3f 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 b504c31373..818f77503a 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 a5a290a00c..0e2874ca95 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 9fc217ae6a..6280fb5984 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 ee2ee73071..6836eca4c5 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 1dc80ca127..8f0e1ab5ac 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 19368ba256..756738c2d2 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 8eca7d8bfd..08685823e9 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 135c0f38a4..2075cd4edd 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 50657a77d3..a3e21aa5f1 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 3e8d71538f..0b8cefc311 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 dd2bb1f5fc..635edf6dd3 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