[PATCH v4 03/14] core: add support for U_BOOT_DRIVER_ALIAS

Simon Glass sjg at chromium.org
Fri Jun 26 03:43:01 CEST 2020


On Wed, 24 Jun 2020 at 22:10, Walter Lozano <walter.lozano at collabora.com> wrote:
>
> Currently when using OF_PLATDATA the binding between devices and drivers
> is done trying to match the compatible string in the node with a driver
> name. However, usually a single driver supports multiple compatible strings
> which causes that only devices which its compatible string matches a
> driver name get bound.
>
> To overcome this issue, this patch adds the U_BOOT_DRIVER_ALIAS macro,
> which generates no code at all, but allows an easy way to declare driver
> name aliases. Thanks to this, dtoc could be improve to look for the driver
> name based on its alias when it populates the U_BOOT_DEVICE entry.
>
> Signed-off-by: Walter Lozano <walter.lozano at collabora.com>
> ---
>
>  drivers/clk/at91/pmc.c            | 2 ++
>  drivers/gpio/mxs_gpio.c           | 2 ++
>  drivers/gpio/sandbox.c            | 2 ++
>  drivers/i2c/rk_i2c.c              | 2 ++
>  drivers/mmc/mxsmmc.c              | 1 +
>  drivers/mmc/rockchip_dw_mmc.c     | 3 +++
>  drivers/mtd/spi/sf_probe.c        | 2 ++
>  drivers/pinctrl/nxp/pinctrl-mxs.c | 2 ++
>  drivers/pinctrl/pinctrl-at91.c    | 2 ++
>  drivers/power/pmic/rk8xx.c        | 2 ++
>  drivers/serial/ns16550.c          | 4 ++++
>  drivers/spi/mxs_spi.c             | 2 ++
>  drivers/spi/rk_spi.c              | 2 ++
>  include/dm/device.h               | 7 +++++++
>  14 files changed, 35 insertions(+)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list