diff options
author | Neelesh Gupta <neelegup@linux.vnet.ibm.com> | 2014-10-25 23:33:52 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-10-27 18:13:41 +1100 |
commit | 2fe43d8776b19ff5896312c8bfef6a46156d0d48 (patch) | |
tree | 14c00d74019d94ae7ce7af1d79565cc6c0b18adc /hw/lpc.c | |
parent | 531bdefda91102cb3240e4e3289900af0a50e78b (diff) | |
download | skiboot-2fe43d8776b19ff5896312c8bfef6a46156d0d48.zip skiboot-2fe43d8776b19ff5896312c8bfef6a46156d0d48.tar.gz skiboot-2fe43d8776b19ff5896312c8bfef6a46156d0d48.tar.bz2 |
hw/i2c: i2c driver infrastructure providing device I/O
This patch adds the generic i2c driver infrastructure to handle multiple i2c
master cores present in the system and exposes structures and interfaces for
the client to perform I/O on the i2c slave devices.
The driver adds the capability to queue multiple requests from client and
let clients notified asynchronously after completion. It does that by
handling the i2c interrupt or through OPAL poller in the absence of
interrupt.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/lpc.c')
-rw-r--r-- | hw/lpc.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -20,6 +20,7 @@ #include <lock.h> #include <chip.h> #include <lpc.h> +#include <i2c.h> #include <timebase.h> #include <fsp-elog.h> @@ -454,6 +455,14 @@ bool lpc_present(void) return lpc_default_chip_id >= 0; } +void lpc_interrupt(void) +{ + /* i2c interrupts are routed through lpc */ + p8_i2c_interrupt(); + + /* Handle the lpc interrupt source */ +} + void lpc_init(void) { struct dt_node *xn; |