⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prep_pci.c

📁 内核linux2.4.20,可跟rtlinux3.2打补丁 组成实时linux系统,编译内核
💻 C
📖 第 1 页 / 共 3 页
字号:
/* * BK Id: SCCS/s.prep_pci.c 1.33 12/20/01 15:36:12 trini *//* * PReP pci functions. * Originally by Gary Thomas * rewritten and updated by Cort Dougan (cort@cs.nmt.edu) * * The motherboard routes/maps will disappear shortly. -- Cort */#include <linux/config.h>#include <linux/types.h>#include <linux/pci.h>#include <linux/kernel.h>#include <linux/init.h>#include <asm/sections.h>#include <asm/byteorder.h>#include <asm/io.h>#include <asm/ptrace.h>#include <asm/prom.h>#include <asm/pci-bridge.h>#include <asm/residual.h>#include <asm/processor.h>#include <asm/irq.h>#include <asm/machdep.h>#include "pci.h"#include "open_pic.h"#define MAX_DEVNR 22/* Which PCI interrupt line does a given device [slot] use? *//* Note: This really should be two dimensional based in slot/pin used */static unsigned char *Motherboard_map;unsigned char *Motherboard_map_name;/* How is the 82378 PIRQ mapping setup? */static unsigned char *Motherboard_routes;static void (*Motherboard_non0)(struct pci_dev *);static void Powerplus_Map_Non0(struct pci_dev *);/* Used for Motorola to store system config register */static unsigned long	*ProcInfo;/* Tables for known hardware */   /* Motorola PowerStackII - Utah */static char Utah_pci_IRQ_map[23] __prepdata ={        0,   /* Slot 0  - unused */        0,   /* Slot 1  - unused */        5,   /* Slot 2  - SCSI - NCR825A  */        0,   /* Slot 3  - unused */        1,   /* Slot 4  - Ethernet - DEC2114x */        0,   /* Slot 5  - unused */        3,   /* Slot 6  - PCI Card slot #1 */        4,   /* Slot 7  - PCI Card slot #2 */        5,   /* Slot 8  - PCI Card slot #3 */        5,   /* Slot 9  - PCI Bridge */             /* added here in case we ever support PCI bridges */             /* Secondary PCI bus cards are at slot-9,6 & slot-9,7 */        0,   /* Slot 10 - unused */        0,   /* Slot 11 - unused */        5,   /* Slot 12 - SCSI - NCR825A */        0,   /* Slot 13 - unused */        3,   /* Slot 14 - enet */        0,   /* Slot 15 - unused */        2,   /* Slot 16 - unused */        3,   /* Slot 17 - unused */        5,   /* Slot 18 - unused */        0,   /* Slot 19 - unused */        0,   /* Slot 20 - unused */        0,   /* Slot 21 - unused */        0,   /* Slot 22 - unused */};static char Utah_pci_IRQ_routes[] __prepdata ={        0,   /* Line 0 - Unused */        9,   /* Line 1 */	10,  /* Line 2 */        11,  /* Line 3 */        14,  /* Line 4 */        15,  /* Line 5 */};/* Motorola PowerStackII - Omaha *//* no integrated SCSI or ethernet */static char Omaha_pci_IRQ_map[23] __prepdata ={        0,   /* Slot 0  - unused */        0,   /* Slot 1  - unused */        3,   /* Slot 2  - Winbond EIDE */        0,   /* Slot 3  - unused */        0,   /* Slot 4  - unused */        0,   /* Slot 5  - unused */        1,   /* Slot 6  - PCI slot 1 */        2,   /* Slot 7  - PCI slot 2  */        3,   /* Slot 8  - PCI slot 3 */        4,   /* Slot 9  - PCI slot 4 */ /* needs indirect access */        0,   /* Slot 10 - unused */        0,   /* Slot 11 - unused */        0,   /* Slot 12 - unused */        0,   /* Slot 13 - unused */        0,   /* Slot 14 - unused */        0,   /* Slot 15 - unused */        1,   /* Slot 16  - PCI slot 1 */        2,   /* Slot 17  - PCI slot 2  */        3,   /* Slot 18  - PCI slot 3 */        4,   /* Slot 19  - PCI slot 4 */ /* needs indirect access */        0,        0,        0,};static char Omaha_pci_IRQ_routes[] __prepdata ={        0,   /* Line 0 - Unused */        9,   /* Line 1 */        11,  /* Line 2 */        14,  /* Line 3 */        15   /* Line 4 */};/* Motorola PowerStack */static char Blackhawk_pci_IRQ_map[19] __prepdata ={  	0,	/* Slot 0  - unused */  	0,	/* Slot 1  - unused */  	0,	/* Slot 2  - unused */  	0,	/* Slot 3  - unused */  	0,	/* Slot 4  - unused */  	0,	/* Slot 5  - unused */  	0,	/* Slot 6  - unused */  	0,	/* Slot 7  - unused */  	0,	/* Slot 8  - unused */  	0,	/* Slot 9  - unused */  	0,	/* Slot 10 - unused */  	0,	/* Slot 11 - unused */  	3,	/* Slot 12 - SCSI */  	0,	/* Slot 13 - unused */  	1,	/* Slot 14 - Ethernet */  	0,	/* Slot 15 - unused */ 	1,	/* Slot P7 */ 	2,	/* Slot P6 */ 	3,	/* Slot P5 */};static char Blackhawk_pci_IRQ_routes[] __prepdata ={   	0,	/* Line 0 - Unused */   	9,	/* Line 1 */   	11,	/* Line 2 */   	15,	/* Line 3 */   	15	/* Line 4 */};   /* Motorola Mesquite */static char Mesquite_pci_IRQ_map[23] __prepdata ={	0,	/* Slot 0  - unused */	0,	/* Slot 1  - unused */	0,	/* Slot 2  - unused */	0,	/* Slot 3  - unused */	0,	/* Slot 4  - unused */	0,	/* Slot 5  - unused */	0,	/* Slot 6  - unused */	0,	/* Slot 7  - unused */	0,	/* Slot 8  - unused */	0,	/* Slot 9  - unused */	0,	/* Slot 10 - unused */	0,	/* Slot 11 - unused */	0,	/* Slot 12 - unused */	0,	/* Slot 13 - unused */	2,	/* Slot 14 - Ethernet */	0,	/* Slot 15 - unused */	3,	/* Slot 16 - PMC */	0,	/* Slot 17 - unused */	0,	/* Slot 18 - unused */	0,	/* Slot 19 - unused */	0,	/* Slot 20 - unused */	0,	/* Slot 21 - unused */	0,	/* Slot 22 - unused */};/* Motorola Sitka */static char Sitka_pci_IRQ_map[21] __prepdata ={	0,      /* Slot 0  - unused */	0,      /* Slot 1  - unused */	0,      /* Slot 2  - unused */	0,      /* Slot 3  - unused */	0,      /* Slot 4  - unused */	0,      /* Slot 5  - unused */	0,      /* Slot 6  - unused */	0,      /* Slot 7  - unused */	0,      /* Slot 8  - unused */	0,      /* Slot 9  - unused */	0,      /* Slot 10 - unused */	0,      /* Slot 11 - unused */	0,      /* Slot 12 - unused */	0,      /* Slot 13 - unused */	2,      /* Slot 14 - Ethernet */	0,      /* Slot 15 - unused */	9,      /* Slot 16 - PMC 1  */	12,     /* Slot 17 - PMC 2  */	0,      /* Slot 18 - unused */	0,      /* Slot 19 - unused */	4,      /* Slot 20 - NT P2P bridge */};/* Motorola MTX */static char MTX_pci_IRQ_map[23] __prepdata ={	0,	/* Slot 0  - unused */	0,	/* Slot 1  - unused */	0,	/* Slot 2  - unused */	0,	/* Slot 3  - unused */	0,	/* Slot 4  - unused */	0,	/* Slot 5  - unused */	0,	/* Slot 6  - unused */	0,	/* Slot 7  - unused */	0,	/* Slot 8  - unused */	0,	/* Slot 9  - unused */	0,	/* Slot 10 - unused */	0,	/* Slot 11 - unused */	3,	/* Slot 12 - SCSI */	0,	/* Slot 13 - unused */	2,	/* Slot 14 - Ethernet */	0,	/* Slot 15 - unused */	9,      /* Slot 16 - PCI/PMC slot 1 */	10,     /* Slot 17 - PCI/PMC slot 2 */	11,     /* Slot 18 - PCI slot 3 */	0,	/* Slot 19 - unused */	0,	/* Slot 20 - unused */	0,	/* Slot 21 - unused */	0,	/* Slot 22 - unused */};/* Motorola MTX Plus *//* Secondary bus interrupt routing is not supported yet */static char MTXplus_pci_IRQ_map[23] __prepdata ={        0,      /* Slot 0  - unused */        0,      /* Slot 1  - unused */        0,      /* Slot 2  - unused */        0,      /* Slot 3  - unused */        0,      /* Slot 4  - unused */        0,      /* Slot 5  - unused */        0,      /* Slot 6  - unused */        0,      /* Slot 7  - unused */        0,      /* Slot 8  - unused */        0,      /* Slot 9  - unused */        0,      /* Slot 10 - unused */        0,      /* Slot 11 - unused */        3,      /* Slot 12 - SCSI */        0,      /* Slot 13 - unused */        2,      /* Slot 14 - Ethernet 1 */        0,      /* Slot 15 - unused */        9,      /* Slot 16 - PCI slot 1P */        10,     /* Slot 17 - PCI slot 2P */        11,     /* Slot 18 - PCI slot 3P */        10,     /* Slot 19 - Ethernet 2 */        0,      /* Slot 20 - P2P Bridge */        0,      /* Slot 21 - unused */        0,      /* Slot 22 - unused */};static char Raven_pci_IRQ_routes[] __prepdata ={   	0,	/* This is a dummy structure */};   /* Motorola MVME16xx */static char Genesis_pci_IRQ_map[16] __prepdata ={  	0,	/* Slot 0  - unused */  	0,	/* Slot 1  - unused */  	0,	/* Slot 2  - unused */  	0,	/* Slot 3  - unused */  	0,	/* Slot 4  - unused */  	0,	/* Slot 5  - unused */  	0,	/* Slot 6  - unused */  	0,	/* Slot 7  - unused */  	0,	/* Slot 8  - unused */  	0,	/* Slot 9  - unused */  	0,	/* Slot 10 - unused */  	0,	/* Slot 11 - unused */  	3,	/* Slot 12 - SCSI */  	0,	/* Slot 13 - unused */  	1,	/* Slot 14 - Ethernet */  	0,	/* Slot 15 - unused */};static char Genesis_pci_IRQ_routes[] __prepdata ={   	0,	/* Line 0 - Unused */   	10,	/* Line 1 */   	11,	/* Line 2 */   	14,	/* Line 3 */   	15	/* Line 4 */};   static char Genesis2_pci_IRQ_map[23] __prepdata ={	0,	/* Slot 0  - unused */	0,	/* Slot 1  - unused */	0,	/* Slot 2  - unused */	0,	/* Slot 3  - unused */	0,	/* Slot 4  - unused */	0,	/* Slot 5  - unused */	0,	/* Slot 6  - unused */	0,	/* Slot 7  - unused */	0,	/* Slot 8  - unused */	0,	/* Slot 9  - unused */	0,	/* Slot 10 - Ethernet */	0,	/* Slot 11 - Universe PCI - VME Bridge */	3,	/* Slot 12 - unused */	0,	/* Slot 13 - unused */	2,	/* Slot 14 - SCSI */	0,	/* Slot 15 - unused */	9,	/* Slot 16 - PMC 1 */	12,	/* Slot 17 - pci */	11,	/* Slot 18 - pci */	10,	/* Slot 19 - pci */	0,	/* Slot 20 - pci */	0,	/* Slot 21 - unused */	0,	/* Slot 22 - unused */};/* Motorola Series-E */static char Comet_pci_IRQ_map[23] __prepdata ={  	0,	/* Slot 0  - unused */  	0,	/* Slot 1  - unused */  	0,	/* Slot 2  - unused */  	0,	/* Slot 3  - unused */  	0,	/* Slot 4  - unused */  	0,	/* Slot 5  - unused */  	0,	/* Slot 6  - unused */  	0,	/* Slot 7  - unused */  	0,	/* Slot 8  - unused */  	0,	/* Slot 9  - unused */  	0,	/* Slot 10 - unused */  	0,	/* Slot 11 - unused */  	3,	/* Slot 12 - SCSI */  	0,	/* Slot 13 - unused */  	1,	/* Slot 14 - Ethernet */  	0,	/* Slot 15 - unused */	1,	/* Slot 16 - PCI slot 1 */	2,	/* Slot 17 - PCI slot 2 */	3,	/* Slot 18 - PCI slot 3 */	4,	/* Slot 19 - PCI bridge */	0,	0,	0,};static char Comet_pci_IRQ_routes[] __prepdata ={   	0,	/* Line 0 - Unused */   	10,	/* Line 1 */   	11,	/* Line 2 */   	14,	/* Line 3 */   	15	/* Line 4 */};/* Motorola Series-EX */static char Comet2_pci_IRQ_map[23] __prepdata ={	0,	/* Slot 0  - unused */	0,	/* Slot 1  - unused */	3,	/* Slot 2  - SCSI - NCR825A */	0,	/* Slot 3  - unused */	1,	/* Slot 4  - Ethernet - DEC2104X */	0,	/* Slot 5  - unused */	1,	/* Slot 6  - PCI slot 1 */	2,	/* Slot 7  - PCI slot 2 */	3,	/* Slot 8  - PCI slot 3 */	4,	/* Slot 9  - PCI bridge  */	0,	/* Slot 10 - unused */	0,	/* Slot 11 - unused */	3,	/* Slot 12 - SCSI - NCR825A */	0,	/* Slot 13 - unused */	1,	/* Slot 14 - Ethernet - DEC2104X */	0,	/* Slot 15 - unused */	1,	/* Slot 16 - PCI slot 1 */	2,	/* Slot 17 - PCI slot 2 */	3,	/* Slot 18 - PCI slot 3 */	4,	/* Slot 19 - PCI bridge */	0,	0,	0,};static char Comet2_pci_IRQ_routes[] __prepdata ={	0,	/* Line 0 - Unused */	10,	/* Line 1 */	11,	/* Line 2 */	14,	/* Line 3 */	15,	/* Line 4 */};/* * ibm 830 (and 850?). * This is actually based on the Carolina motherboard * -- Cort */static char ibm8xx_pci_IRQ_map[23] __prepdata = {        0, /* Slot 0  - unused */        0, /* Slot 1  - unused */        0, /* Slot 2  - unused */        0, /* Slot 3  - unused */        0, /* Slot 4  - unused */        0, /* Slot 5  - unused */        0, /* Slot 6  - unused */        0, /* Slot 7  - unused */        0, /* Slot 8  - unused */        0, /* Slot 9  - unused */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -