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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? pci.c

?? 根據(jù)添加了fs2410平臺(tái)的arch目錄
?? C
?? 第 1 頁 / 共 3 頁
字號:
	bus = device->bus->number;	dev = PCI_SLOT(device->devfn);	if (pci_range_ck(bus, dev))		return PCIBIOS_DEVICE_NOT_FOUND;	if (bus == 0)		tmp = pci0ReadConfigReg(offset, device);//  if (bus == 1) tmp = pci1ReadConfigReg (offset,device);	if ((offset % 4) == 0)		tmp = (tmp & 0xffffff00) | (val & 0xff);	if ((offset % 4) == 1)		tmp = (tmp & 0xffff00ff) | ((val & 0xff) << 8);	if ((offset % 4) == 2)		tmp = (tmp & 0xff00ffff) | ((val & 0xff) << 16);	if ((offset % 4) == 3)		tmp = (tmp & 0x00ffffff) | ((val & 0xff) << 24);	if (bus == 0)		pci0WriteConfigReg(offset, device, tmp);//  if (bus == 1) pci1WriteConfigReg (offset,device,tmp);	return PCIBIOS_SUCCESSFUL;}static void galileo_pcibios_set_master(struct pci_dev *dev){	u16 cmd;	galileo_pcibios_read_config_word(dev, PCI_COMMAND, &cmd);	cmd |= PCI_COMMAND_MASTER;	galileo_pcibios_write_config_word(dev, PCI_COMMAND, cmd);}/*  Externally-expected functions.  Do not change function names  */int pcibios_enable_resources(struct pci_dev *dev){	u16 cmd, old_cmd;	u8 tmp1;	int idx;	struct resource *r;	galileo_pcibios_read_config_word(dev, PCI_COMMAND, &cmd);	old_cmd = cmd;	for (idx = 0; idx < 6; idx++) {		r = &dev->resource[idx];		if (!r->start && r->end) {			printk(KERN_ERR			       "PCI: Device %s not available because of "			       "resource collisions\n", dev->slot_name);			return -EINVAL;		}		if (r->flags & IORESOURCE_IO)			cmd |= PCI_COMMAND_IO;		if (r->flags & IORESOURCE_MEM)			cmd |= PCI_COMMAND_MEMORY;	}	if (cmd != old_cmd) {		galileo_pcibios_write_config_word(dev, PCI_COMMAND, cmd);	}	/*	 * Let's fix up the latency timer and cache line size here.  Cache	 * line size = 32 bytes / sizeof dword (4) = 8.	 * Latency timer must be > 8.  32 is random but appears to work.	 */	galileo_pcibios_read_config_byte(dev, PCI_CACHE_LINE_SIZE, &tmp1);	if (tmp1 != 8) {		printk(KERN_WARNING "PCI setting cache line size to 8 from "		       "%d\n", tmp1);		galileo_pcibios_write_config_byte(dev, PCI_CACHE_LINE_SIZE,						  8);	}	galileo_pcibios_read_config_byte(dev, PCI_LATENCY_TIMER, &tmp1);	if (tmp1 < 32) {		printk(KERN_WARNING "PCI setting latency timer to 32 from %d\n",		       tmp1);		galileo_pcibios_write_config_byte(dev, PCI_LATENCY_TIMER,						  32);	}	return 0;}int pcibios_enable_device(struct pci_dev *dev){	return pcibios_enable_resources(dev);}void pcibios_update_resource(struct pci_dev *dev, struct resource *root,			     struct resource *res, int resource){	u32 new, check;	int reg;	return;	new = res->start | (res->flags & PCI_REGION_FLAG_MASK);	if (resource < 6) {		reg = PCI_BASE_ADDRESS_0 + 4 * resource;	} else if (resource == PCI_ROM_RESOURCE) {		res->flags |= PCI_ROM_ADDRESS_ENABLE;		reg = dev->rom_base_reg;	} else {		/*		 * Somebody might have asked allocation of a non-standard		 * resource		 */		return;	}	pci_write_config_dword(dev, reg, new);	pci_read_config_dword(dev, reg, &check);	if ((new ^ check) &	    ((new & PCI_BASE_ADDRESS_SPACE_IO) ? PCI_BASE_ADDRESS_IO_MASK :	     PCI_BASE_ADDRESS_MEM_MASK)) {		printk(KERN_ERR "PCI: Error while updating region "		       "%s/%d (%08x != %08x)\n", dev->slot_name, resource,		       new, check);	}}void pcibios_align_resource(void *data, struct resource *res,			    unsigned long size){	struct pci_dev *dev = data;	if (res->flags & IORESOURCE_IO) {		unsigned long start = res->start;		/* We need to avoid collisions with `mirrored' VGA ports		   and other strange ISA hardware, so we always want the		   addresses kilobyte aligned.  */		if (size > 0x100) {			printk(KERN_ERR "PCI: I/O Region %s/%d too large"			       " (%ld bytes)\n", dev->slot_name,			        dev->resource - res, size);		}		start = (start + 1024 - 1) & ~(1024 - 1);		res->start = start;	}}struct pci_ops galileo_pci_ops = {	galileo_pcibios_read_config_byte,	galileo_pcibios_read_config_word,	galileo_pcibios_read_config_dword,	galileo_pcibios_write_config_byte,	galileo_pcibios_write_config_word,	galileo_pcibios_write_config_dword};struct pci_fixup pcibios_fixups[] = {	{0}};void __init pcibios_fixup_bus(struct pci_bus *c){	gt64120_board_pcibios_fixup_bus(c);}/* * This code was derived from Galileo Technology's example * and significantly reworked. * * This is very simple.  It does not scan multiple function devices.  It does * not scan behind bridges.  Those would be simple to implement, but we don't * currently need this. */static void __init scan_and_initialize_pci(void){	struct pci_device pci_devices[MAX_PCI_DEVS];	if (scan_pci_bus(pci_devices)) {		allocate_pci_space(pci_devices);	}}/* * This is your basic PCI scan.  It goes through each slot and checks to * see if there's something that responds.  If so, then get the size and * type of each of the responding BARs.  Save them for later. */static u32 __init scan_pci_bus(struct pci_device *pci_devices){	u32 arrayCounter = 0;	u32 memType;	u32 memSize;	u32 pci_slot, bar;	u32 id;	u32 c18RegValue;	struct pci_dev device;	/*	 * According to PCI REV 2.1 MAX agents on the bus are 21.	 * We don't bother scanning ourselves (slot 0).	 */	for (pci_slot = 1; pci_slot < 22; pci_slot++) {		device.devfn = PCI_DEVFN(pci_slot, 0);		id = pci0ReadConfigReg(PCI_VENDOR_ID, &device);		/*		 *  Check for a PCI Master Abort (nothing responds in the		 * slot)		 */		GT_READ(GT_INTRCAUSE_OFS, &c18RegValue);		/*		 * Clearing bit 18 of in the Cause Register 0xc18 by		 * writting 0.		 */		GT_WRITE(GT_INTRCAUSE_OFS, (c18RegValue & 0xfffbffff));		if ((id != 0xffffffff) && !(c18RegValue & 0x40000)) {			pci_devices[arrayCounter].slot = pci_slot;			for (bar = 0; bar < 6; bar++) {				memType =				    pci0ReadConfigReg(PCI_BASE_ADDRESS_0 +						      (bar * 4), &device);				pci_devices[arrayCounter].BARtype[bar] =				    memType & 1;				pci0WriteConfigReg(PCI_BASE_ADDRESS_0 +						   (bar * 4), &device,						   0xffffffff);				memSize =				    pci0ReadConfigReg(PCI_BASE_ADDRESS_0 +						      (bar * 4), &device);				if (memType & 1) {	/*  IO space  */					pci_devices[arrayCounter].					    BARsize[bar] =					    ~(memSize & 0xfffffffc) + 1;				} else {	/*  memory space */					pci_devices[arrayCounter].					    BARsize[bar] =					    ~(memSize & 0xfffffff0) + 1;				}			}	/*  BAR counter  */			arrayCounter++;		}		/*  found a device  */	} /*  slot counter  */	if (arrayCounter < MAX_PCI_DEVS)		pci_devices[arrayCounter].slot = -1;	return arrayCounter;}#define ALIGN(val,align)        (((val) + ((align) - 1)) & ~((align) - 1))#define MAX(val1, val2) ((val1) > (val2) ? (val1) : (val2))/* * This function goes through the list of devices and allocates the BARs in * either IO or MEM space.  It does it in order of size, which will limit the * amount of fragmentation we have in the IO and MEM spaces. */static void __init allocate_pci_space(struct pci_device *pci_devices){	u32 count, maxcount, bar;	u32 maxSize, maxDevice, maxBAR;	u32 alignto;	u32 base;	u32 pci0_mem_base = pci0GetMemory0Base();	u32 pci0_io_base = pci0GetIOspaceBase();	struct pci_dev device;	/*  How many PCI devices do we have?  */	maxcount = MAX_PCI_DEVS;	for (count = 0; count < MAX_PCI_DEVS; count++) {		if (pci_devices[count].slot == -1) {			maxcount = count;			break;		}	}	do {		/*  Find the largest size BAR we need to allocate  */		maxSize = 0;		for (count = 0; count < maxcount; count++) {			for (bar = 0; bar < 6; bar++) {				if (pci_devices[count].BARsize[bar] >				    maxSize) {					maxSize =					    pci_devices[count].					    BARsize[bar];					maxDevice = count;					maxBAR = bar;				}			}		}		/*		 * We've found the largest BAR.  Allocate it into IO or		 * mem space.  We don't idiot check the bases to make		 * sure they haven't overflowed the current size for that		 * aperture.  		 * Don't bother to enable the device's IO or MEM space here.		 * That will be done in pci_enable_resources if the device is		 * activated by a driver.		 */		if (maxSize) {			device.devfn =			    PCI_DEVFN(pci_devices[maxDevice].slot, 0);			if (pci_devices[maxDevice].BARtype[maxBAR] == 1) {				alignto = MAX(0x1000, maxSize);				base = ALIGN(pci0_io_base, alignto);				pci0WriteConfigReg(PCI_BASE_ADDRESS_0 +						   (maxBAR * 4), &device,						   base | 0x1);				pci0_io_base = base + alignto;			} else {				alignto = MAX(0x1000, maxSize);				base = ALIGN(pci0_mem_base, alignto);				pci0WriteConfigReg(PCI_BASE_ADDRESS_0 +						   (maxBAR * 4), &device,						   base);				pci0_mem_base = base + alignto;			}			/*			 * This entry is finished.  Remove it from the list			 * we'll scan.			 */			pci_devices[maxDevice].BARsize[maxBAR] = 0;		}	} while (maxSize);}void __init pcibios_init(void){	u32 tmp;	struct pci_dev controller;	controller.devfn = SELF;	GT_READ(GT_PCI0_CMD_OFS, &tmp);	GT_READ(GT_PCI0_BARE_OFS, &tmp);	/*	 * You have to enable bus mastering to configure any other	 * card on the bus.	 */	tmp = pci0ReadConfigReg(PCI_COMMAND, &controller);	tmp |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_SERR;	pci0WriteConfigReg(PCI_COMMAND, &controller, tmp);	/*  This scans the PCI bus and sets up initial values.  */	scan_and_initialize_pci();	/*	 *  Reset PCI I/O and PCI MEM values to ones supported by EVM.	 */	ioport_resource.start = GT_PCI_IO_BASE;	ioport_resource.end   = GT_PCI_IO_BASE + GT_PCI_IO_SIZE - 1;	iomem_resource.start  = GT_PCI_MEM_BASE;	iomem_resource.end    = GT_PCI_MEM_BASE + GT_PCI_MEM_BASE - 1;	pci_scan_bus(0, &galileo_pci_ops, NULL);}/* * for parsing "pci=" kernel boot arguments. */char *pcibios_setup(char *str){        printk(KERN_INFO "rr: pcibios_setup\n");        /* Nothing to do for now.  */        return str;}unsigned __init int pcibios_assign_all_busses(void){	return 1;}#endif	/* CONFIG_PCI */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人av一区二区三区在线观看| 亚洲黄色片在线观看| 裸体歌舞表演一区二区| 91精品国产入口在线| 老司机午夜精品| 久久色在线视频| 成人福利视频网站| 亚洲精品国产一区二区精华液| 91成人免费在线视频| 天天色 色综合| 337p日本欧洲亚洲大胆精品| 国产精品一区二区无线| 日韩一区在线播放| 欧美三级乱人伦电影| 捆绑调教美女网站视频一区| 国产清纯在线一区二区www| 99国产精品视频免费观看| 亚洲综合色视频| 日韩一级精品视频在线观看| 国产成人在线视频播放| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 亚洲一区二区在线免费看| 欧美美女一区二区| 国产一区在线不卡| 亚洲自拍偷拍麻豆| 久久精品视频一区| 欧美曰成人黄网| 国内久久精品视频| 亚洲猫色日本管| 精品少妇一区二区三区在线视频| 成人午夜私人影院| 日韩国产精品久久| 国产精品国产成人国产三级| 欧美一区三区四区| eeuss鲁一区二区三区| 日韩电影网1区2区| 综合久久国产九一剧情麻豆| 精品成人一区二区| 欧美日韩一区在线观看| 国产福利精品一区二区| 视频在线观看一区| 中文字幕亚洲成人| 亚洲精品成人在线| wwwwxxxxx欧美| 欧美日本高清视频在线观看| 成人久久久精品乱码一区二区三区 | 国产精品白丝jk黑袜喷水| 一区二区三区欧美日韩| 国产偷国产偷精品高清尤物| 3d动漫精品啪啪1区2区免费 | 一区二区三区视频在线观看| 久久只精品国产| 欧美一卡在线观看| 欧美日韩在线综合| 91偷拍与自偷拍精品| 成人国产精品视频| 国产精品自在在线| 国内精品免费在线观看| 青青国产91久久久久久| 亚洲成人手机在线| 亚洲午夜久久久| 一区二区三国产精华液| 亚洲精品欧美专区| 亚洲黄色小说网站| 亚洲乱码国产乱码精品精的特点| 国产调教视频一区| 国产无一区二区| 久久色在线观看| 久久亚洲二区三区| 久久女同性恋中文字幕| 精品人伦一区二区色婷婷| 日韩欧美一级二级三级久久久| 欧美日韩免费视频| 欧美乱妇一区二区三区不卡视频| 欧美亚洲另类激情小说| 欧洲亚洲国产日韩| 欧美午夜视频网站| 欧美久久一二区| 4hu四虎永久在线影院成人| 91精品国产综合久久久久久久| 欧美一区二区在线免费播放| 制服丝袜激情欧洲亚洲| 欧美va亚洲va在线观看蝴蝶网| 日韩精品一区二区三区在线观看| 精品国产一区久久| 国产日韩成人精品| 国产精品久久久久婷婷二区次| 中文字幕亚洲不卡| 亚洲图片欧美综合| 秋霞电影网一区二区| 国产美女在线观看一区| 成人午夜伦理影院| 欧洲中文字幕精品| 欧美va日韩va| 国产精品不卡在线观看| 亚洲综合在线视频| 久久精品国内一区二区三区| 粉嫩aⅴ一区二区三区四区五区| 不卡av免费在线观看| 国产无遮挡一区二区三区毛片日本| 亚洲国产成人一区二区三区| 国产精品久久久久久久蜜臀| 一个色在线综合| 一区二区三区欧美日韩| 美女视频黄 久久| av中文字幕亚洲| 91精品国产综合久久久久久| 久久久久久久久久久99999| 亚洲视频图片小说| 日本美女视频一区二区| 国产成人免费视| 欧美色男人天堂| 久久综合久色欧美综合狠狠| 1024成人网色www| 裸体一区二区三区| 成人激情免费视频| 欧美一区二区三级| 亚洲视频 欧洲视频| 久久精品99国产精品日本| 91色视频在线| 日韩精品资源二区在线| 亚洲综合成人在线视频| 国产精品一区二区x88av| 欧美精品一二三区| 最好看的中文字幕久久| 精品一区二区三区免费毛片爱 | 麻豆一区二区三区| 91蝌蚪porny九色| 日韩美女主播在线视频一区二区三区| 国产日韩欧美精品在线| 婷婷国产v国产偷v亚洲高清| 成人av集中营| 精品福利一二区| 天堂av在线一区| 一本久久综合亚洲鲁鲁五月天| 精品国产伦理网| 丝袜亚洲另类丝袜在线| 色综合天天综合网天天看片| 久久久久久久av麻豆果冻| 丝袜美腿高跟呻吟高潮一区| 日本福利一区二区| 日本不卡视频在线| 欧美在线免费播放| 国产精品久久久久久久久免费相片| 美女精品一区二区| 欧美日本视频在线| 亚洲成精国产精品女| 91免费看片在线观看| 亚洲欧洲一区二区三区| 国产精品一区二区不卡| 精品99一区二区| 国内不卡的二区三区中文字幕 | 成人高清免费观看| 国产网红主播福利一区二区| 国产综合色视频| 久久综合色鬼综合色| 国产原创一区二区| 欧美精品一区二区三区四区| 美腿丝袜亚洲色图| 欧美一区二区三区小说| 免费在线一区观看| 日韩欧美国产成人一区二区| 青青草国产精品97视觉盛宴| 欧美疯狂性受xxxxx喷水图片| 亚洲成av人片一区二区三区| 欧美三级在线播放| 视频在线观看一区| 日韩午夜中文字幕| 国产自产2019最新不卡| 国产亚洲欧美日韩日本| 粉嫩aⅴ一区二区三区四区| 国产精品麻豆99久久久久久| www.日韩精品| 亚洲综合在线电影| 这里只有精品99re| 激情伊人五月天久久综合| 亚洲国产成人精品视频| 欧美精品一二三| 久久机这里只有精品| www久久精品| eeuss鲁片一区二区三区 | 欧美综合视频在线观看| 亚洲狠狠爱一区二区三区| 91麻豆精品国产91久久久更新时间| 毛片一区二区三区| 欧美激情在线观看视频免费| 色94色欧美sute亚洲线路一ni| 亚洲国产精品麻豆| 日韩欧美一区二区视频| 国产99久久久久| 亚洲最大色网站| 精品国偷自产国产一区| 99在线视频精品| 亚洲高清视频中文字幕| 26uuu色噜噜精品一区二区| 成人a区在线观看| 亚洲成人av中文| 欧美国产精品中文字幕| 欧美三级视频在线观看| 国产精品99久久不卡二区|