MIPS: Netlogic: Add irq mapping and setup for XHCI port 3
authorGanesan Ramalingam <ganesanr@broadcom.com>
Wed, 7 Jan 2015 11:28:36 +0000 (16:58 +0530)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 1 Apr 2015 15:21:53 +0000 (17:21 +0200)
Add support for third XHCI port in XLPII processors.

Signed-off-by: Ganesan Ramalingam <ganesanr@broadcom.com>
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8895/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/netlogic/xlp-hal/xlp.h
arch/mips/netlogic/xlp/nlm_hal.c
arch/mips/netlogic/xlp/usb-init-xlp2.c

index c0b2a807a791a03a4c42201c6779af0d2adfd130..feb6ed807ec6de2bd2311caae589cdb7457d8190 100644 (file)
@@ -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
index c6c31e3c0949d1c4ebe8cda6cd7ea962be30867f..8d743d08fd7361e21b1b9d96193a5fa24f29d5d2 100644 (file)
@@ -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:
index 17ade1ce5dfd87f6692e5dbb44002f3fbca8c2d7..2524939a5e3a56ebd689675327f38a02f94ffb8e 100644 (file)
@@ -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;
        }
 }