summaryrefslogtreecommitdiff
path: root/src/include/console
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2016-03-16 17:11:55 -0700
committerJulius Werner <jwerner@chromium.org>2016-03-22 21:18:30 +0100
commit2b239485358ec063a4803f248c88378076810e24 (patch)
treeddb88cf8b776ccd3a9d91bef93529ed18f465bfb /src/include/console
parent4a1c69aa34cec4a959bc3318d68c287ed4eafbb0 (diff)
gpio: Add support for binary_first base3 number system
This patch adds support for an alternative ternary number system in which group of GPIOs can be interpreted. In this system, the digit combinations that would form a binary number (i.e. that contain no 'Z' state) are used to represent the lower values in the way they're used in the normal binary system, and all the combinations that do contain a 'Z' are used to represent values above those. We can use this for boards that originally get strapped with binary board IDs but eventually require more revisions than that representation allows. We can switch their code to binary_first base3 and all old revisions with already produced boards will still get read as the correct numbers. Credit for the algorithm idea goes to Haran Talmon. BRANCH=None BUG=None TEST=Stubbed out the actual GPIO reading and simulated all combinations of 4 ternary digits for both number systems. Change-Id: Ib5127656455f97f890ce2999ba5ac5f58a20cf93 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/14116 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks <dhendrix@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/include/console')
0 files changed, 0 insertions, 0 deletions