提交 c982232a 编写于 作者: G Ganesan Ramalingam 提交者: Ralf Baechle

MIPS: Netlogic: Add irq mapping and setup for XHCI port 3

Add support for third XHCI port in XLPII processors.
Signed-off-by: NGanesan Ramalingam <ganesanr@broadcom.com>
Signed-off-by: NJayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8895/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 94e2b96e
......@@ -52,6 +52,7 @@
#define PIC_2XX_XHCI_2_IRQ 25
#define PIC_9XX_XHCI_0_IRQ 23
#define PIC_9XX_XHCI_1_IRQ 24
#define PIC_9XX_XHCI_2_IRQ 25
#define PIC_MMC_IRQ 29
#define PIC_I2C_0_IRQ 30
......
......@@ -75,6 +75,8 @@ static int xlp9xx_irq_to_irt(int irq)
return 114;
case PIC_9XX_XHCI_1_IRQ:
return 115;
case PIC_9XX_XHCI_2_IRQ:
return 116;
case PIC_UART_0_IRQ:
return 133;
case PIC_UART_1_IRQ:
......
......@@ -128,6 +128,9 @@ static void xlp9xx_usb_ack(struct irq_data *data)
case PIC_9XX_XHCI_1_IRQ:
port_addr = nlm_xlpii_get_usb_regbase(node, 2);
break;
case PIC_9XX_XHCI_2_IRQ:
port_addr = nlm_xlpii_get_usb_regbase(node, 3);
break;
default:
pr_err("No matching USB irq %d node %d!\n", irq, node);
return;
......@@ -222,14 +225,16 @@ static int __init nlm_platform_xlpii_usb_init(void)
}
/* XLP 9XX, multi-node */
pr_info("Initializing 9XX USB Interface\n");
pr_info("Initializing 9XX/5XX USB Interface\n");
for (node = 0; node < NLM_NR_NODES; node++) {
if (!nlm_node_present(node))
continue;
nlm_xlpii_usb_hw_reset(node, 1);
nlm_xlpii_usb_hw_reset(node, 2);
nlm_xlpii_usb_hw_reset(node, 3);
nlm_set_pic_extra_ack(node, PIC_9XX_XHCI_0_IRQ, xlp9xx_usb_ack);
nlm_set_pic_extra_ack(node, PIC_9XX_XHCI_1_IRQ, xlp9xx_usb_ack);
nlm_set_pic_extra_ack(node, PIC_9XX_XHCI_2_IRQ, xlp9xx_usb_ack);
}
return 0;
}
......@@ -253,6 +258,9 @@ static void nlm_xlp9xx_usb_fixup_final(struct pci_dev *dev)
case 0x22:
dev->irq = nlm_irq_to_xirq(node, PIC_9XX_XHCI_1_IRQ);
break;
case 0x23:
dev->irq = nlm_irq_to_xirq(node, PIC_9XX_XHCI_2_IRQ);
break;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册