stoneyridge GPIO: Create and use PAD_INT for interrupt pins
commit2db06bba0fdeb2465108da487b0b2d1ecedef985
authorRichard Spiegel <richard.spiegel@amd.corp-partner.google.com>
Fri, 20 Apr 2018 23:50:12 +0000 (20 16:50 -0700)
committerMartin Roth <martinroth@google.com>
Sun, 27 May 2018 01:03:28 +0000 (27 01:03 +0000)
tree49591ccccf5f171fd4e984cd517615ec8886b748
parent2aa13eff9d5df7c19898acecbcdb2fda1ec00d44
stoneyridge GPIO: Create and use PAD_INT for interrupt pins

The default interrupt control for GPIO pins within stoneyridge is for
edge triggered, high. However, sometimes these need to change, or maybe
the interrupt needs to be reported or delivered. This was the case of
platform grunt, where the interrupt related bits were being changed
afterwards. Ideally all the bits should be programmed through the same
procedure. Create several PAD_INT definitions (for general configuration,
for trigger configuration and for interrupt type configuration) and change
function sb_program_gpios() to accept the output from PAD_INT_XX and
program all the necessary bits while keeping compatibility with other
PAD_XX definitions.

BUG=b:72875858
TEST=Add code to report GPIO and interrupt configuration, build grunt and
record a baseline. Add new code, rebuild grunt and record a test output.
Compare baseline against test, there should be no change in GPIO or
interrupt programming.
Remove code that reports GPIO/interrupt configuration.

Change-Id: I3457543bdf64ec757fd82df53c83fdc1d03c1f22
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/25758
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
src/mainboard/google/kahlee/bootblock/bootblock.c
src/mainboard/google/kahlee/mainboard.c
src/mainboard/google/kahlee/variants/baseboard/gpio.c
src/mainboard/google/kahlee/variants/kahlee/gpio.c
src/soc/amd/stoneyridge/Makefile.inc
src/soc/amd/stoneyridge/gpio.c
src/soc/amd/stoneyridge/include/soc/gpio.h
src/soc/amd/stoneyridge/include/soc/southbridge.h
src/soc/amd/stoneyridge/southbridge.c