9
0
Fork 0
barebox/drivers/of
Andrey Smirnov 3494084017 of: base: Use scoring in DT device matching
Port Linux kernel algorithm for both of_device_is_compatible() and
of_match_node(). With this change former now returns a score on the
scale of 0 to INT_MAX/2, and the latter goes through all compatiblity
entries and selects the entry that has the best matching score.

This is needed for SoCs where IP blocks are backwards compatible and
corresponding OF nodes can proclaim compatibility with several entries
found in driver's compatiblity table. One such example would be PIO
pinctrl block on AT91SAM9x5 SoCs which declare compatibility with with
both "atmel,at91sam9x5-pinctrl" and "atmel,at91rm9200-pinctrl".

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 11:51:27 +01:00
..
Kconfig environment: Support env from file in a file-system via device tree 2016-01-08 08:30:55 +01:00
Makefile Merge branch 'for-next/pci' 2016-05-09 08:49:50 +02:00
address.c of: import pci range parser from linux 2014-10-08 08:39:01 +02:00
barebox.c string: Fix (v)asprintf prototypes 2016-04-15 12:21:45 +02:00
base.c of: base: Use scoring in DT device matching 2017-03-09 11:51:27 +01:00
device.c of: Add missing include 2016-05-24 12:51:53 +02:00
fdt.c of: fix typos 2016-10-18 07:39:51 +02:00
mem_generic.c of: separate out "generic" memory bank adding 2013-05-13 21:17:10 +02:00
of_gpio.c OF: gpio: Silence error message on -EPROBE_DEFER 2015-04-17 07:23:47 +02:00
of_mtd.c of: mtd: Import of_get_nand_ecc_{step_size, strength} from Linux 2015-11-23 08:00:09 +01:00
of_net.c net: phy: Add minimal support for QSGMII PHY 2014-07-31 07:37:12 +02:00
of_path.c of_path: only handle no driver for device if it is on a bus 2017-01-13 08:35:12 +01:00
of_pci.c of: pci: import of_pci_get_devfn() 2014-07-31 07:29:22 +02:00
partition.c of: partitions: force "partitions" subnode 2017-01-19 15:21:29 +01:00
platform.c of: Use %pa to print resource_size_t type 2017-01-10 08:27:33 +01:00