Hi, This patch enables pci interrupt setup support for usb controller/minipci slot of arv7510 boards (wippies homebox, bewan ibox, arv7510)
Index: target/linux/ifxmips/files/arch/mips/pci/pci-ifxmips.c =================================================================== --- target/linux/ifxmips/files/arch/mips/pci/pci-ifxmips.c (revisiĆ³n: 24135) +++ target/linux/ifxmips/files/arch/mips/pci/pci-ifxmips.c (copia de trabajo) @@ -76,6 +76,7 @@ switch(pin) { case 0: + printk ("WARNING: interrupt pin %d not known\n", pin); break; case 1: //falling edge level triggered:0x4, low level:0xc, rising edge:0x2 @@ -83,9 +84,20 @@ ifxmips_w32(ifxmips_r32(IFXMIPS_EBU_PCC_IEN) | 0x10, IFXMIPS_EBU_PCC_IEN); break; case 2: + printk ("WARNING: interrupt pin %d not supported yet!\n", pin); + return 1; case 3: + ifxmips_w32(ifxmips_r32(IFXMIPS_GPIO_P0_DIR) & ~4, IFXMIPS_GPIO_P0_DIR); + ifxmips_w32(ifxmips_r32(IFXMIPS_GPIO_P0_ALTSEL0) | 4, IFXMIPS_GPIO_P0_ALTSEL0); + ifxmips_w32(ifxmips_r32(IFXMIPS_GPIO_P0_ALTSEL1) & ~4, IFXMIPS_GPIO_P0_ALTSEL1); + //ifxmips_w32(ifxmips_r32(IFXMIPS_ICU_EIU_EXIN_C) | 0x600, IFXMIPS_ICU_EIU_EXIN_C); + ifxmips_w32(ifxmips_r32((u32*)0xBF101000) | 0x600, (u32*)0xBF101000); + //ifxmips_w32(ifxmips_r32(IFXMIPS_ICU_EIU_INEN) | 4, IFXMIPS_ICU_EIU_INEN); + ifxmips_w32(ifxmips_r32((u32*)0xBF10100C) | 4, (u32*)0xBF10100C); + break; case 4: printk ("WARNING: interrupt pin %d not supported yet!\n", pin); + return 1; default: printk ("WARNING: invalid interrupt pin %d\n", pin); return 1; @@ -130,7 +142,9 @@ /* enable external 2 PCI masters */ temp_buffer = ifxmips_r32(PCI_CR_PC_ARB); - temp_buffer &= (~(ifxmips_pci_req_mask << 16)); + //temp_buffer &= (~(ifxmips_pci_req_mask << 16)); + temp_buffer |= ((ifxmips_pci_req_mask & 0x3) << 18); + temp_buffer &= (~((ifxmips_pci_req_mask & 0x3) << 16)); /* enable internal arbiter */ temp_buffer |= (1 << INTERNAL_ARB_ENABLE_BIT); /* enable internal PCI master reqest */ @@ -178,12 +192,18 @@ pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin){ switch(slot) { + case 12: + /* mini PCI connector on arv7510 arv4510? */ + return (INT_NUM_IM0_IRL0 + 22); case 13: /* IDSEL = AD29 --> USB Host Controller */ return (INT_NUM_IM1_IRL0 + 17); case 14: /* IDSEL = AD30 --> mini PCI connector */ return (INT_NUM_IM0_IRL0 + 22); + case 15: + /* VIA 6212 on arv7510 arv4510 also? */ + return (INT_NUM_IM0_IRL0 + 26); default: printk("Warning: no IRQ found for PCI device in slot %d, pin %d\n", slot, pin); return 0;
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel