]> git.baikalelectronics.ru Git - uboot.git/commit
core: add support for U_BOOT_DRIVER_ALIAS
authorWalter Lozano <walter.lozano@collabora.com>
Thu, 25 Jun 2020 04:10:06 +0000 (01:10 -0300)
committerSimon Glass <sjg@chromium.org>
Fri, 10 Jul 2020 00:57:22 +0000 (18:57 -0600)
commit5c5ec20185b86f9257c8a116f5dd9a9157741304
tree8f235b174eb05d46eeb532a5caa90c7e2c00cf74
parenteaec64929595a424f032bd9b9ae640511c732d34
core: add support for U_BOOT_DRIVER_ALIAS

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@collabora.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
14 files changed:
drivers/clk/at91/pmc.c
drivers/gpio/mxs_gpio.c
drivers/gpio/sandbox.c
drivers/i2c/rk_i2c.c
drivers/mmc/mxsmmc.c
drivers/mmc/rockchip_dw_mmc.c
drivers/mtd/spi/sf_probe.c
drivers/pinctrl/nxp/pinctrl-mxs.c
drivers/pinctrl/pinctrl-at91.c
drivers/power/pmic/rk8xx.c
drivers/serial/ns16550.c
drivers/spi/mxs_spi.c
drivers/spi/rk_spi.c
include/dm/device.h