/* @dev: The Linux PCI device structure for the device to map @slot: The slot number for this device on  */
int __init octeon_pci_pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
/* @dev: The Linux PCI device structure for the device to map @slot: The slot number for this device on  */
int __init octeon_pci_pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{
	int irq_num;
	const char *interrupts;
	int dev_num;
	interrupts = octeon_get_pci_interrupts();
	dev_num = dev->devfn >> 3;
	if (dev_num < strlen(interrupts))
		irq_num = ((interrupts[dev_num] - 'A' + pin - 1) & 3) +
			OCTEON_IRQ_PCI_INT0;
	else
		irq_num = ((slot + pin - 3) & 3) + OCTEON_IRQ_PCI_INT0;
	return irq_num;
}