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 SMP: Add arch-agnostic boot_cpu() 2014-02-11 21:55:30 +01:00
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 coreboot: introduce notion of bootmem for memory map at boot 2014-03-03 21:47:27 +01:00
bootmode.h Declare get_write_protect_state() without ChromeOS 2014-05-08 16:25:30 +02:00
bootstate.h bootstate: don't use header in romstage code 2014-08-16 08:35:03 +02:00
cbfs.h coreboot: unify infrastructure for loading payloads 2014-03-03 19:48:02 +01:00
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 Get rid of HAVE_INIT_TIMER config option 2014-04-26 13:25:28 +02:00
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 Extend CBFS to support arbitrary ROM source media. 2013-01-30 17:58:32 +01:00
fallback.h Make set_boot_successful depend on PC80_SYSTEM 2012-11-30 21:33:35 +01:00
halt.h Introduce halt() 2014-11-30 12:20:05 +01:00
inttypes.h x86: provide more C standard environment 2013-03-20 04:20:25 +01:00
ip_checksum.h Drop prototype guarding for romcc 2013-05-10 00:06:46 +02:00
kconfig.h Add config_enabled() from Linux 2012-05-08 00:36:09 +02:00
lib.h lib/hexdump: Use size_t for length parameter of hexdump32() 2014-05-05 08:59:05 +02:00
memrange.h mtrr: only add prefetchable resources as WRCOMB for VGA devices 2014-02-09 22:08:53 +01:00
option.h option: Add arch-agnostic get_option() 2014-03-04 15:23:10 +01:00
payload_loader.h x86: add MIRROR_PAYLOAD_TO_RAM_BEFORE_LOADING option 2014-03-07 15:30:27 +01:00
ramstage_cache.h ramstage_cache: allow ramstage usage add valid helper 2014-05-10 06:31:45 +02:00
ramstage_loader.h coreboot: infrastructure for different ramstage loaders 2014-02-15 18:39:29 +01:00
reg_script.h reg_script: Fix bug in IO macros 2014-10-01 17:26:26 +02:00
reset.h Drop prototype guarding for romcc 2013-05-10 00:06:46 +02:00
rmodule-defs.h rmodules: use rmodtool to create rmodules 2014-03-20 23:55:55 +01:00
rmodule.h rmodules: use rmodtool to create rmodules 2014-03-20 23:55:55 +01:00
romstage_handoff.h coreboot: infrastructure for different ramstage loaders 2014-02-15 18:39:29 +01:00
rules.h build rules: Identify build stage with simple variables 2014-04-18 16:40:32 +02:00
sdram_mode.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
smbios.h intel/gma: consolidate vbt code 2014-09-13 14:27:03 +02:00
spd.h spd.h: Add all known SPD_MEMORY_TYPE definitions. 2013-06-03 22:35:21 +02:00
spd_cache.h gizmosphere/gizmo: Move support of SPD data in CBFS 2014-07-05 11:41:52 +02:00
spd_ddr2.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
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 SPI: Split writes using spi_crop_chunk() 2014-07-14 19:42:49 +02:00
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 include: Fix spelling 2013-07-11 22:36:19 +02:00
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 Intel FSP: add a shared set of functions for the FSP 2014-05-09 21:35:56 +02:00
tpm.h tpm: Clean up I2C TPM driver 2014-09-10 19:37:49 +02:00
trace.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
types.h pc80/keyboard: Ignore interface test failure. 2014-01-26 17:39:42 +01:00
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 watchdog.h: Fix compile time error on disabling watchdog handling 2013-03-12 12:06:43 +01:00