summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorWalter Lozano <walter.lozano@collabora.com>2020-06-25 01:10:06 -0300
committerSimon Glass <sjg@chromium.org>2020-07-09 18:57:22 -0600
commitaddf358bac1d2bd087b77be7d4d95a2a2e5dfcaf (patch)
tree8f235b174eb05d46eeb532a5caa90c7e2c00cf74 /drivers/clk
parentace16e88d97d64a1c999a690f46123cf73fafa7c (diff)
downloadu-boot-addf358bac1d2bd087b77be7d4d95a2a2e5dfcaf.tar.gz
u-boot-addf358bac1d2bd087b77be7d4d95a2a2e5dfcaf.tar.bz2
u-boot-addf358bac1d2bd087b77be7d4d95a2a2e5dfcaf.zip
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>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/at91/pmc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c
index f6b9367f2e..54ae0d281d 100644
--- a/drivers/clk/at91/pmc.c
+++ b/drivers/clk/at91/pmc.c
@@ -31,6 +31,8 @@ U_BOOT_DRIVER(atmel_at91rm9200_pmc) = {
.of_match = at91_pmc_match,
};
+U_BOOT_DRIVER_ALIAS(atmel_at91rm9200_pmc, atmel_at91sam9260_pmc)
+
/*---------------------------------------------------------*/
int at91_pmc_core_probe(struct udevice *dev)