autoport: Factor out GPIO config generation
commitc7cb5e434bd7adfdf4f1c575e8cd961285b631a4
authorNicholas Chin <nic.c3.14@gmail.com>
Sun, 30 Jun 2024 19:09:28 +0000 (30 13:09 -0600)
committerFelix Singer <service+coreboot-gerrit@felixsinger.de>
Fri, 5 Jul 2024 17:55:06 +0000 (5 17:55 +0000)
treeac0fc90eda2c6eb6c174e96ab0a2586eec47fc14
parent7a0deb4d1b6f9eb90f8f2799d98a986327a54885
autoport: Factor out GPIO config generation

Intel chipsets from ICH7 through Lynxpoint use the same GPIO register
format and thus mainboards using using these platforms have similar
gpio.c files. Factor out the code to generate gpio.c from bd82x6x.go so
that it other chipsets added to autoport can use it.

This was originally written by Iru Cai in his Haswell autoport patch in
CB:30890; I have simply split out the code to a separate commit as it is
a separate logical change.

TEST=Generated output is identical before and after this patch when run
against logs from a Dell Latitude E6430

Change-Id: If1f506f6ad10144bd6acc42505592426bb7193b7
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83286
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
util/autoport/bd82x6x.go
util/autoport/gpio_common.go [new file with mode: 0644]