亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? pci.c

?? 移植到2410開(kāi)發(fā)板上的源代碼
?? C
字號(hào):
/* *	linux/arch/alpha/kernel/pci.c * * Extruded from code written by *	Dave Rusling (david.rusling@reo.mts.dec.com) *	David Mosberger (davidm@cs.arizona.edu) *//* 2.3.x PCI/resources, 1999 Andrea Arcangeli <andrea@suse.de> *//* * Nov 2000, Ivan Kokshaysky <ink@jurassic.park.msu.ru> *	     PCI-PCI bridges cleanup */#include <linux/string.h>#include <linux/pci.h>#include <linux/init.h>#include <linux/ioport.h>#include <linux/kernel.h>#include <linux/bootmem.h>#include <asm/machvec.h>#include "proto.h"#include "pci_impl.h"/* * Some string constants used by the various core logics.  */const char *const pci_io_names[] = {  "PCI IO bus 0", "PCI IO bus 1", "PCI IO bus 2", "PCI IO bus 3",  "PCI IO bus 4", "PCI IO bus 5", "PCI IO bus 6", "PCI IO bus 7"};const char *const pci_mem_names[] = {  "PCI mem bus 0", "PCI mem bus 1", "PCI mem bus 2", "PCI mem bus 3",  "PCI mem bus 4", "PCI mem bus 5", "PCI mem bus 6", "PCI mem bus 7"};const char pci_hae0_name[] = "HAE0";/* * The PCI controller list. */struct pci_controller *hose_head, **hose_tail = &hose_head;struct pci_controller *pci_isa_hose;/* * Quirks. */static void __initquirk_eisa_bridge(struct pci_dev *dev){	dev->class = PCI_CLASS_BRIDGE_EISA << 8;}static void __initquirk_isa_bridge(struct pci_dev *dev){	dev->class = PCI_CLASS_BRIDGE_ISA << 8;}static void __initquirk_ali_ide_ports(struct pci_dev *dev){	if (dev->resource[0].end == 0xffff)		dev->resource[0].end = dev->resource[0].start + 7;	if (dev->resource[2].end == 0xffff)		dev->resource[2].end = dev->resource[2].start + 7;	if (dev->resource[3].end == 0xffff)		dev->resource[3].end = dev->resource[3].start + 7;}static void __initquirk_cypress(struct pci_dev *dev){	/* The Notorious Cy82C693 chip.  */	/* The Cypress IDE controller doesn't support native mode, but it	   has programmable addresses of IDE command/control registers.	   This violates PCI specifications, confuses the IDE subsystem and	   causes resource conflicts between the primary HD_CMD register and	   the floppy controller.  Ugh.  Fix that.  */	if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE) {		dev->resource[0].flags = 0;		dev->resource[1].flags = 0;	}	/* The Cypress bridge responds on the PCI bus in the address range	   0xffff0000-0xffffffff (conventional x86 BIOS ROM).  There is no	   way to turn this off.  The bridge also supports several extended	   BIOS ranges (disabled after power-up), and some consoles do turn	   them on.  So if we use a large direct-map window, or a large SG	   window, we must avoid entire 0xfff00000-0xffffffff region.  */	else if (dev->class >> 8 == PCI_CLASS_BRIDGE_ISA) {		if (__direct_map_base + __direct_map_size >= 0xfff00000)			__direct_map_size = 0xfff00000 - __direct_map_base;		else {			struct pci_controller *hose = dev->sysdata;			struct pci_iommu_arena *pci = hose->sg_pci;			if (pci && pci->dma_base + pci->size >= 0xfff00000)				pci->size = 0xfff00000 - pci->dma_base;		}	}}struct pci_fixup pcibios_fixups[] __initdata = {	{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82375,	  quirk_eisa_bridge },	{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378,	  quirk_isa_bridge },	{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5229,	  quirk_ali_ide_ports },	{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693,	  quirk_cypress },	{ 0 }};#define MAX(val1, val2)		((val1) > (val2) ? (val1) : (val2))#define ALIGN(val,align)	(((val) + ((align) - 1)) & ~((align) - 1))#define KB			1024#define MB			(1024*KB)#define GB			(1024*MB)voidpcibios_align_resource(void *data, struct resource *res, unsigned long size){	struct pci_dev *dev = data;	struct pci_controller *hose = dev->sysdata;	unsigned long alignto;	unsigned long start = res->start;	if (res->flags & IORESOURCE_IO) {		/* Make sure we start at our min on all hoses */		if (start - hose->io_space->start < PCIBIOS_MIN_IO)			start = PCIBIOS_MIN_IO + hose->io_space->start;		/*		 * Put everything into 0x00-0xff region modulo 0x400		 */		if (start & 0x300)			start = (start + 0x3ff) & ~0x3ff;	}	else if	(res->flags & IORESOURCE_MEM) {		/* Make sure we start at our min on all hoses */		if (start - hose->mem_space->start < PCIBIOS_MIN_MEM)			start = PCIBIOS_MIN_MEM + hose->mem_space->start;		/*		 * The following holds at least for the Low Cost		 * Alpha implementation of the PCI interface:		 *		 * In sparse memory address space, the first		 * octant (16MB) of every 128MB segment is		 * aliased to the very first 16 MB of the		 * address space (i.e., it aliases the ISA		 * memory address space).  Thus, we try to		 * avoid allocating PCI devices in that range.		 * Can be allocated in 2nd-7th octant only.		 * Devices that need more than 112MB of		 * address space must be accessed through		 * dense memory space only!		 */		/* Align to multiple of size of minimum base.  */		alignto = MAX(0x1000, size);		start = ALIGN(start, alignto);		if (hose->sparse_mem_base && size <= 7 * 16*MB) {			if (((start / (16*MB)) & 0x7) == 0) {				start &= ~(128*MB - 1);				start += 16*MB;				start  = ALIGN(start, alignto);			}			if (start/(128*MB) != (start + size - 1)/(128*MB)) {				start &= ~(128*MB - 1);				start += (128 + 16)*MB;				start  = ALIGN(start, alignto);			}		}	}	res->start = start;}#undef MAX#undef ALIGN#undef KB#undef MB#undef GBvoid __initpcibios_init(void){	if (!alpha_mv.init_pci)		return;	alpha_mv.init_pci();}char * __initpcibios_setup(char *str){	return str;}void __initpcibios_fixup_resource(struct resource *res, struct resource *root){	res->start += root->start;	res->end += root->start;}void __initpcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus){	/* Update device resources.  */	struct pci_controller *hose = (struct pci_controller *)bus->sysdata;	int i;	for (i = 0; i < PCI_NUM_RESOURCES; i++) {		if (!dev->resource[i].start)			continue;		if (dev->resource[i].flags & IORESOURCE_IO)			pcibios_fixup_resource(&dev->resource[i],					       hose->io_space);		else if (dev->resource[i].flags & IORESOURCE_MEM)			pcibios_fixup_resource(&dev->resource[i],					       hose->mem_space);	}}void __initpcibios_fixup_bus(struct pci_bus *bus){	/* Propogate hose info into the subordinate devices.  */	struct pci_controller *hose = bus->sysdata;	struct list_head *ln;	struct pci_dev *dev = bus->self;	if (!dev) {		/* Root bus */		bus->resource[0] = hose->io_space;		bus->resource[1] = hose->mem_space;	} else {		/* This is a bridge. Do not care how it's initialized,		   just link its resources to the bus ones */		int i;		for(i=0; i<3; i++) {			bus->resource[i] =				&dev->resource[PCI_BRIDGE_RESOURCES+i];			bus->resource[i]->name = bus->name;		}		bus->resource[0]->flags |= pci_bridge_check_io(dev);		bus->resource[1]->flags |= IORESOURCE_MEM;		/* For now, propogate hose limits to the bus;		   we'll adjust them later. */		bus->resource[0]->end = hose->io_space->end;		bus->resource[1]->end = hose->mem_space->end;		/* Turn off downstream PF memory address range by default */		bus->resource[2]->start = 1024*1024;		bus->resource[2]->end = bus->resource[2]->start - 1;	}	for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) {		struct pci_dev *dev = pci_dev_b(ln);		if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)			pcibios_fixup_device_resources(dev, bus);	}}voidpcibios_update_resource(struct pci_dev *dev, struct resource *root,			struct resource *res, int resource){	struct pci_controller *hose = dev->sysdata;	int where;	u32 reg;	if (resource < PCI_ROM_RESOURCE) 		where = PCI_BASE_ADDRESS_0 + (resource * 4);	else if (resource == PCI_ROM_RESOURCE)		where = dev->rom_base_reg;	else {		return; /* Don't update non-standard resources here. */	}	/* Point root at the hose root. */	if (res->flags & IORESOURCE_IO)		root = hose->io_space;	if (res->flags & IORESOURCE_MEM)		root = hose->mem_space;	reg = (res->start - root->start) | (res->flags & 0xf);	pci_write_config_dword(dev, where, reg);	if ((res->flags & (PCI_BASE_ADDRESS_SPACE			   | PCI_BASE_ADDRESS_MEM_TYPE_MASK))	    == (PCI_BASE_ADDRESS_SPACE_MEMORY		| PCI_BASE_ADDRESS_MEM_TYPE_64)) {		pci_write_config_dword(dev, where+4, 0);		printk(KERN_WARNING "PCI: dev %s type 64-bit\n", dev->name);	}	/* ??? FIXME -- record old value for shutdown.  */}void __initpcibios_update_irq(struct pci_dev *dev, int irq){	pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);	/* ??? FIXME -- record old value for shutdown.  */}/* Most Alphas have straight-forward swizzling needs.  */u8 __initcommon_swizzle(struct pci_dev *dev, u8 *pinp){	struct pci_controller *hose = dev->sysdata;	if (dev->bus->number != hose->first_busno) {		u8 pin = *pinp;		do {			pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn));			/* Move up the chain of bridges. */			dev = dev->bus->self;		} while (dev->bus->self);		*pinp = pin;		/* The slot is the slot of the last bridge. */	}	return PCI_SLOT(dev->devfn);}void __initpcibios_fixup_pbus_ranges(struct pci_bus * bus,			  struct pbus_set_ranges_data * ranges){	struct pci_controller *hose = (struct pci_controller *)bus->sysdata;	ranges->io_start -= hose->io_space->start;	ranges->io_end -= hose->io_space->start;	ranges->mem_start -= hose->mem_space->start;	ranges->mem_end -= hose->mem_space->start;}intpcibios_enable_device(struct pci_dev *dev){	/* Nothing to do, since we enable all devices at startup.  */	return 0;}/* *  If we set up a device for bus mastering, we need to check the latency *  timer as certain firmware forgets to set it properly, as seen *  on SX164 and LX164 with SRM. */voidpcibios_set_master(struct pci_dev *dev){	u8 lat;	pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);	if (lat >= 16) return;	printk("PCI: Setting latency timer of device %s to 64\n",							dev->slot_name);	pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64);}void __initcommon_init_pci(void){	struct pci_controller *hose;	struct pci_bus *bus;	int next_busno;	/* Scan all of the recorded PCI controllers.  */	for (next_busno = 0, hose = hose_head; hose; hose = hose->next) {		hose->first_busno = next_busno;		hose->last_busno = 0xff;		bus = pci_scan_bus(next_busno, alpha_mv.pci_ops, hose);		hose->bus = bus;		next_busno = hose->last_busno = bus->subordinate;		next_busno += 1;	}	pci_assign_unassigned_resources();	pci_fixup_irqs(alpha_mv.pci_swizzle, alpha_mv.pci_map_irq);}struct pci_controller * __initalloc_pci_controller(void){	struct pci_controller *hose;	hose = alloc_bootmem(sizeof(*hose));	*hose_tail = hose;	hose_tail = &hose->next;	return hose;}struct resource * __initalloc_resource(void){	struct resource *res;	res = alloc_bootmem(sizeof(*res));	return res;}/* Provide information on locations of various I/O regions in physical   memory.  Do this on a per-card basis so that we choose the right hose.  */asmlinkage longsys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn){	struct pci_controller *hose;	struct pci_dev *dev;	/* from hose or from bus.devfn */	if (which & IOBASE_FROM_HOSE) {		for(hose = hose_head; hose; hose = hose->next) 			if (hose->index == bus) break;		if (!hose) return -ENODEV;	} else {		/* Special hook for ISA access.  */		if (bus == 0 && dfn == 0) {			hose = pci_isa_hose;		} else {			dev = pci_find_slot(bus, dfn);			if (!dev)				return -ENODEV;			hose = dev->sysdata;		}	}	switch (which & ~IOBASE_FROM_HOSE) {	case IOBASE_HOSE:		return hose->index;	case IOBASE_SPARSE_MEM:		return hose->sparse_mem_base;	case IOBASE_DENSE_MEM:		return hose->dense_mem_base;	case IOBASE_SPARSE_IO:		return hose->sparse_io_base;	case IOBASE_DENSE_IO:		return hose->dense_io_base;	case IOBASE_ROOT_BUS:		return hose->bus->number;	}	return -EOPNOTSUPP;}/* Return the index of the PCI controller for device PDEV. */intpci_controller_num(struct pci_dev *pdev){        struct pci_controller *hose = pdev->sysdata;	return (hose ? hose->index : -ENXIO);}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费的成人av| 日韩欧美国产一区二区在线播放| 国产成人精品免费看| 国产美女娇喘av呻吟久久| 捆绑调教美女网站视频一区| 日韩在线a电影| 青青草原综合久久大伊人精品| 日本不卡一区二区| 免费看精品久久片| 国产精品一区久久久久| 成人综合婷婷国产精品久久| 成人久久18免费网站麻豆| 成人白浆超碰人人人人| 97精品视频在线观看自产线路二| 99精品视频在线观看免费| 色哟哟日韩精品| 欧美色图免费看| 日韩一区二区三区高清免费看看| 精品美女在线观看| 国产日韩欧美高清| 亚洲免费在线电影| 三级一区在线视频先锋| 国产专区欧美精品| aaa亚洲精品| 欧美夫妻性生活| 日韩欧美在线影院| 国产日产精品1区| 亚洲免费在线视频一区 二区| 日韩精品一二区| 国产一区二区三区国产| a亚洲天堂av| 欧美日韩国产一级片| 久久综合给合久久狠狠狠97色69| 国产精品久久久久毛片软件| 夜夜精品视频一区二区| 麻豆精品新av中文字幕| 成人永久看片免费视频天堂| 欧美亚洲一区二区在线| 精品久久久久久久久久久久久久久 | 成人国产精品免费| 精品污污网站免费看| 精品粉嫩超白一线天av| 亚洲欧美国产毛片在线| 麻豆91在线播放| 91丝袜美女网| 精品粉嫩超白一线天av| 一区二区三区在线不卡| 久久99精品久久久| 91国产丝袜在线播放| 欧美成人r级一区二区三区| 国产精品久久久久久久久图文区| 亚洲v精品v日韩v欧美v专区| 国产精品一级黄| 717成人午夜免费福利电影| 欧美国产成人精品| 日韩va亚洲va欧美va久久| 成人福利电影精品一区二区在线观看| 9191久久久久久久久久久| 国产精品无人区| 久久99国内精品| 欧美亚一区二区| 亚洲国产精品av| 日韩av一二三| 色8久久人人97超碰香蕉987| 久久综合久久综合九色| 亚洲成人动漫在线观看| 91在线视频网址| 久久精品欧美日韩| 国产iv一区二区三区| 国产区在线观看成人精品| 亚洲欧美经典视频| 精品一区二区三区视频在线观看| 欧美主播一区二区三区| 国产精品―色哟哟| 极品美女销魂一区二区三区免费 | 欧美三电影在线| 国产精品久久久久婷婷 | 久久婷婷久久一区二区三区| 五月激情综合婷婷| 欧美亚洲自拍偷拍| 亚洲色欲色欲www| 成人av午夜电影| 国产午夜精品福利| 久久99国内精品| 日韩欧美一区在线| 午夜精品福利一区二区三区av | 91精品综合久久久久久| 亚洲一区二区三区四区在线免费观看 | 久久国产免费看| 91精品国产91久久综合桃花| 亚洲一区二区在线视频| 91老师国产黑色丝袜在线| 国产精品久久久久久久午夜片| 国产成人综合网站| 久久久久久一二三区| 国产一区91精品张津瑜| 久久免费偷拍视频| 国产精品99久久久| 中国色在线观看另类| 成人一区二区三区在线观看| 国产欧美日韩麻豆91| 国产69精品久久99不卡| 国产精品理伦片| 91影院在线观看| 亚洲天天做日日做天天谢日日欢 | 欧美性高清videossexo| 亚洲成人免费看| 欧美精品黑人性xxxx| 日韩福利电影在线观看| 日韩一区二区在线免费观看| 紧缚奴在线一区二区三区| 久久男人中文字幕资源站| 国产成+人+日韩+欧美+亚洲 | 大桥未久av一区二区三区中文| 国产亲近乱来精品视频| 99久久99久久综合| 亚洲黄色性网站| 91精品国产91热久久久做人人| 麻豆精品国产传媒mv男同| 久久综合久久综合久久综合| 成人免费高清在线| 亚洲老妇xxxxxx| 欧美精品色一区二区三区| 麻豆成人91精品二区三区| 久久影院视频免费| 不卡的av电影| 一区二区三区不卡视频在线观看 | 亚洲色图都市小说| 欧美精品一卡二卡| 国产精品一区二区在线观看网站| 日韩一区有码在线| 欧美日韩夫妻久久| 黑人巨大精品欧美一区| 中文字幕在线不卡国产视频| 欧美无砖砖区免费| 韩国v欧美v亚洲v日本v| 亚洲蜜臀av乱码久久精品| 欧美一级片免费看| 国产成人综合网| 亚洲国产精品一区二区久久| 久久综合色一综合色88| 色88888久久久久久影院按摩| 秋霞av亚洲一区二区三| 中文在线一区二区| 欧美电影一区二区三区| 国产福利一区二区三区视频在线| 亚洲精品菠萝久久久久久久| 911精品产国品一二三产区| 成人久久视频在线观看| 奇米精品一区二区三区四区| 中文字幕亚洲精品在线观看| 欧美一区日本一区韩国一区| 成人一级黄色片| 日韩av中文字幕一区二区三区| 欧美国产综合色视频| 欧美一区三区四区| 色综合久久久久| 国产精品亚洲人在线观看| 午夜精品一区在线观看| 欧美国产综合一区二区| 日韩一卡二卡三卡四卡| 色av成人天堂桃色av| 国产精品亚洲专一区二区三区| 天天色综合天天| 中文字幕综合网| 亚洲精品在线一区二区| 欧美日韩精品一区二区三区蜜桃 | 精品福利一二区| 欧美色国产精品| heyzo一本久久综合| 狠狠色综合播放一区二区| 亚洲va欧美va天堂v国产综合| 国产精品美女一区二区三区| 日韩欧美三级在线| 欧美视频一二三区| 99久久国产综合精品女不卡| 国产一区二区三区精品欧美日韩一区二区三区 | 欧美色欧美亚洲另类二区| 成人h动漫精品一区二区| 久久成人久久鬼色| 天天射综合影视| 亚洲午夜羞羞片| 一区二区三区小说| 国产精品精品国产色婷婷| 国产日韩欧美电影| 久久久欧美精品sm网站| 精品国产伦一区二区三区观看体验 | 51午夜精品国产| 欧美绝品在线观看成人午夜影视| 一本色道a无线码一区v| 成人av电影在线网| 成人免费视频一区| 成人激情动漫在线观看| 国产成人8x视频一区二区 | 日韩精品一区二区三区视频| 欧美日韩国产123区| 欧美精品免费视频| 欧美视频精品在线| 欧美日韩国产综合一区二区| 欧美午夜精品一区二区三区|