lib: Move SKU information to a new module (lib/misc/sku).
To support devices sharing same image and firmware, we will need to
probe system information by adding another layer - lookup in the "SKU" table.
To standardize and simplify the way of defining SKU table, a new module
"lib/misc/sku.c" is added and provides functions like:
sku_get_number
sku_get_brand
sku_get_chassis
sku_get_customization
sku_get_model
sku_get_data
These are fallback implementations for platform commands if
`sys->cb->sku_number` is implemented and the platform_intf->sku_table is
filled with an array of struct sku_table.
BRANCH=none
BUG=chromium:731016
TEST=emerge-eve mosys; mosys platform name
Change-Id: Ibb20003a128163012f01c773f7210252c86d91bf
Reviewed-on: https://chromium-review.googlesource.com/577473
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
7 files changed