aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-11-12 15:44:33 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-11-12 16:41:25 +1100
commit0859f799583daa5fac57ab3f9a1175aae4de3252 (patch)
treeae5f70cd26f3ecd13e9b44003be1ae2375797260 /include
parenteec6e53ff88c0cb82f3624642390793cc0f8e3ce (diff)
downloadskiboot-0859f799583daa5fac57ab3f9a1175aae4de3252.zip
skiboot-0859f799583daa5fac57ab3f9a1175aae4de3252.tar.gz
skiboot-0859f799583daa5fac57ab3f9a1175aae4de3252.tar.bz2
i2c: Use new timer facility and improve interrupts handling
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>
Diffstat (limited to 'include')
-rw-r--r--include/chip.h5
-rw-r--r--include/i2c.h4
-rw-r--r--include/lpc.h2
3 files changed, 7 insertions, 4 deletions
diff --git a/include/chip.h b/include/chip.h
index 10623e6..fb2771e 100644
--- a/include/chip.h
+++ b/include/chip.h
@@ -20,6 +20,8 @@
#include <stdint.h>
#include <lock.h>
+#include <ccan/list/list.h>
+
/*
* Note on chip IDs:
*
@@ -132,6 +134,9 @@ struct proc_chip {
/* Used by hw/centaur.c */
struct centaur_chip *centaurs;
+
+ /* Used by hw/p8-i2c.c */
+ struct list_head i2cms;
};
extern uint32_t pir_to_chip_id(uint32_t pir);
diff --git a/include/i2c.h b/include/i2c.h
index 2647bdc..1384697 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -47,8 +47,6 @@ struct i2c_request {
void *user_data; /* Client data */
};
-extern struct list_head i2c_bus_list;
-
/* Generic i2c */
extern void i2c_add_bus(struct i2c_bus *bus);
extern struct i2c_bus *i2c_find_bus_by_id(uint32_t opal_id);
@@ -70,6 +68,6 @@ static inline int i2c_queue_req(struct i2c_request *req)
/* P8 implementation details */
extern void p8_i2c_init(void);
-extern void p8_i2c_interrupt(void);
+extern void p8_i2c_interrupt(uint32_t chip_id);
#endif /* __I2C_H */
diff --git a/include/lpc.h b/include/lpc.h
index e4e24ea..632727f 100644
--- a/include/lpc.h
+++ b/include/lpc.h
@@ -28,7 +28,7 @@ extern void lpc_init(void);
extern bool lpc_present(void);
/* Handle the interrupt from LPC source */
-extern void lpc_interrupt(void);
+extern void lpc_interrupt(uint32_t chip_id);
/* Default bus accessors */
extern int64_t lpc_write(enum OpalLPCAddressType addr_type, uint32_t addr,