coreboot-kgpe-d16/src/ec
Edward O'Callaghan 9ed10bff31 ec/google/chromeec: Introduce SKU_ID helpers
The following introduces helpers that, by default,
accommodate a larger SKU id space. The following
is the rational for that:

 Allow INT32_MAX SKU id encodings beyond UINT8_MAX.
 This allows for the SKU id to accommodate up to 4 bytes
 however we reserve the highest bit for SKU_UNKNOWN to be encoded.

However, the legacy UINT8_MAX encoding is supported by leveraging
the Kconfig by overriding it with the legacy max of 0xff.

Follow ups migrate boards to this common framework.

V.2: Fixup array size && drop sku_id SKU_UNKNOWN check and pass
     whatever is set to userspace as firmware doesn't care about
     the value.
V.3: Use SPDX-License header.

BUG=b:149348474
BRANCH=none
TEST=tested on hatch.

Change-Id: I805b25465a3b4ee3dc0cbda5feb9e9ea2493ff9e
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39018
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-02-28 00:02:35 +00:00
..
acpi src: Conditionally include TEVT 2019-12-17 13:10:27 +00:00
compal/ene932 ec/{compal,google,quanta}: Drop wrong _ADR objects 2019-10-25 10:06:45 +00:00
google ec/google/chromeec: Introduce SKU_ID helpers 2020-02-28 00:02:35 +00:00
hp/kbc1126 ec/hp/kbc1126: Make firmware offsets user configurable 2019-12-31 15:19:41 +00:00
kontron drivers/pc80/rtc: Separate {get|set}_option() prototypes 2020-01-09 14:37:33 +00:00
lenovo ec/lenovo/h8/acpi: Add alternative Fn-F2 and Fn-F3 layout 2020-02-17 16:06:53 +00:00
purism/librem ec/purism/librem: fix topstar driver ERAM mapping 2020-02-26 17:08:08 +00:00
quanta ELOG: Avoid some preprocessor use 2019-11-09 10:50:12 +00:00
roda/it8518 devicetree: Remove duplicate chip_ops declarations 2019-08-20 01:31:44 +00:00
smsc/mec1308 src/ec: Drop __PRE_RAM__ and __SMM__ guards 2019-08-20 13:52:14 +00:00
ec.h