coreboot-kgpe-d16/src/mainboard
Vadim Bendebury 9c9c336464 Generalize revision number calculation function
Some platforms use tertiary interpretation of GPIO input state to
increase number of distinct values represented by a limited number of
GPIOs. The three states are

- external pull down (interpreted as 0)
- external pull up (1)
- not connected (2)

This has been required by Nvidia devices so far, but Exynos and
Ipq8086 platforms need this too.

This patch moves the function reading the tertiary state into the
library and exposes the necessary GPIO API functions in a new include
file. The functions are still supposed to be provided by platform
specific modules.

The function interpreting the GPIO states has been modified to allow
to interpret the state either as a true tertiary number or as a set
two bit fields.

Since linker garbage collection is not happening when building x86
targets, a new configuration option is being added to include the new
module only when needed.

BUG=chrome-os-partner:30489
TEST=verified that nyan_big still reports proper revision ID.

Change-Id: Ib55122c359629b58288c1022da83e6c63dc2264d
Original-Change-Id: I243c9f43c82bd4a41de2154bbdbd07df0a241046
Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/209673
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
(cherry picked from commit c79ef1c545d073eaad69e6c8c629f9656b8c2f3e)
Signed-off-by: Marc Jones <marc.jones@se-eng.com>
Reviewed-on: http://review.coreboot.org/8717
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-03-23 17:20:04 +01:00
..
a-trend mainboard/*/romstage.c: Fix 'lib/delay.c' inclusion 2015-01-06 01:52:07 +01:00
aaeon mainboard/*/romstage.c: Sanitize system header inclusions 2015-01-06 01:51:42 +01:00
abit mainboard/*/romstage.c: Fix 'lib/delay.c' inclusion 2015-01-06 01:52:07 +01:00
adlink LiPPERT: Add aliases for board_status wiki 2014-05-19 14:57:14 +02:00
advansus mainboards/amd/fam10: Add romstage timestamps 2015-03-21 08:06:44 +01:00
amd mainboards/amd/fam10: Add romstage timestamps 2015-03-21 08:06:44 +01:00
aopen mainboard/*/romstage.c: Sanitize system header inclusions 2015-01-06 01:51:42 +01:00
apple mainboard/cmos: Delete obsolete commented parameters 2015-02-16 09:23:02 +01:00
arima mainboard/cmos: Kill off unused boot_* parameters 2015-02-16 09:24:14 +01:00
artecgroup mainboard/cmos: Kill off unused boot_* parameters 2015-02-16 09:24:14 +01:00
asrock AGESA: Use same HeapManager for all BiosCallOuts 2015-03-07 21:22:44 +01:00
asus mainboards/amd/fam10: Add romstage timestamps 2015-03-21 08:06:44 +01:00
avalue mainboards/amd/fam10: Add romstage timestamps 2015-03-21 08:06:44 +01:00
azza mainboard/*/romstage.c: Fix 'lib/delay.c' inclusion 2015-01-06 01:52:07 +01:00
bachmann mainboard/cmos: Delete obsolete commented parameters 2015-02-16 09:23:02 +01:00
bcom mainboard/cmos: Kill off unused boot_* parameters 2015-02-16 09:24:14 +01:00
bifferos vboot2: add verstage 2015-01-27 01:41:40 +01:00
biostar mainboard/*/romstage.c: Fix 'lib/delay.c' inclusion 2015-01-06 01:52:07 +01:00
broadcom mainboard/cmos: Kill off unused boot_* parameters 2015-02-16 09:24:14 +01:00
compaq mainboard/*/romstage.c: Fix 'lib/delay.c' inclusion 2015-01-06 01:52:07 +01:00
cubietech romstages: use common run_ramstage() 2015-03-20 19:28:25 +01:00
digitallogic mainboard/cmos: Kill off unused boot_* parameters 2015-02-16 09:24:14 +01:00
dmp misc: Drop print_ implementation from non-romcc boards 2015-01-09 06:12:22 +01:00
ecs mainboard/*/romstage.c: Sanitize system header inclusions 2015-01-06 01:51:42 +01:00
emulation imgvp-danube: Support for the ImgTec Danube Virtual Platform 2015-03-23 15:34:32 +01:00
getac acpi: Generate valid ACPI processor objects 2015-02-16 21:02:30 +01:00
gigabyte mainboards/amd/fam10: Add romstage timestamps 2015-03-21 08:06:44 +01:00
gizmosphere AGESA: Use same HeapManager for all BiosCallOuts 2015-03-07 21:22:44 +01:00
google Generalize revision number calculation function 2015-03-23 17:20:04 +01:00
hp mainboards/amd/fam10: Add romstage timestamps 2015-03-21 08:06:44 +01:00
ibase acpi: Generate valid ACPI processor objects 2015-02-16 21:02:30 +01:00
ibm mainboard/cmos: Kill off unused boot_* parameters 2015-02-16 09:24:14 +01:00
iei mainboards/amd/fam10: Add romstage timestamps 2015-03-21 08:06:44 +01:00
intel intel/fsp_baytrail: Add PCI Root Port IRQ Routing 2015-03-12 20:35:49 +01:00
iwave x86 cache-as-ram: Remove BROKEN_CAR_MIGRATE option 2015-03-10 23:39:41 +01:00
iwill mainboard/cmos: Kill off unused boot_* parameters 2015-02-16 09:24:14 +01:00
jetway mainboards/amd/fam10: Add romstage timestamps 2015-03-21 08:06:44 +01:00
kontron acpi: Generate valid ACPI processor objects 2015-02-16 21:02:30 +01:00
lanner mainboard/cmos: Kill off unused boot_* parameters 2015-02-16 09:24:14 +01:00
lenovo lenovo: fix smi gpe + wakeup pin for t420s t520 t530 x220 x230 2015-03-10 23:53:17 +01:00
linutop artecgroup/Kconfig, linutop/Kconfig: Add comment to endif 2014-07-30 02:08:50 +02:00
lippert AGESA: Use same HeapManager for all BiosCallOuts 2015-03-07 21:22:44 +01:00
mitac mainboard/*/romstage.c: Fix 'lib/delay.c' inclusion 2015-01-06 01:52:07 +01:00
msi mainboards/amd/fam10: Add romstage timestamps 2015-03-21 08:06:44 +01:00
nec mainboard/*/romstage.c: Sanitize system header inclusions 2015-01-06 01:51:42 +01:00
newisys mainboard/cmos: Kill off unused boot_* parameters 2015-02-16 09:24:14 +01:00
nokia mainboard/*/romstage.c: Fix 'lib/delay.c' inclusion 2015-01-06 01:52:07 +01:00
nvidia mainboard/cmos: Kill off unused boot_* parameters 2015-02-16 09:24:14 +01:00
packardbell mainboard/cmos: Delete obsolete commented parameters 2015-02-16 09:23:02 +01:00
pcengines AGESA: Use same HeapManager for all BiosCallOuts 2015-03-07 21:22:44 +01:00
rca mainboard/*/romstage.c: Sanitize system header inclusions 2015-01-06 01:51:42 +01:00
roda acpi: Generate valid ACPI processor objects 2015-02-16 21:02:30 +01:00
samsung mainboard/cmos: Delete obsolete commented parameters 2015-02-16 09:23:02 +01:00
siemens siemens/mc_tcu3: Fix build and ACPI IRQ bridge entry 2015-03-13 19:21:25 +01:00
soyo mainboard/*/romstage.c: Fix 'lib/delay.c' inclusion 2015-01-06 01:52:07 +01:00
sunw mainboard/cmos: Kill off unused boot_* parameters 2015-02-16 09:24:14 +01:00
supermicro mainboards/amd/fam10: Add romstage timestamps 2015-03-21 08:06:44 +01:00
technexion acpi: Generate valid ACPI processor objects 2015-02-16 21:02:30 +01:00
thomson x86: Change MMIO addr in readN(addr)/writeN(addr, val) to pointer 2015-02-15 08:50:22 +01:00
ti romstages: use common run_ramstage() 2015-03-20 19:28:25 +01:00
traverse mainboard/cmos: Kill off unused boot_* parameters 2015-02-16 09:24:14 +01:00
tyan mainboards/amd/fam10: Add romstage timestamps 2015-03-21 08:06:44 +01:00
via acpi: Generate valid ACPI processor objects 2015-02-16 21:02:30 +01:00
winent mainboard/cmos: Kill off unused boot_* parameters 2015-02-16 09:24:14 +01:00
wyse mainboard/cmos: Kill off unused boot_* parameters 2015-02-16 09:24:14 +01:00
Kconfig Drop SC520 and related boards 2014-12-16 21:18:43 +01:00