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

📄 sys_dp264.c

📁 讲述linux的初始化过程
💻 C
📖 第 1 页 / 共 2 页
字号:
	tsunami_update_irq_hw(0);	init_i8259a_irqs();	init_tsunami_irqs(&clipper_irq_type, 24, 63);}/* * PCI Fixup configuration. * * Summary @ TSUNAMI_CSR_DIM0: * Bit      Meaning * 0-17     Unused *18        Interrupt SCSI B (Adaptec 7895 builtin) *19        Interrupt SCSI A (Adaptec 7895 builtin) *20        Interrupt Line D from slot 2 PCI0 *21        Interrupt Line C from slot 2 PCI0 *22        Interrupt Line B from slot 2 PCI0 *23        Interrupt Line A from slot 2 PCI0 *24        Interrupt Line D from slot 1 PCI0 *25        Interrupt Line C from slot 1 PCI0 *26        Interrupt Line B from slot 1 PCI0 *27        Interrupt Line A from slot 1 PCI0 *28        Interrupt Line D from slot 0 PCI0 *29        Interrupt Line C from slot 0 PCI0 *30        Interrupt Line B from slot 0 PCI0 *31        Interrupt Line A from slot 0 PCI0 * *32        Interrupt Line D from slot 3 PCI1 *33        Interrupt Line C from slot 3 PCI1 *34        Interrupt Line B from slot 3 PCI1 *35        Interrupt Line A from slot 3 PCI1 *36        Interrupt Line D from slot 2 PCI1 *37        Interrupt Line C from slot 2 PCI1 *38        Interrupt Line B from slot 2 PCI1 *39        Interrupt Line A from slot 2 PCI1 *40        Interrupt Line D from slot 1 PCI1 *41        Interrupt Line C from slot 1 PCI1 *42        Interrupt Line B from slot 1 PCI1 *43        Interrupt Line A from slot 1 PCI1 *44        Interrupt Line D from slot 0 PCI1 *45        Interrupt Line C from slot 0 PCI1 *46        Interrupt Line B from slot 0 PCI1 *47        Interrupt Line A from slot 0 PCI1 *48-52     Unused *53        PCI0 NMI (from Cypress) *54        PCI0 SMI INT (from Cypress) *55        PCI0 ISA Interrupt (from Cypress) *56-60     Unused *61        PCI1 Bus Error *62        PCI0 Bus Error *63        Reserved * * IdSel	 *   5	 Cypress Bridge I/O *   6	 SCSI Adaptec builtin *   7	 64 bit PCI option slot 0 (all busses) *   8	 64 bit PCI option slot 1 (all busses) *   9	 64 bit PCI option slot 2 (all busses) *  10	 64 bit PCI option slot 3 (not bus 0) */static int __initdp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin){	static char irq_tab[6][5] __initdata = {		/*INT    INTA   INTB   INTC   INTD */		{    -1,    -1,    -1,    -1,    -1}, /* IdSel 5 ISA Bridge */		{ 16+ 3, 16+ 3, 16+ 2, 16+ 2, 16+ 2}, /* IdSel 6 SCSI builtin*/		{ 16+15, 16+15, 16+14, 16+13, 16+12}, /* IdSel 7 slot 0 */		{ 16+11, 16+11, 16+10, 16+ 9, 16+ 8}, /* IdSel 8 slot 1 */		{ 16+ 7, 16+ 7, 16+ 6, 16+ 5, 16+ 4}, /* IdSel 9 slot 2 */		{ 16+ 3, 16+ 3, 16+ 2, 16+ 1, 16+ 0}  /* IdSel 10 slot 3 */	};	const long min_idsel = 5, max_idsel = 10, irqs_per_slot = 5;	struct pci_controler *hose = dev->sysdata;	int irq = COMMON_TABLE_LOOKUP;	if (irq > 0) {		irq += 16 * hose->index;	} else {		/* ??? The Contaq IDE controler on the ISA bridge uses		   "legacy" interrupts 14 and 15.  I don't know if anything		   can wind up at the same slot+pin on hose1, so we'll		   just have to trust whatever value the console might		   have assigned.  */		u8 irq8;		pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq8);		irq = irq8;	}	return irq;}static int __initmonet_map_irq(struct pci_dev *dev, u8 slot, u8 pin){	static char irq_tab[13][5] __initdata = {		/*INT    INTA   INTB   INTC   INTD */		{    45,    45,    45,    45,    45}, /* IdSel 3 21143 PCI1 */		{    -1,    -1,    -1,    -1,    -1}, /* IdSel 4 unused */		{    -1,    -1,    -1,    -1,    -1}, /* IdSel 5 unused */		{    47,    47,    47,    47,    47}, /* IdSel 6 SCSI PCI1 */		{    -1,    -1,    -1,    -1,    -1}, /* IdSel 7 ISA Bridge */		{    -1,    -1,    -1,    -1,    -1}, /* IdSel 8 P2P PCI1 */#if 1		{    28,    28,    29,    30,    31}, /* IdSel 14 slot 4 PCI2*/		{    24,    24,    25,    26,    27}, /* IdSel 15 slot 5 PCI2*/#else		{    -1,    -1,    -1,    -1,    -1}, /* IdSel 9 unused */		{    -1,    -1,    -1,    -1,    -1}, /* IdSel 10 unused */#endif		{    40,    40,    41,    42,    43}, /* IdSel 11 slot 1 PCI0*/		{    36,    36,    37,    38,    39}, /* IdSel 12 slot 2 PCI0*/		{    32,    32,    33,    34,    35}, /* IdSel 13 slot 3 PCI0*/		{    28,    28,    29,    30,    31}, /* IdSel 14 slot 4 PCI2*/		{    24,    24,    25,    26,    27}  /* IdSel 15 slot 5 PCI2*/	};	const long min_idsel = 3, max_idsel = 15, irqs_per_slot = 5;	return COMMON_TABLE_LOOKUP;}static u8 __initmonet_swizzle(struct pci_dev *dev, u8 *pinp){	struct pci_controler *hose = dev->sysdata;	int slot, pin = *pinp;	if (hose->first_busno == dev->bus->number) {		slot = PCI_SLOT(dev->devfn);	}	/* Check for the built-in bridge on hose 1. */	else if (hose->index == 1 && PCI_SLOT(dev->bus->self->devfn) == 8) {		slot = PCI_SLOT(dev->devfn);	} else {		/* Must be a card-based bridge.  */		do {			/* Check for built-in bridge on hose 1. */			if (hose->index == 1 &&			    PCI_SLOT(dev->bus->self->devfn) == 8) {				slot = PCI_SLOT(dev->devfn);				break;			}			pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn)) ;			/* Move up the chain of bridges.  */			dev = dev->bus->self;			/* Slot of the next bridge.  */			slot = PCI_SLOT(dev->devfn);		} while (dev->bus->self);	}	*pinp = pin;	return slot;}static int __initwebbrick_map_irq(struct pci_dev *dev, u8 slot, u8 pin){	static char irq_tab[13][5] __initdata = {		/*INT    INTA   INTB   INTC   INTD */		{    -1,    -1,    -1,    -1,    -1}, /* IdSel 7 ISA Bridge */		{    -1,    -1,    -1,    -1,    -1}, /* IdSel 8 unused */		{    29,    29,    29,    29,    29}, /* IdSel 9 21143 #1 */		{    -1,    -1,    -1,    -1,    -1}, /* IdSel 10 unused */		{    30,    30,    30,    30,    30}, /* IdSel 11 21143 #2 */		{    -1,    -1,    -1,    -1,    -1}, /* IdSel 12 unused */		{    -1,    -1,    -1,    -1,    -1}, /* IdSel 13 unused */		{    35,    35,    34,    33,    32}, /* IdSel 14 slot 0 */		{    39,    39,    38,    37,    36}, /* IdSel 15 slot 1 */		{    43,    43,    42,    41,    40}, /* IdSel 16 slot 2 */		{    47,    47,    46,    45,    44}, /* IdSel 17 slot 3 */	};	const long min_idsel = 7, max_idsel = 17, irqs_per_slot = 5;	return COMMON_TABLE_LOOKUP;}static int __initclipper_map_irq(struct pci_dev *dev, u8 slot, u8 pin){	static char irq_tab[7][5] __initdata = {		/*INT    INTA   INTB   INTC   INTD */		{ 16+ 8, 16+ 8, 16+ 9, 16+10, 16+11}, /* IdSel 1 slot 1 */		{ 16+12, 16+12, 16+13, 16+14, 16+15}, /* IdSel 2 slot 2 */		{ 16+16, 16+16, 16+17, 16+18, 16+19}, /* IdSel 3 slot 3 */		{ 16+20, 16+20, 16+21, 16+22, 16+23}, /* IdSel 4 slot 4 */		{ 16+24, 16+24, 16+25, 16+26, 16+27}, /* IdSel 5 slot 5 */		{ 16+28, 16+28, 16+29, 16+30, 16+31}, /* IdSel 6 slot 6 */		{    -1,    -1,    -1,    -1,    -1}  /* IdSel 7 ISA Bridge */	};	const long min_idsel = 1, max_idsel = 7, irqs_per_slot = 5;	struct pci_controler *hose = dev->sysdata;	int irq = COMMON_TABLE_LOOKUP;	if (irq > 0)		irq += 16 * hose->index;	return irq;}static void __initdp264_init_pci(void){	common_init_pci();	SMC669_Init(0);}static void __initmonet_init_pci(void){	common_init_pci();	SMC669_Init(1);	es1888_init();}static void __initwebbrick_init_arch(void){	tsunami_init_arch();	/* Tsunami caches 4 PTEs at a time; DS10 has only 1 hose. */	hose_head->sg_isa->align_entry = 4;	hose_head->sg_pci->align_entry = 4;}/* * The System Vectors */struct alpha_machine_vector dp264_mv __initmv = {	vector_name:		"DP264",	DO_EV6_MMU,	DO_DEFAULT_RTC,	DO_TSUNAMI_IO,	DO_TSUNAMI_BUS,	machine_check:		tsunami_machine_check,	max_dma_address:	ALPHA_MAX_DMA_ADDRESS,	min_io_address:		DEFAULT_IO_BASE,	min_mem_address:	DEFAULT_MEM_BASE,	nr_irqs:		64,	device_interrupt:	dp264_device_interrupt,	init_arch:		tsunami_init_arch,	init_irq:		dp264_init_irq,	init_rtc:		common_init_rtc,	init_pci:		dp264_init_pci,	kill_arch:		tsunami_kill_arch,	pci_map_irq:		dp264_map_irq,	pci_swizzle:		common_swizzle,};ALIAS_MV(dp264)struct alpha_machine_vector monet_mv __initmv = {	vector_name:		"Monet",	DO_EV6_MMU,	DO_DEFAULT_RTC,	DO_TSUNAMI_IO,	DO_TSUNAMI_BUS,	machine_check:		tsunami_machine_check,	max_dma_address:	ALPHA_MAX_DMA_ADDRESS,	min_io_address:		DEFAULT_IO_BASE,	min_mem_address:	DEFAULT_MEM_BASE,	nr_irqs:		64,	device_interrupt:	dp264_device_interrupt,	init_arch:		tsunami_init_arch,	init_irq:		dp264_init_irq,	init_rtc:		common_init_rtc,	init_pci:		monet_init_pci,	kill_arch:		tsunami_kill_arch,	pci_map_irq:		monet_map_irq,	pci_swizzle:		monet_swizzle,};struct alpha_machine_vector webbrick_mv __initmv = {	vector_name:		"Webbrick",	DO_EV6_MMU,	DO_DEFAULT_RTC,	DO_TSUNAMI_IO,	DO_TSUNAMI_BUS,	machine_check:		tsunami_machine_check,	max_dma_address:	ALPHA_MAX_DMA_ADDRESS,	min_io_address:		DEFAULT_IO_BASE,	min_mem_address:	DEFAULT_MEM_BASE,	nr_irqs:		64,	device_interrupt:	dp264_device_interrupt,	init_arch:		webbrick_init_arch,	init_irq:		dp264_init_irq,	init_rtc:		common_init_rtc,	init_pci:		common_init_pci,	kill_arch:		tsunami_kill_arch,	pci_map_irq:		webbrick_map_irq,	pci_swizzle:		common_swizzle,};struct alpha_machine_vector clipper_mv __initmv = {	vector_name:		"Clipper",	DO_EV6_MMU,	DO_DEFAULT_RTC,	DO_TSUNAMI_IO,	DO_TSUNAMI_BUS,	machine_check:		tsunami_machine_check,	max_dma_address:	ALPHA_MAX_DMA_ADDRESS,	min_io_address:		DEFAULT_IO_BASE,	min_mem_address:	DEFAULT_MEM_BASE,	nr_irqs:		64,	device_interrupt:	dp264_device_interrupt,	init_arch:		tsunami_init_arch,	init_irq:		clipper_init_irq,	init_rtc:		common_init_rtc,	init_pci:		common_init_pci,	kill_arch:		tsunami_kill_arch,	pci_map_irq:		clipper_map_irq,	pci_swizzle:		common_swizzle,};/* No alpha_mv alias for webbrick/monet/clipper, since we compile them   in unconditionally with DP264; setup_arch knows how to cope.  */

⌨️ 快捷键说明

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