This patch changes the order in which compat strings involving revision
and SKU numbers are matched when looking for a compatible device tree.
The most precise match (board-revX-skuY) is still the highest priority,
but after that we will now first check for revision only (board-revX)
and then for SKU only (board-skuY). The reason for this is that SKU
differentiation is often added later to the project, so device trees for
earlier revisions may not have SKU numbers defined. So if we have a rev0
board (with sku0 as the "default SKU", because the board only started
having different SKUs with rev1) we want it to match the board-rev0
device tree, not board-sku0 which was added as an alias to
board-rev1-sku0 to provide the best known default for potential later
revisions of that SKU.
TEST=Observed "Compat preference:" console output change as expected.
Signed-off-by: Julius Werner <email@example.com>
Reviewed-by: Evan Green <firstname.lastname@example.org>
Reviewed-by: Douglas Anderson <email@example.com>
Reviewed-by: Nicolas Boichat <firstname.lastname@example.org>
Reviewed-by: Hung-Te Lin <email@example.com>
Commit-Queue: Nicolas Boichat <firstname.lastname@example.org>