[Skiboot] [PATCH] p8-i2c: occ: Add support for OCC to use I2C engines
Stewart Smith
stewart at linux.vnet.ibm.com
Tue Jun 6 21:31:05 AEST 2017
Stewart Smith <stewart at linux.vnet.ibm.com> writes:
> From: Shilpasri G Bhat <shilpa.bhat at linux.vnet.ibm.com>
>
> This patch adds support to share the I2C engines with host and OCC.
> OCC uses I2C engines to read DIMM temperatures and to communicate with
> GPU. OCC Flag register is used for locking between host and OCC. Host
> requests for the bus by setting a bit in OCC Flag register. OCC sends
> an interrupt to indicate the change in ownership.
>
> Originally-from: Oliver O'Halloran <oohall at gmail.com>
> Signed-off-by: Shilpasri G Bhat <shilpa.bhat at linux.vnet.ibm.com>
> [stewart at linux.vnet.ibm.com: Pretty heavily rework logic, including
> fixing bus owner change and separating out occ lock from sensor cache]
> Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
> ---
> hw/occ.c | 4 ++
> hw/p8-i2c.c | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> include/i2c.h | 3 ++
> 3 files changed, 154 insertions(+)
Merged to master as of c5fa0d718e9cda8999dcb83088118a7ea61814c5.
I know this is pretty modified from the original patch, but I spotted a
few issues, especially around getting the locks from the OCC, where the
code would assume it had all the locks, when it could have only gotten
one.
--
Stewart Smith
OPAL Architect, IBM.
More information about the Skiboot
mailing list