[PATCH 08/49] dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO()

Simon Glass sjg at chromium.org
Wed Jan 6 16:13:07 CET 2021


On 12/29/20 12:34 AM, Simon Glass wrote:
> 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 at chromium.org>

I couldn't agree more.

Reviewed-by: Walter Lozano <walter.lozano at collabora.com>

Thanks,

> ---
>
>   .../mach-at91/arm926ejs/at91sam9260_devices.c |  2 +-
>   .../arm926ejs/at91sam9m10g45_devices.c        |  2 +-
>   arch/arm/mach-imx/mx6/soc.c                   |  2 +-
>   arch/arm/mach-imx/mx7/soc.c                   |  2 +-
>   arch/arm/mach-lpc32xx/devices.c               |  4 +-
>   arch/arm/mach-omap2/am33xx/board.c            | 10 +--
>   arch/arm/mach-omap2/omap3/board.c             |  2 +-
>   arch/arm/mach-tegra/board.c                   |  2 +-
>   arch/arm/mach-tegra/board2.c                  |  2 +-
>   board/armltd/integrator/integrator.c          |  2 +-
>   board/armltd/total_compute/total_compute.c    |  2 +-
>   board/armltd/vexpress64/vexpress64.c          |  2 +-
>   board/bluewater/gurnard/gurnard.c             |  2 +-
>   board/bluewater/snapper9260/snapper9260.c     |  2 +-
>   board/cadence/xtfpga/xtfpga.c                 |  4 +-
>   board/cavium/thunderx/thunderx.c              |  4 +-
>   board/compulab/cm_fx6/cm_fx6.c                |  2 +-
>   board/davinci/da8xxevm/omapl138_lcdk.c        |  4 +-
>   board/freescale/ls1012afrdm/eth.c             |  4 +-
>   board/freescale/ls1012aqds/eth.c              |  4 +-
>   board/freescale/ls1012ardb/eth.c              |  4 +-
>   board/freescale/lx2160a/lx2160a.c             |  4 +-
>   board/gateworks/gw_ventana/gw_ventana.c       |  2 +-
>   board/hisilicon/hikey/hikey.c                 |  4 +-
>   board/hisilicon/hikey960/hikey960.c           |  2 +-
>   board/hisilicon/poplar/poplar.c               |  2 +-
>   board/isee/igep00x0/igep00x0.c                |  2 +-
>   board/lg/sniper/sniper.c                      |  2 +-
>   board/nokia/rx51/rx51.c                       |  2 +-
>   board/sandbox/sandbox.c                       |  2 +-
>   board/siemens/corvus/board.c                  |  2 +-
>   board/st/stv0991/stv0991.c                    |  2 +-
>   board/sysam/amcore/amcore.c                   |  2 +-
>   board/ti/am335x/board.c                       |  6 +-
>   board/timll/devkit8000/devkit8000.c           |  2 +-
>   board/toradex/apalis_imx6/apalis_imx6.c       |  2 +-
>   .../toradex/colibri-imx6ull/colibri-imx6ull.c |  2 +-
>   board/toradex/colibri_imx6/colibri_imx6.c     |  2 +-
>   board/toradex/colibri_pxa270/colibri_pxa270.c |  4 +-
>   doc/driver-model/design.rst                   | 18 ++---
>   doc/driver-model/of-plat.rst                  | 12 ++--
>   doc/driver-model/remoteproc-framework.rst     |  2 +-
>   doc/driver-model/spi-howto.rst                |  4 +-
>   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 +-
>   dts/Kconfig                                   |  8 +--
>   include/dm/device.h                           |  4 +-
>   include/dm/lists.h                            |  2 +-
>   include/dm/platdata.h                         | 16 ++---
>   include/dm/platform_data/spi_pl022.h          |  2 +-
>   test/dm/core.c                                |  6 +-
>   tools/dtoc/dtb_platdata.py                    |  8 +--
>   tools/dtoc/test_dtoc.py                       | 66 +++++++++----------
>   64 files changed, 148 insertions(+), 148 deletions(-)
>
Applied to u-boot-dm/next, thanks!


More information about the U-Boot mailing list