coreboot/src/include
Gabe Black cdb61a6f5d i2c: Replace the i2c API.
The new API is in use in depthcharge and is based around the "i2c_transfer"
function instead of i2c_read and i2c_write. The new function takes an array of
i2c_seg structures which represent each portion of the transfer after a start
bit and before the stop bit. If there's more than one segment, they're
seperated by repeated starts.

Some wrapper functions have also been added which make certain common
operations easy. These include reading or writing a byte from a register or
reading or writing a blob of raw data. The i2c device drivers generally use
these wrappers but can call the i2c_transfer function directly if the need
something different.

The tegra i2c driver was very similar to the one in depthcharge and was simple
to convert. The Exynos 5250 and 5420 drivers were ported from depthcharge and
replace the ones in coreboot. The Exynos 5420 driver was ported from the high
speed portion of the one in coreboot and was straightforward to port back. The
low speed portion and the Exynos 5250 drivers had been transplanted from U-Boot
and were replaced with the depthcharge implementation.

BUG=None
TEST=Built and booted on nyan with and without EFS. Built and booted on, pit
and daisy.
BRANCH=None

Original-Change-Id: I1e98c3fa2560be25444ab3d0394bb214b9d56e93
Original-Signed-off-by: Gabe Black <gabeblack@google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/193561
Original-Reviewed-by: David Hendricks <dhendrix@chromium.org>
Original-Reviewed-by: Jimmy Zhang <jimmzhang@nvidia.com>
Original-Tested-by: Jimmy Zhang <jimmzhang@nvidia.com>
Original-Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Original-Commit-Queue: Gabe Black <gabeblack@chromium.org>
Original-Tested-by: Gabe Black <gabeblack@chromium.org>
(cherry picked from commit 00c423fb2c)

This cherry-pick required additional changes to the following:
src/cpu/allwinner/a10/twi.c
src/drivers/xpowers/axp209/axp209.c

Signed-off-by: Marc Jones <marc.jones@se-eng.com>

Change-Id: I691959c66308eeeec219b1bec463b8b365a246d7
Reviewed-on: http://review.coreboot.org/7751
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2014-12-16 00:02:43 +01:00
..
boot Export board-status info. 2014-11-26 23:18:47 +01:00
console uarts: 32/64 cleanup 2014-10-16 17:41:14 +02:00
cpu Replace hlt() loops with halt() 2014-11-30 12:20:07 +01:00
device i2c: Replace the i2c API. 2014-12-16 00:02:43 +01:00
pc80 cmos: Rename the CMOS related functions. 2014-10-22 03:55:14 +02:00
smp
superio superio/common/conf_mode.c: Introduce 'new' enter/exit keys for SIO's 2014-11-01 21:27:50 +01:00
assert.h gen: Add "assert" in assert.h. 2014-10-07 23:38:08 +02:00
bootmem.h
bootmode.h
bootstate.h bootstate: don't use header in romstage code 2014-08-16 08:35:03 +02:00
cbfs.h
cbfs_core.h ARM: Generalize armv7 as arm. 2014-09-08 18:59:23 +02:00
cbmem.h Move nehalem/sandy/ivy to per-device acpi 2014-09-11 21:53:33 +02:00
delay.h
edid.h intel/gma: Clarify code and use dedicated init for Google Peppy 2014-08-25 22:36:03 +02:00
elog.h elog: Add event type for CPU thermal trip 2014-10-02 17:30:18 +02:00
endian.h
fallback.h
halt.h Introduce halt() 2014-11-30 12:20:05 +01:00
inttypes.h
ip_checksum.h
kconfig.h
lib.h
memrange.h
option.h
payload_loader.h
ramstage_cache.h
ramstage_loader.h
reg_script.h reg_script: Fix bug in IO macros 2014-10-01 17:26:26 +02:00
reset.h
rmodule-defs.h
rmodule.h
romstage_handoff.h
rules.h
sdram_mode.h
smbios.h intel/gma: consolidate vbt code 2014-09-13 14:27:03 +02:00
spd.h
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
stddef.h Add check_member macro to allow clean and easy struct offset checking 2014-09-22 18:42:20 +02:00
stdlib.h tegra124: A couple clock fixes. 2014-12-15 19:57:49 +01:00
string.h Replace includes of build.h with version.h 2014-11-20 07:28:37 +01:00
swab.h
thread.h Possible thread stack implementation. 2014-08-07 23:55:15 +02:00
timer.h timer: Add functions to initialize absolute timer structures. 2014-07-31 18:32:52 +02:00
timestamp.h
tpm.h tpm: Clean up I2C TPM driver 2014-09-10 19:37:49 +02:00
trace.h
types.h
vbe.h intel/gma: Clarify code and use dedicated init for Google Peppy 2014-08-25 22:36:03 +02:00
version.h Export board-status info. 2014-11-26 23:18:47 +01:00
watchdog.h