Hello Patrick Rudolph,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/32859
to review the following change.
Change subject: fit: Add "board-skuX" (without -rev) to allowed compatible strings ......................................................................
fit: Add "board-skuX" (without -rev) to allowed compatible strings
In some cases we may have boards that need to differentiate SKUs but don't really want to differentiate revisions (at least for some SKUs). Let's add a compatible string match that includes only the SKU but not the revision so that kernel DTSes don't have to specify every possible revision if they want to match this.
This patch was adapted from depthcharge's http://crosreview.com/1512004
Change-Id: Ib88862424b350a213761f5662fe170a1f8fccc7f Signed-off-by: Julius Werner jwerner@chromium.org --- M src/lib/fit.c 1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/32859/1
diff --git a/src/lib/fit.c b/src/lib/fit.c index a8bca47..3aad806 100644 --- a/src/lib/fit.c +++ b/src/lib/fit.c @@ -63,6 +63,14 @@ fit_add_compat_string(compat_string); }
+ if (sku_id() != UNDEFINED_STRAPPING_ID) { + snprintf(compat_string, sizeof(compat_string), "%s,%s-sku%u", + CONFIG_MAINBOARD_VENDOR, CONFIG_MAINBOARD_PART_NUMBER, + sku_id()); + + fit_add_compat_string(compat_string); + } + if (board_id() != UNDEFINED_STRAPPING_ID) { snprintf(compat_string, sizeof(compat_string), "%s,%s-rev%u", CONFIG_MAINBOARD_VENDOR, CONFIG_MAINBOARD_PART_NUMBER,