diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-02-03 20:51:59 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-03-03 09:40:40 +1100 |
commit | a2940770ca6da2c58081f8207aded197e45f6cd6 (patch) | |
tree | f51be7c9dbe321fa6a270d88b502bf70269c6f9d /include | |
parent | 95c59d192376a4360278393da5df53e21ae3fc72 (diff) | |
download | talos-skiboot-a2940770ca6da2c58081f8207aded197e45f6cd6.tar.gz talos-skiboot-a2940770ca6da2c58081f8207aded197e45f6cd6.zip |
lpc/uart: Support routing of selected LPC interrupts to Linux
Each LPC interrupt can be routed to one of 4 lines to the PSI
bridge which represent 4 different system interrupts. This
allows LPC clients to request as specific target (Linux or OPAL)
and makes the LPC core pick a route and configure it appropriately.
The UART is updated to properly forward interrupts to Linux
if necessary
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/lpc.h | 8 | ||||
-rw-r--r-- | include/psi.h | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/include/lpc.h b/include/lpc.h index 3e92d537..2347011d 100644 --- a/include/lpc.h +++ b/include/lpc.h @@ -60,6 +60,7 @@ extern void lpc_init(void); extern void lpc_init_interrupts(void); +extern void lpc_finalize_interrupts(void); /* Check for a default bus */ extern bool lpc_present(void); @@ -93,10 +94,11 @@ struct lpc_client { #define LPC_IRQ(n) (0x80000000 >> (n)) }; -extern void lpc_register_client(uint32_t chip_id, const struct lpc_client *clt); +extern void lpc_register_client(uint32_t chip_id, const struct lpc_client *clt, + uint32_t policy); -/* Manual control of routing on P9 for use by platforms if necessary */ -extern void lpc_route_serirq(uint32_t chip_id, uint32_t sirq, uint32_t psi_idx); +/* Return the policy for a given serirq */ +extern unsigned int lpc_get_irq_policy(uint32_t chip_id, uint32_t psi_idx); /* Clear SerIRQ latch on P9 DD1 */ extern void lpc_p9_sirq_eoi(uint32_t chip_id, uint32_t index); diff --git a/include/psi.h b/include/psi.h index 1a3e649f..d51ab946 100644 --- a/include/psi.h +++ b/include/psi.h @@ -246,6 +246,7 @@ struct psi { unsigned int interrupt; bool active; bool no_lpc_irqs; + struct dt_node *node; }; extern void psi_set_link_polling(bool active); |