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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pci.c

?? microwindows移植到S3C44B0的源碼
?? C
字號:
/* *	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);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
视频在线观看一区| 狠狠网亚洲精品| 99久久99久久精品免费观看 | 亚洲成人在线免费| 日韩午夜在线播放| 成人白浆超碰人人人人| 亚洲二区在线视频| 国产精品色噜噜| 欧美美女一区二区三区| 国产风韵犹存在线视精品| 亚洲国产精品久久人人爱| 亚洲成人手机在线| 男女视频一区二区| 亚洲一区二区欧美日韩| 国产日韩av一区| 51精品国自产在线| 91国内精品野花午夜精品| 国产一区二区毛片| 日韩 欧美一区二区三区| 亚洲欧美另类综合偷拍| 日本一区二区视频在线| 综合在线观看色| 国产欧美日韩精品在线| **欧美大码日韩| 亚洲欧美自拍偷拍| 亚洲国产成人av好男人在线观看| 三级久久三级久久久| 久久精品噜噜噜成人av农村| 日韩av中文字幕一区二区三区| 久久99精品国产麻豆不卡| 日日噜噜夜夜狠狠视频欧美人 | 51午夜精品国产| 欧美久久久久久久久久| 成人黄色777网| 久久久久久99精品| 精品久久五月天| 亚洲一区二区三区在线播放| 色一情一伦一子一伦一区| 欧美一区二区三区四区久久| 日本一区二区三区高清不卡| 国产成人激情av| 国产精品色哟哟| 91美女片黄在线| 久久久99精品久久| 日本不卡在线视频| 欧美videos中文字幕| 狠狠色丁香九九婷婷综合五月| 精品国产制服丝袜高跟| 亚洲国产成人tv| 91精品国产91热久久久做人人| 午夜久久电影网| 一本到一区二区三区| 亚洲永久精品国产| 日韩欧美视频在线| 日韩成人av影视| 2023国产精品| 久久国产麻豆精品| 日本一区二区三区久久久久久久久不 | 中文字幕中文在线不卡住| 免费高清成人在线| 国产日产欧美一区二区视频| 91美女在线看| 美国十次了思思久久精品导航| 欧美视频中文一区二区三区在线观看 | 青青草97国产精品免费观看 | 国产精品免费视频观看| 在线免费观看日本欧美| 日韩毛片视频在线看| 欧美视频在线不卡| 国产一区在线看| 亚洲精品国产一区二区精华液 | 精品在线免费视频| 国产精品久久久久久久久快鸭 | 宅男在线国产精品| 国产一区二区免费在线| 亚洲第一综合色| 亚洲国产精品成人综合| 床上的激情91.| 国产精品福利电影一区二区三区四区| 色婷婷亚洲婷婷| 国产最新精品精品你懂的| 夜夜操天天操亚洲| 欧美午夜一区二区三区| 国产精品一区免费视频| 国产精品乱码人人做人人爱| 欧美一级黄色大片| 在线观看视频一区二区| 成人国产在线观看| 久久99国产精品久久99果冻传媒| 一区二区国产视频| 国产精品网站在线观看| 欧美xfplay| 日韩午夜精品视频| 欧美三级视频在线播放| 免费看欧美美女黄的网站| 亚洲精品国产a久久久久久 | 欧美日韩一区二区三区不卡| 不卡的电影网站| 国产一区在线观看麻豆| 日韩精品一级二级 | 一色屋精品亚洲香蕉网站| 欧美成人三级电影在线| 欧美群妇大交群中文字幕| 久久99精品国产91久久来源| 亚洲国产精品久久不卡毛片 | av不卡免费电影| 午夜精品久久久久| 亚洲一区在线观看网站| 亚洲视频网在线直播| 欧美激情一区二区三区四区| 久久综合久久综合久久综合| 日韩精品一区二区三区四区视频 | 午夜精品久久久久久久99水蜜桃 | 久久综合九色综合欧美98| 日韩三级在线观看| 欧美一区二区在线免费播放| 欧美老年两性高潮| 777奇米成人网| 3d动漫精品啪啪1区2区免费| 制服丝袜亚洲精品中文字幕| 欧美丰满高潮xxxx喷水动漫| 在线综合视频播放| 精品免费99久久| 久久先锋影音av鲁色资源网| 精品国产一区二区三区不卡| 欧美精品一区二区三区蜜桃| 2019国产精品| 国产精品美女久久久久久久网站| **欧美大码日韩| 一区二区三区精品| 日韩成人精品视频| 国产一二精品视频| 91在线一区二区三区| 欧美撒尿777hd撒尿| 日韩精品一区二区三区视频在线观看| 精品国产乱码久久久久久浪潮| 久久嫩草精品久久久精品 | 久久久久久免费| 中文字幕欧美一区| 亚洲国产精品欧美一二99| 免费成人结看片| 成人激情免费视频| 欧美日韩一区不卡| 久久久美女毛片| 亚洲精品久久7777| 韩国女主播成人在线观看| aaa欧美大片| 制服丝袜日韩国产| 国产免费观看久久| 午夜欧美一区二区三区在线播放| 精品影视av免费| 91小视频在线| 欧美一二三四在线| 国产精品久久三| 三级欧美韩日大片在线看| 国产成人在线色| 欧美美女直播网站| 中文字幕精品三区| 全国精品久久少妇| 99久久亚洲一区二区三区青草| 欧美二区乱c少妇| 国产精品久久久久久久久动漫| 日本美女一区二区三区视频| 成人一道本在线| 日韩午夜精品电影| 亚洲自拍欧美精品| 成人网页在线观看| 日韩欧美国产不卡| 亚洲一区二区在线播放相泽| 国产大陆亚洲精品国产| 欧美人与性动xxxx| 一区二区不卡在线视频 午夜欧美不卡在| 看片的网站亚洲| 欧美人妖巨大在线| 一区二区三区加勒比av| 成人免费视频caoporn| 日韩你懂的在线观看| 亚洲成年人网站在线观看| 99久久免费精品高清特色大片| 久久先锋影音av鲁色资源| 天堂资源在线中文精品| 日本道色综合久久| 18成人在线视频| 不卡在线观看av| 国产日韩视频一区二区三区| 麻豆高清免费国产一区| 欧美日韩在线播放一区| 亚洲黄色小视频| 一本高清dvd不卡在线观看| 国产精品国产a级| 成人免费视频一区| 中文一区在线播放| 成人午夜在线播放| 亚洲国产精品激情在线观看| 国产高清亚洲一区| 日本一区二区在线不卡| 国产999精品久久久久久| 欧美无砖专区一中文字| 樱花影视一区二区| 欧洲一区在线观看|