coreboot-kgpe-d16/src/include
Julius Werner eaa9c4596b gpio: Extend common GPIO header, simplify function names
We've had gpiolib.h which defines a few common GPIO access functions for
a while, but it wasn't really complete. This patch adds the missing
gpio_output() function, and also renames the unwieldy
gpio_get_in_value() and gpio_set_out_value() to the much easier to
handle gpio_get() and gpio_set(). The header is renamed to the simpler
gpio.h while we're at it (there was never really anything "lib" about
it, and it was presumably just chosen due to the IPQ806x include/
conflict problem that is now resolved).

It also moves the definition of gpio_t into SoC-specific code, so that
different implementations are free to encode their platform-specific
GPIO parameters in those 4 bytes in the most convenient way (such as the
rk3288 with a bitfield struct). Every SoC intending to use this common
API should supply a <soc/gpio.h> that typedefs gpio_t to a type at most
4 bytes in length. Files accessing the API only need to include <gpio.h>
which may pull in additional things (like a gpio_t creation macro) from
<soc/gpio.h> on its own.

For now the API is still only used on non-x86 SoCs. Whether it makes
sense to expand it to x86 as well should be separately evaluated at a
later point (by someone who understands those systems better). Also,
Exynos retains its old, incompatible GPIO API even though it would be a
prime candidate, because it's currently just not worth the effort.

BUG=None
TEST=Compiled on Daisy, Peach_Pit, Nyan_Blaze, Rush_Ryu, Storm and
Veyron_Pinky.

Change-Id: Ieee77373c2bd13d07ece26fa7f8b08be324842fe
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 9e04902ada56b929e3829f2c3b4aeb618682096e
Original-Change-Id: I6c1e7d1e154d9b02288aabedb397e21e1aadfa15
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/220975
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/9400
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-04-10 11:57:33 +02:00
..
boot chromeos: move VPD MAC address retrieval function 2015-04-10 11:57:24 +02:00
console arm64: Add support for secure monitor 2015-03-28 07:05:09 +01:00
cpu x86 SMM: Replace weak prototypes with weak function stub 2015-03-11 18:15:22 +01:00
device PCIe: Add L1 Sub-State support. 2015-03-23 13:11:15 +01:00
pc80 drivers/pc80/mc146818rtc: Reduce superfluous preprocessor use 2015-02-06 23:56:04 +01:00
smp atomic.h: Fix doxygen errors 2015-01-04 20:03:28 +01:00
superio superio/common/conf_mode.c: Introduce 'new' enter/exit keys for SIO's 2014-11-01 21:27:50 +01:00
tpm_lite vboot2: read secdata and nvdata 2015-03-23 19:51:47 +01:00
antirollback.h vboot2: factory-initialize kernel space in tpm 2015-03-24 15:19:54 +01:00
assert.h misc: Drop print_ implementation from non-romcc boards 2015-01-09 06:12:22 +01:00
bcd.h rtc: Add an RTC API, and implement it for x86. 2014-12-30 19:28:27 +01:00
boardid.h Use a common boardid.h instead of per board copies 2015-03-13 23:01:54 +01:00
bootmem.h
bootmode.h chromeos: Unconditionally clear the EC recovery request 2014-12-30 23:30:52 +01:00
bootstate.h bootstate: use structure pointers for scheduling callbacks 2015-03-18 16:41:43 +01:00
cbfs.h program loading: introduce struct prog 2015-04-03 14:51:51 +02:00
cbfs_core.h cbfs: add cbfs_serialized.h header file 2015-03-31 23:01:39 +02:00
cbfs_serialized.h cbfs: correct types used for accessing files 2015-04-01 22:51:10 +02:00
cbmem.h chromeos: Add WiFi calibration CBMEM entry pointer to coreboot table 2015-04-02 13:32:04 +02:00
delay.h timer: Add generic udelay() implementation 2015-04-08 18:35:01 +02:00
edid.h edid: remove float use 2014-12-16 21:31:35 +01:00
elog.h nyan*: Add an empty elog functions for the !CONFIG_ELOG case 2014-12-30 21:28:50 +01:00
endian.h
fallback.h
gic.h drivers: add GIC support 2015-03-28 07:05:03 +01:00
gpio.h gpio: Extend common GPIO header, simplify function names 2015-04-10 11:57:33 +02:00
halt.h Introduce halt() 2014-11-30 12:20:05 +01:00
inttypes.h
ip_checksum.h
kconfig.h
lib.h New mechanism to define SRAM/memory map with automatic bounds checking 2015-04-06 22:05:01 +02:00
memlayout.h New mechanism to define SRAM/memory map with automatic bounds checking 2015-04-06 22:05:01 +02:00
memory_info.h smbios: add funtion for smbios type17 2015-03-27 09:55:21 +01:00
memrange.h coreboot memrange: Two changes for zero size or empty memrange 2015-03-04 19:55:19 +01:00
option.h
program_loading.h program loading: unify on struct prog 2015-04-03 14:53:11 +02:00
ramstage_cache.h
reg_script.h Add table driven way to add platform specific reg_script routines 2015-04-04 12:40:29 +02:00
reset.h vboot2: implement select_firmware for pre-romstage verification 2015-01-27 01:43:01 +01:00
rmodule-defs.h
rmodule.h rmodule: use struct prog while loading rmodules 2015-04-03 14:53:35 +02:00
romstage_handoff.h Add predefined __ROMSTAGE__ and __RAMSTAGE__ macros 2015-04-06 19:15:37 +02:00
rtc.h drivers/pc80/mc146818rtc: Assume we always have ALTCENTURY 2014-12-30 22:10:41 +01:00
rules.h build system: rename __BOOT_BLOCK__ and __VER_STAGE__ 2015-04-04 20:07:18 +02:00
sdram_mode.h
smbios.h smbios: add a family id in smbios type1 family 2015-04-02 13:26:05 +02:00
spd.h smbios: add funtion for smbios type17 2015-03-27 09:55:21 +01:00
spd_cache.h
spd_ddr2.h
spi-generic.h spi: Eliminate the spi_cs_activate and spi_cs_deactivate functions. 2014-12-09 20:32:18 +01:00
spi_flash.h Move container_of() macro to stddef.h 2015-01-14 21:23:29 +01:00
stddef.h stddef: Add KHz, MHz and GHz constants 2015-04-04 15:01:51 +02:00
stdlib.h stdlib: Add IS_ALIGNED macro 2015-03-20 10:01:22 +01:00
string.h Replace includes of build.h with version.h 2014-11-20 07:28:37 +01:00
swab.h
symbols.h armv7: Add fine-grained page table support 2015-04-08 08:48:06 +02:00
thread.h
timer.h timer: remove rela_time type 2015-03-26 08:53:53 +01:00
timestamp.h timestamp: Add bootblock start and end to timestamp constants 2015-04-08 08:48:04 +02:00
tpm.h
trace.h
types.h include/types.h: Provide BIT() macro 2015-02-06 19:25:57 +01:00
vbe.h
version.h build.h: remove variable for the builduser, -hostname and -domain 2015-03-09 17:53:16 +01:00
watchdog.h