~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/mips/pci/fixup-ip32.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 #include <linux/init.h>
  3 #include <linux/kernel.h>
  4 #include <linux/pci.h>
  5 #include <asm/ip32/ip32_ints.h>
  6 /*
  7  * O2 has up to 5 PCI devices connected into the MACE bridge.  The device
  8  * map looks like this:
  9  *
 10  * 0  aic7xxx 0
 11  * 1  aic7xxx 1
 12  * 2  expansion slot
 13  * 3  N/C
 14  * 4  N/C
 15  */
 16 
 17 #define SCSI0  MACEPCI_SCSI0_IRQ
 18 #define SCSI1  MACEPCI_SCSI1_IRQ
 19 #define INTA0  MACEPCI_SLOT0_IRQ
 20 #define INTA1  MACEPCI_SLOT1_IRQ
 21 #define INTA2  MACEPCI_SLOT2_IRQ
 22 #define INTB   MACEPCI_SHARED0_IRQ
 23 #define INTC   MACEPCI_SHARED1_IRQ
 24 #define INTD   MACEPCI_SHARED2_IRQ
 25 static char irq_tab_mace[][5] = {
 26       /* Dummy  INT#A  INT#B  INT#C  INT#D */
 27         {0,         0,     0,     0,     0}, /* This is placeholder row - never used */
 28         {0,     SCSI0, SCSI0, SCSI0, SCSI0},
 29         {0,     SCSI1, SCSI1, SCSI1, SCSI1},
 30         {0,     INTA0,  INTB,  INTC,  INTD},
 31         {0,     INTA1,  INTC,  INTD,  INTB},
 32         {0,     INTA2,  INTD,  INTB,  INTC},
 33 };
 34 
 35 
 36 /*
 37  * Given a PCI slot number (a la PCI_SLOT(...)) and the interrupt pin of
 38  * the device (1-4 => A-D), tell what irq to use.  Note that we don't
 39  * in theory have slots 4 and 5, and we never normally use the shared
 40  * irqs.  I suppose a device without a pin A will thank us for doing it
 41  * right if there exists such a broken piece of crap.
 42  */
 43 int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 44 {
 45         return irq_tab_mace[slot][pin];
 46 }
 47 
 48 /* Do platform specific device initialization at pci_enable_device() time */
 49 int pcibios_plat_dev_init(struct pci_dev *dev)
 50 {
 51         return 0;
 52 }
 53 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php