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

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

?? docprobe.c

?? ARMer9 s3c2410開發系統 mtd文件系統的源代碼
?? 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.41 2003/12/03 10:19:57 dwmw2 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_PARM(doc_config_location, "l");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(unsigned long potential, unsigned long physadr){	unsigned long 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){	unsigned long 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 = (unsigned long)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((void *)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((void *)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((void *)docptr);}/**************************************************************************** * * Module stuff * ****************************************************************************/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一区二区三区免费野_久草精品视频
91麻豆福利精品推荐| 五月天欧美精品| 亚洲精品菠萝久久久久久久| 性做久久久久久久久| 国产69精品久久777的优势| 欧美伊人精品成人久久综合97| 日韩一区二区电影在线| 亚洲精品欧美激情| 国产一区 二区| 欧美一区二区女人| 亚洲激情综合网| 国产91高潮流白浆在线麻豆| 欧美一区二区性放荡片| 亚洲午夜一区二区| 91在线无精精品入口| 337p日本欧洲亚洲大胆色噜噜| 性久久久久久久| 欧美曰成人黄网| 亚洲免费观看在线视频| 成人免费福利片| 26uuu另类欧美亚洲曰本| 青青草视频一区| 欧美女孩性生活视频| 亚洲国产欧美一区二区三区丁香婷 | 久久中文字幕电影| 青青国产91久久久久久| 8x福利精品第一导航| 亚洲第一综合色| 欧美伊人久久久久久久久影院 | 精品久久人人做人人爽| 日日夜夜精品视频天天综合网| 91免费观看视频在线| 国产精品久久久久久久久免费相片 | 色呦呦网站一区| 亚洲你懂的在线视频| 色综合久久综合网欧美综合网| 国产精品久久久久久久久快鸭 | 91免费看视频| 国产精品综合视频| 精品国产乱码久久久久久夜甘婷婷 | 99久久综合国产精品| 五月天激情综合网| 国产精品美日韩| 91.xcao| 91久久人澡人人添人人爽欧美| 国内外成人在线| 亚洲福利一区二区三区| 国产精品视频你懂的| 91精品国产欧美一区二区18| 99精品国产热久久91蜜凸| 麻豆成人久久精品二区三区红| 一区二区三区四区av| 国产免费成人在线视频| 欧美美女bb生活片| 色综合久久中文综合久久牛| 国产精品中文字幕欧美| 免费在线成人网| 亚洲一区二区三区影院| 亚洲视频综合在线| 国产欧美日韩在线视频| 精品欧美久久久| 欧美高清视频www夜色资源网| 成人av动漫网站| 国产福利91精品一区二区三区| 日本亚洲视频在线| 亚洲成人在线观看视频| 一区二区三区视频在线看| 国产精品久久久久aaaa| 亚洲国产精品传媒在线观看| 久久青草欧美一区二区三区| 日韩欧美一级精品久久| 日韩视频一区二区三区| 欧美一级精品在线| 91精品在线一区二区| 91精品在线一区二区| 91精品国产一区二区| 91超碰这里只有精品国产| 欧美美女一区二区在线观看| 欧美日韩国产免费一区二区| 欧美日韩国产高清一区二区三区| 欧美中文字幕一区二区三区| 欧美综合久久久| 欧美丰满一区二区免费视频| 欧美精品日韩综合在线| 欧美一区二区视频在线观看2022| 正在播放亚洲一区| 日韩手机在线导航| 亚洲精品在线观看网站| 国产欧美一区二区精品性色超碰| 国产日韩欧美麻豆| 国产精品国产三级国产aⅴ原创| 国产精品国模大尺度视频| 亚洲欧美另类久久久精品| 亚洲激情av在线| 午夜精品免费在线观看| 奇米精品一区二区三区四区| 韩国欧美一区二区| 成人av中文字幕| 在线观看三级视频欧美| 欧美另类久久久品| 日韩三级免费观看| 欧美—级在线免费片| 亚洲精品水蜜桃| 天堂资源在线中文精品| 韩国成人在线视频| 99久久精品国产一区二区三区| 91搞黄在线观看| 日韩精品一区二区三区在线观看 | 日韩电影在线观看网站| 精品一区二区国语对白| 国产白丝精品91爽爽久久| 91在线播放网址| 欧美一区二区久久| 国产精品视频免费看| 亚洲一二三四久久| 精品一区二区在线看| 97久久久精品综合88久久| 欧美日韩夫妻久久| 日本一区二区不卡视频| 日本视频一区二区| 成人黄色大片在线观看| 欧美精品成人一区二区三区四区| 26uuu国产日韩综合| 亚洲精品v日韩精品| 国产乱子伦视频一区二区三区| fc2成人免费人成在线观看播放| 91麻豆精品国产自产在线观看一区 | 亚洲欧洲99久久| 日韩成人精品在线| 成人av在线一区二区| 欧美mv日韩mv亚洲| 亚洲一区二区三区精品在线| 国产精品99久久久久| 777a∨成人精品桃花网| 亚洲欧美在线视频| 久久99精品久久只有精品| 欧美中文一区二区三区| 国产精品人人做人人爽人人添 | 欧美极品aⅴ影院| 久久精品国产一区二区三 | 欧美日韩另类一区| 亚洲欧洲在线观看av| 麻豆免费看一区二区三区| 91久久国产最好的精华液| 国产性色一区二区| 久久精品99国产精品| 欧美伊人久久久久久久久影院| 国产精品久久久久久久第一福利| 精品在线亚洲视频| 欧美精品1区2区| 亚洲人妖av一区二区| 久久国产精品99久久久久久老狼 | 一本色道久久综合亚洲aⅴ蜜桃| 欧美一卡2卡3卡4卡| 亚洲精品一二三四区| 国产精品影视在线观看| 日韩午夜中文字幕| 亚洲一级在线观看| 日本高清不卡在线观看| 国产拍欧美日韩视频二区| 国产精品自拍在线| 日韩精品一区二区在线观看| 亚洲一区二区三区美女| 色香蕉成人二区免费| 国产欧美日韩精品在线| 久久精品国产澳门| 91精品国产91综合久久蜜臀| 一卡二卡欧美日韩| 91污片在线观看| 亚洲精品国产无套在线观| 不卡的av在线播放| 国产日产欧美一区| 青娱乐精品视频在线| 欧美丰满少妇xxxbbb| 亚洲一区二区三区美女| 国产真实精品久久二三区| 久久精品视频在线看| 国模冰冰炮一区二区| 精品福利av导航| 国产91精品在线观看| 国产欧美日韩精品一区| 国产一区二区精品久久91| 26uuu国产一区二区三区| 成人国产亚洲欧美成人综合网| 欧美韩国日本不卡| 99久久久国产精品| 亚洲欧美激情在线| 欧美一区三区二区| 麻豆精品在线视频| 久久婷婷成人综合色| 成人黄色综合网站| 国产精品理论片| 99久免费精品视频在线观看| 亚洲激情男女视频| 欧美伊人精品成人久久综合97| 1000精品久久久久久久久| 欧美日韩国产精品成人| 久久福利视频一区二区| 久久久久久久久99精品| 色呦呦国产精品|