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

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

?? docprobe.c

?? LINUX 2.6.17.4的源碼
?? C
字號:
/* Linux driver for Disk-On-Chip devices			*//* Probe routines common to all DoC devices			*//* (C) 1999 Machine Vision Holdings, Inc.			*//* (C) 1999-2003 David Woodhouse <dwmw2@infradead.org>		*//* $Id: docprobe.c,v 1.46 2005/11/07 11:14:25 gleixner Exp $	*//* DOC_PASSIVE_PROBE:   In order to ensure that the BIOS checksum is correct at boot time, and   hence that the onboard BIOS extension gets executed, the DiskOnChip   goes into reset mode when it is read sequentially: all registers   return 0xff until the chip is woken up again by writing to the   DOCControl register.   Unfortunately, this means that the probe for the DiskOnChip is unsafe,   because one of the first things it does is write to where it thinks   the DOCControl register should be - which may well be shared memory   for another device. I've had machines which lock up when this is   attempted. Hence the possibility to do a passive probe, which will fail   to detect a chip in reset mode, but is at least guaranteed not to lock   the machine.   If you have this problem, uncomment the following line:#define DOC_PASSIVE_PROBE*//* DOC_SINGLE_DRIVER:   Millennium driver has been merged into DOC2000 driver.   The old Millennium-only driver has been retained just in case there   are problems with the new code. If the combined driver doesn't work   for you, you can try the old one by undefining DOC_SINGLE_DRIVER   below and also enabling it in your configuration. If this fixes the   problems, please send a report to the MTD mailing list at   <linux-mtd@lists.infradead.org>.*/#define DOC_SINGLE_DRIVER#include <linux/config.h>#include <linux/kernel.h>#include <linux/module.h>#include <asm/errno.h>#include <asm/io.h>#include <linux/delay.h>#include <linux/slab.h>#include <linux/init.h>#include <linux/types.h>#include <linux/mtd/mtd.h>#include <linux/mtd/nand.h>#include <linux/mtd/doc2000.h>#include <linux/mtd/compatmac.h>/* Where to look for the devices? */#ifndef CONFIG_MTD_DOCPROBE_ADDRESS#define CONFIG_MTD_DOCPROBE_ADDRESS 0#endifstatic unsigned long doc_config_location = CONFIG_MTD_DOCPROBE_ADDRESS;module_param(doc_config_location, ulong, 0);MODULE_PARM_DESC(doc_config_location, "Physical memory address at which to probe for DiskOnChip");static unsigned long __initdata doc_locations[] = {#if defined (__alpha__) || defined(__i386__) || defined(__x86_64__)#ifdef CONFIG_MTD_DOCPROBE_HIGH	0xfffc8000, 0xfffca000, 0xfffcc000, 0xfffce000,	0xfffd0000, 0xfffd2000, 0xfffd4000, 0xfffd6000,	0xfffd8000, 0xfffda000, 0xfffdc000, 0xfffde000,	0xfffe0000, 0xfffe2000, 0xfffe4000, 0xfffe6000,	0xfffe8000, 0xfffea000, 0xfffec000, 0xfffee000,#else /*  CONFIG_MTD_DOCPROBE_HIGH */	0xc8000, 0xca000, 0xcc000, 0xce000,	0xd0000, 0xd2000, 0xd4000, 0xd6000,	0xd8000, 0xda000, 0xdc000, 0xde000,	0xe0000, 0xe2000, 0xe4000, 0xe6000,	0xe8000, 0xea000, 0xec000, 0xee000,#endif /*  CONFIG_MTD_DOCPROBE_HIGH */#elif defined(__PPC__)	0xe4000000,#elif defined(CONFIG_MOMENCO_OCELOT)	0x2f000000,        0xff000000,#elif defined(CONFIG_MOMENCO_OCELOT_G) || defined (CONFIG_MOMENCO_OCELOT_C)        0xff000000,##else#warning Unknown architecture for DiskOnChip. No default probe locations defined#endif	0xffffffff };/* doccheck: Probe a given memory window to see if there's a DiskOnChip present */static inline int __init doccheck(void __iomem *potential, unsigned long physadr){	void __iomem *window=potential;	unsigned char tmp, tmpb, tmpc, ChipID;#ifndef DOC_PASSIVE_PROBE	unsigned char tmp2;#endif	/* Routine copied from the Linux DOC driver */#ifdef CONFIG_MTD_DOCPROBE_55AA	/* Check for 0x55 0xAA signature at beginning of window,	   this is no longer true once we remove the IPL (for Millennium */	if (ReadDOC(window, Sig1) != 0x55 || ReadDOC(window, Sig2) != 0xaa)		return 0;#endif /* CONFIG_MTD_DOCPROBE_55AA */#ifndef DOC_PASSIVE_PROBE	/* It's not possible to cleanly detect the DiskOnChip - the	 * bootup procedure will put the device into reset mode, and	 * it's not possible to talk to it without actually writing	 * to the DOCControl register. So we store the current contents	 * of the DOCControl register's location, in case we later decide	 * that it's not a DiskOnChip, and want to put it back how we	 * found it.	 */	tmp2 = ReadDOC(window, DOCControl);	/* Reset the DiskOnChip ASIC */	WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_RESET,		 window, DOCControl);	WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_RESET,		 window, DOCControl);	/* Enable the DiskOnChip ASIC */	WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_NORMAL,		 window, DOCControl);	WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_NORMAL,		 window, DOCControl);#endif /* !DOC_PASSIVE_PROBE */	/* We need to read the ChipID register four times. For some	   newer DiskOnChip 2000 units, the first three reads will	   return the DiskOnChip Millennium ident. Don't ask. */	ChipID = ReadDOC(window, ChipID);	switch (ChipID) {	case DOC_ChipID_Doc2k:		/* Check the TOGGLE bit in the ECC register */		tmp  = ReadDOC(window, 2k_ECCStatus) & DOC_TOGGLE_BIT;		tmpb = ReadDOC(window, 2k_ECCStatus) & DOC_TOGGLE_BIT;		tmpc = ReadDOC(window, 2k_ECCStatus) & DOC_TOGGLE_BIT;		if (tmp != tmpb && tmp == tmpc)				return ChipID;		break;	case DOC_ChipID_DocMil:		/* Check for the new 2000 with Millennium ASIC */		ReadDOC(window, ChipID);		ReadDOC(window, ChipID);		if (ReadDOC(window, ChipID) != DOC_ChipID_DocMil)			ChipID = DOC_ChipID_Doc2kTSOP;		/* Check the TOGGLE bit in the ECC register */		tmp  = ReadDOC(window, ECCConf) & DOC_TOGGLE_BIT;		tmpb = ReadDOC(window, ECCConf) & DOC_TOGGLE_BIT;		tmpc = ReadDOC(window, ECCConf) & DOC_TOGGLE_BIT;		if (tmp != tmpb && tmp == tmpc)				return ChipID;		break;	case DOC_ChipID_DocMilPlus16:	case DOC_ChipID_DocMilPlus32:	case 0:		/* Possible Millennium+, need to do more checks */#ifndef DOC_PASSIVE_PROBE		/* Possibly release from power down mode */		for (tmp = 0; (tmp < 4); tmp++)			ReadDOC(window, Mplus_Power);		/* Reset the DiskOnChip ASIC */		tmp = DOC_MODE_RESET | DOC_MODE_MDWREN | DOC_MODE_RST_LAT |			DOC_MODE_BDECT;		WriteDOC(tmp, window, Mplus_DOCControl);		WriteDOC(~tmp, window, Mplus_CtrlConfirm);		mdelay(1);		/* Enable the DiskOnChip ASIC */		tmp = DOC_MODE_NORMAL | DOC_MODE_MDWREN | DOC_MODE_RST_LAT |			DOC_MODE_BDECT;		WriteDOC(tmp, window, Mplus_DOCControl);		WriteDOC(~tmp, window, Mplus_CtrlConfirm);		mdelay(1);#endif /* !DOC_PASSIVE_PROBE */		ChipID = ReadDOC(window, ChipID);		switch (ChipID) {		case DOC_ChipID_DocMilPlus16:		case DOC_ChipID_DocMilPlus32:			/* Check the TOGGLE bit in the toggle register */			tmp  = ReadDOC(window, Mplus_Toggle) & DOC_TOGGLE_BIT;			tmpb = ReadDOC(window, Mplus_Toggle) & DOC_TOGGLE_BIT;			tmpc = ReadDOC(window, Mplus_Toggle) & DOC_TOGGLE_BIT;			if (tmp != tmpb && tmp == tmpc)					return ChipID;		default:			break;		}		/* FALL TRHU */	default:#ifdef CONFIG_MTD_DOCPROBE_55AA		printk(KERN_DEBUG "Possible DiskOnChip with unknown ChipID %2.2X found at 0x%lx\n",		       ChipID, physadr);#endif#ifndef DOC_PASSIVE_PROBE		/* Put back the contents of the DOCControl register, in case it's not		 * actually a DiskOnChip.		 */		WriteDOC(tmp2, window, DOCControl);#endif		return 0;	}	printk(KERN_WARNING "DiskOnChip failed TOGGLE test, dropping.\n");#ifndef DOC_PASSIVE_PROBE	/* Put back the contents of the DOCControl register: it's not a DiskOnChip */	WriteDOC(tmp2, window, DOCControl);#endif	return 0;}static int docfound;static void __init DoC_Probe(unsigned long physadr){	void __iomem *docptr;	struct DiskOnChip *this;	struct mtd_info *mtd;	int ChipID;	char namebuf[15];	char *name = namebuf;	char *im_funcname = NULL;	char *im_modname = NULL;	void (*initroutine)(struct mtd_info *) = NULL;	docptr = ioremap(physadr, DOC_IOREMAP_LEN);	if (!docptr)		return;	if ((ChipID = doccheck(docptr, physadr))) {		if (ChipID == DOC_ChipID_Doc2kTSOP) {			/* Remove this at your own peril. The hardware driver works but nothing prevents you from erasing bad blocks */			printk(KERN_NOTICE "Refusing to drive DiskOnChip 2000 TSOP until Bad Block Table is correctly supported by INFTL\n");			iounmap(docptr);			return;		}		docfound = 1;		mtd = kmalloc(sizeof(struct DiskOnChip) + sizeof(struct mtd_info), GFP_KERNEL);		if (!mtd) {			printk(KERN_WARNING "Cannot allocate memory for data structures. Dropping.\n");			iounmap(docptr);			return;		}		this = (struct DiskOnChip *)(&mtd[1]);		memset((char *)mtd,0, sizeof(struct mtd_info));		memset((char *)this, 0, sizeof(struct DiskOnChip));		mtd->priv = this;		this->virtadr = docptr;		this->physadr = physadr;		this->ChipID = ChipID;		sprintf(namebuf, "with ChipID %2.2X", ChipID);		switch(ChipID) {		case DOC_ChipID_Doc2kTSOP:			name="2000 TSOP";			im_funcname = "DoC2k_init";			im_modname = "doc2000";			break;		case DOC_ChipID_Doc2k:			name="2000";			im_funcname = "DoC2k_init";			im_modname = "doc2000";			break;		case DOC_ChipID_DocMil:			name="Millennium";#ifdef DOC_SINGLE_DRIVER			im_funcname = "DoC2k_init";			im_modname = "doc2000";#else			im_funcname = "DoCMil_init";			im_modname = "doc2001";#endif /* DOC_SINGLE_DRIVER */			break;		case DOC_ChipID_DocMilPlus16:		case DOC_ChipID_DocMilPlus32:			name="MillenniumPlus";			im_funcname = "DoCMilPlus_init";			im_modname = "doc2001plus";			break;		}		if (im_funcname)			initroutine = inter_module_get_request(im_funcname, im_modname);		if (initroutine) {			(*initroutine)(mtd);			inter_module_put(im_funcname);			return;		}		printk(KERN_NOTICE "Cannot find driver for DiskOnChip %s at 0x%lX\n", name, physadr);		kfree(mtd);	}	iounmap(docptr);}/**************************************************************************** * * Module stuff * ****************************************************************************/static int __init init_doc(void){	int i;	if (doc_config_location) {		printk(KERN_INFO "Using configured DiskOnChip probe address 0x%lx\n", doc_config_location);		DoC_Probe(doc_config_location);	} else {		for (i=0; (doc_locations[i] != 0xffffffff); i++) {			DoC_Probe(doc_locations[i]);		}	}	/* No banner message any more. Print a message if no DiskOnChip	   found, so the user knows we at least tried. */	if (!docfound)		printk(KERN_INFO "No recognised DiskOnChip devices found\n");	return -EAGAIN;}module_init(init_doc);MODULE_LICENSE("GPL");MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");MODULE_DESCRIPTION("Probe code for DiskOnChip 2000 and Millennium devices");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜芽一区二区三区| 洋洋av久久久久久久一区| 欧美综合亚洲图片综合区| 国产成人午夜精品5599| 精品一区免费av| 国产真实乱偷精品视频免| 麻豆久久久久久久| 久久99久久99小草精品免视看| 日韩精品一区第一页| 日本午夜一本久久久综合| 麻豆精品视频在线观看视频| 麻豆久久一区二区| 大桥未久av一区二区三区中文| 成人综合在线观看| 日本久久一区二区三区| 欧美三区在线视频| 制服丝袜激情欧洲亚洲| 日韩视频一区在线观看| 久久久久国产精品厨房| 国产精品福利电影一区二区三区四区 | 亚洲黄色片在线观看| 亚洲一区二区三区不卡国产欧美| 午夜久久久久久| 裸体在线国模精品偷拍| 成人av先锋影音| 欧美日韩国产一二三| 久久久久久久久久久久久女国产乱 | 国产一区二区不卡| 不卡一区二区中文字幕| 欧美男女性生活在线直播观看| 欧美一区二区三区免费观看视频| 久久这里都是精品| 亚洲精品成a人| 美国毛片一区二区| 91浏览器在线视频| 精品免费国产二区三区| 亚洲欧美日韩国产综合| 久久精品99国产精品日本| 成人动漫精品一区二区| 日韩视频免费观看高清在线视频| 中文字幕精品在线不卡| 午夜国产不卡在线观看视频| 成人综合日日夜夜| 欧美一级在线视频| 一区二区三区在线看| 国模娜娜一区二区三区| 欧美日韩免费电影| 成人欧美一区二区三区黑人麻豆 | 99re成人在线| 久久嫩草精品久久久精品一| 亚洲国产精品久久久久秋霞影院| 九九**精品视频免费播放| 91黄色免费看| 亚洲国产精品精华液2区45| 日韩电影免费一区| 欧美这里有精品| 亚洲欧美激情在线| 波多野结衣中文字幕一区| 日韩三级视频中文字幕| 亚洲国产cao| 91久久线看在观草草青青| 国产精品久99| 成人三级伦理片| 久久蜜臀精品av| 韩国三级在线一区| 欧美精品一区二区三| 日本 国产 欧美色综合| 欧美精品 日韩| 亚洲不卡一区二区三区| 91九色02白丝porn| 一区二区三区中文字幕| 成人综合在线网站| 国产精品久久影院| 九色|91porny| 国产亚洲综合在线| 国模冰冰炮一区二区| 精品成人私密视频| 国产福利不卡视频| 中文字幕不卡在线| 成人黄色电影在线| 国产精品久久精品日日| 91网站视频在线观看| 亚洲激情校园春色| 欧美日韩一区二区三区不卡| 天堂va蜜桃一区二区三区漫画版 | 国产精品1区2区3区| 精品成人a区在线观看| 国产一区久久久| 日韩欧美国产1| 精品午夜一区二区三区在线观看| 久久久久久亚洲综合影院红桃| 久久精品国产一区二区三 | 亚洲成av人在线观看| 欧美美女直播网站| 久草精品在线观看| 中文字幕在线观看一区二区| 99v久久综合狠狠综合久久| 一区二区三区免费看视频| 欧美日韩精品一区二区天天拍小说 | 99视频热这里只有精品免费| 亚洲色欲色欲www| 欧美日韩国产小视频在线观看| 奇米影视7777精品一区二区| 久久九九影视网| 欧美综合天天夜夜久久| 精品在线观看免费| 亚洲天堂2016| 欧美成人在线直播| jiyouzz国产精品久久| 天天影视色香欲综合网老头| 日韩精品一区二区三区中文精品 | 亚洲国产精品成人综合色在线婷婷| www.av亚洲| 免费精品99久久国产综合精品| 欧美国产欧美综合| 欧美一区二区黄色| 色欲综合视频天天天| 免费久久精品视频| 一区二区三区在线免费视频| 久久久久久电影| 色哟哟精品一区| 精品一区二区三区日韩| 亚洲综合在线五月| 国产精品女人毛片| 日韩一级欧美一级| 在线免费av一区| 国产成人免费在线视频| 欧美aaaaa成人免费观看视频| 中文字幕亚洲视频| 久久美女艺术照精彩视频福利播放 | 91啪亚洲精品| 国产伦精品一区二区三区在线观看| 亚洲午夜在线视频| 亚洲色图欧美在线| 亚洲国产高清aⅴ视频| 日韩一区二区麻豆国产| 欧美日韩高清一区二区| 91激情在线视频| 色综合天天狠狠| 99视频一区二区三区| 北条麻妃一区二区三区| 国产在线精品国自产拍免费| 蜜桃视频第一区免费观看| 亚洲福利一区二区三区| 亚洲欧美日韩综合aⅴ视频| 国产区在线观看成人精品 | 欧美日韩一区不卡| 91国在线观看| 欧美在线啊v一区| 色综合咪咪久久| 色94色欧美sute亚洲线路二 | 午夜精品久久久久久久久| 亚洲欧洲综合另类| 依依成人精品视频| 亚洲欧美另类小说| 亚洲第一主播视频| 午夜视频久久久久久| 天涯成人国产亚洲精品一区av| 亚洲国产综合色| 亚洲成av人片www| 日本aⅴ免费视频一区二区三区| 偷窥国产亚洲免费视频| 日本91福利区| 国产麻豆精品95视频| 成人av在线网| 在线精品视频免费播放| 欧美午夜寂寞影院| 欧美一二三区在线| 精品乱人伦小说| 中文字幕乱码亚洲精品一区| 亚洲四区在线观看| 亚洲影院免费观看| 奇米综合一区二区三区精品视频 | 亚洲国产经典视频| 亚洲精品成人精品456| 日本亚洲一区二区| 国产精品一级二级三级| 波多野结衣精品在线| 欧美日韩免费不卡视频一区二区三区| 欧美高清激情brazzers| 精品成人在线观看| 一区二区三区精品| 精品一区二区免费视频| av欧美精品.com| 欧美精品 日韩| 国产精品污www在线观看| 亚洲曰韩产成在线| 激情六月婷婷久久| 欧美偷拍一区二区| 久久亚洲捆绑美女| 亚洲精品视频在线| 久久99热这里只有精品| www.一区二区| 欧美一级艳片视频免费观看| 中文字幕精品三区| 日产国产欧美视频一区精品| 成年人午夜久久久| 精品国产一区二区三区久久久蜜月 | 91丨porny丨蝌蚪视频| 欧美一区二区三区免费视频|