Commit c982232a authored by Ganesan Ramalingam's avatar Ganesan Ramalingam Committed by 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: default avatarGanesan Ramalingam <ganesanr@broadcom.com>
Signed-off-by: default avatarJayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8895/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 94e2b96e
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#define PIC_2XX_XHCI_2_IRQ 25 #define PIC_2XX_XHCI_2_IRQ 25
#define PIC_9XX_XHCI_0_IRQ 23 #define PIC_9XX_XHCI_0_IRQ 23
#define PIC_9XX_XHCI_1_IRQ 24 #define PIC_9XX_XHCI_1_IRQ 24
#define PIC_9XX_XHCI_2_IRQ 25
#define PIC_MMC_IRQ 29 #define PIC_MMC_IRQ 29
#define PIC_I2C_0_IRQ 30 #define PIC_I2C_0_IRQ 30
......
...@@ -75,6 +75,8 @@ static int xlp9xx_irq_to_irt(int irq) ...@@ -75,6 +75,8 @@ static int xlp9xx_irq_to_irt(int irq)
return 114; return 114;
case PIC_9XX_XHCI_1_IRQ: case PIC_9XX_XHCI_1_IRQ:
return 115; return 115;
case PIC_9XX_XHCI_2_IRQ:
return 116;
case PIC_UART_0_IRQ: case PIC_UART_0_IRQ:
return 133; return 133;
case PIC_UART_1_IRQ: case PIC_UART_1_IRQ:
......
...@@ -128,6 +128,9 @@ static void xlp9xx_usb_ack(struct irq_data *data) ...@@ -128,6 +128,9 @@ static void xlp9xx_usb_ack(struct irq_data *data)
case PIC_9XX_XHCI_1_IRQ: case PIC_9XX_XHCI_1_IRQ:
port_addr = nlm_xlpii_get_usb_regbase(node, 2); port_addr = nlm_xlpii_get_usb_regbase(node, 2);
break; break;
case PIC_9XX_XHCI_2_IRQ:
port_addr = nlm_xlpii_get_usb_regbase(node, 3);
break;
default: default:
pr_err("No matching USB irq %d node %d!\n", irq, node); pr_err("No matching USB irq %d node %d!\n", irq, node);
return; return;
...@@ -222,14 +225,16 @@ static int __init nlm_platform_xlpii_usb_init(void) ...@@ -222,14 +225,16 @@ static int __init nlm_platform_xlpii_usb_init(void)
} }
/* XLP 9XX, multi-node */ /* 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++) { for (node = 0; node < NLM_NR_NODES; node++) {
if (!nlm_node_present(node)) if (!nlm_node_present(node))
continue; continue;
nlm_xlpii_usb_hw_reset(node, 1); nlm_xlpii_usb_hw_reset(node, 1);
nlm_xlpii_usb_hw_reset(node, 2); 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_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_1_IRQ, xlp9xx_usb_ack);
nlm_set_pic_extra_ack(node, PIC_9XX_XHCI_2_IRQ, xlp9xx_usb_ack);
} }
return 0; return 0;
} }
...@@ -253,6 +258,9 @@ static void nlm_xlp9xx_usb_fixup_final(struct pci_dev *dev) ...@@ -253,6 +258,9 @@ static void nlm_xlp9xx_usb_fixup_final(struct pci_dev *dev)
case 0x22: case 0x22:
dev->irq = nlm_irq_to_xirq(node, PIC_9XX_XHCI_1_IRQ); dev->irq = nlm_irq_to_xirq(node, PIC_9XX_XHCI_1_IRQ);
break; break;
case 0x23:
dev->irq = nlm_irq_to_xirq(node, PIC_9XX_XHCI_2_IRQ);
break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment