aboutsummaryrefslogtreecommitdiff
path: root/core/i2c.c
AgeCommit message (Collapse)AuthorFilesLines
2017-10-02i2c: Move tpm i2c wrapper code into coreAndrew Donnellan1-0/+107
The TPM code has a wrapper around the main i2c API to allow synchronous use. Move it into core/i2c.c so it can be used by other possible users. In particular, a future patch will use this to drive OpenCAPI device resets during boot time. Cc: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Cc: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-02i2c: Add nuvoton quirk, disallowing i2cdetect as it locks TPMStewart Smith1-0/+5
In TPM 2.0 Firmware 1.3.0.1 and 1.3.1.0 (at least) there exists a bug where if you send the wrong thing to the TPM it may lock the bus, with no way of recovery except powering the TPM off/on. On our current systems, the only way to power the TPM off/on is to pull the power on the system (*NOT* just power off/on to host from BMC). So, this patch adds the ability to do things to the i2c request really early on, well before it hits any hardware, such as quickly drop it. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-17Use additional checks in skiboot for pointersBalbir Singh1-0/+3
The checks validate pointers sent in using opal_addr_valid() in opal_call API's provided via the console, cpu, fdt, flash, i2c, interrupts, nvram, opal-msg, opal, opal-pci, xscom and cec modules Signed-off-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-24i2c: Add FWTS annotations for I2c ErrorsStewart Smith1-0/+13
Two possible error states: kernel asks us for something incorrect, OPAL runs out of memory... both of which require investigation. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-04-01Remove redundant includes of opal-api.hMichael Ellerman1-1/+0
Now that opal.h includes opal-api.h, there are a bunch of files that include both but don't need to. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-06Move skiboot internal things from opal.h to opal-api.hStewart Smith1-0/+1
This is probably not the best collection of things in the world, but it means that opal.h is much closer to being directly usable by an OS. This triggers a bunch of #include fixes throughout the tree. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-11-12i2c: Use new timer facility and improve interrupts handlingBenjamin Herrenschmidt1-1/+1
We only poll the masters for the chip that got the interrupt and we improve the running of the timers as well. We user the new TIMER_POLL facility to replace the use of the OPAL poller, which simplifies the code further. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-11i2c: Move bus management and OPAL API to core i2c codeBenjamin Herrenschmidt1-0/+116
And start adding interfaces to lookup i2c busses. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>