@@ -74,4 +74,9 @@
int __init intc_irq_init(void);
int __init dmac_irq_init(void);
+/*
+ * IRQs asserted by the I/O processor (IOP) via the sub-system interface (SIF).
+ */
+void intc_sif_irq(unsigned int irq);
+
#endif /* __ASM_MACH_PS2_IRQ_H */
@@ -85,6 +85,12 @@ static struct irqaction cascade_intc_irqaction = {
.handler = intc_cascade,
};
+void intc_sif_irq(unsigned int irq)
+{
+ do_IRQ(irq);
+}
+EXPORT_SYMBOL_GPL(intc_sif_irq);
+
int __init intc_irq_init(void)
{
size_t i;
@@ -568,6 +568,16 @@ int sif_request_cmd(u32 cmd_id, sif_cmd_cb cb, void *arg)
}
EXPORT_SYMBOL_GPL(sif_request_cmd);
+static void cmd_irq_relay(const struct sif_cmd_header *header,
+ const void *data, void *arg)
+{
+ const struct {
+ u32 irq;
+ } *packet = data;
+
+ intc_sif_irq(packet->irq);
+}
+
static int iop_reset_arg(const char *arg)
{
const size_t arglen = strlen(arg) + 1;
@@ -664,6 +674,7 @@ static int sif_request_cmds(void)
struct cmd_data *arg;
} cmds[] = {
{ SIF_CMD_WRITE_SREG, cmd_write_sreg, NULL },
+ { SIF_CMD_IRQ_RELAY, cmd_irq_relay, NULL },
{ SIF_CMD_RPC_END, cmd_rpc_end, NULL },
{ SIF_CMD_RPC_BIND, cmd_rpc_bind, NULL },
Signed-off-by: Fredrik Noring <noring@nocrew.org> --- arch/mips/include/asm/mach-ps2/irq.h | 5 +++++ arch/mips/ps2/intc-irq.c | 6 ++++++ drivers/ps2/sif.c | 11 +++++++++++ 3 files changed, 22 insertions(+)