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

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

?? docprobe.c

?? nandflash k9g808u0a在pxa270的驅動,由于pxa270沒有nandflash接口
?? 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.2 2007/09/21 03:09:24 quy 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一区二区三区免费野_久草精品视频
亚洲午夜精品在线| 亚洲人成伊人成综合网小说| 久久久电影一区二区三区| 中文字幕中文乱码欧美一区二区 | 欧美亚洲愉拍一区二区| www久久精品| 视频一区免费在线观看| 99re免费视频精品全部| 久久亚洲精品小早川怜子| 亚洲v中文字幕| 91免费国产在线观看| 久久精品欧美日韩精品| 秋霞av亚洲一区二区三| 欧美色精品在线视频| 亚洲美女区一区| 久久久久久9999| 日本视频在线一区| 国产精品久久久久毛片软件| 欧美自拍丝袜亚洲| 色香蕉成人二区免费| 中文字幕乱码亚洲精品一区| 精品一区二区精品| 欧美刺激脚交jootjob| 亚洲一区二区三区四区五区黄| 成人性色生活片| 国产女人18毛片水真多成人如厕 | 日韩欧美区一区二| 亚洲国产成人精品视频| 懂色av中文一区二区三区| 日韩免费看网站| 久久99蜜桃精品| 欧美大尺度电影在线| 久久精品久久综合| 精品国产乱码久久久久久1区2区| 热久久免费视频| 欧美一区二区久久| 国产成人综合亚洲网站| 欧美大胆一级视频| 国产剧情av麻豆香蕉精品| 国产婷婷一区二区| va亚洲va日韩不卡在线观看| 中文字幕亚洲区| 色婷婷国产精品| 亚洲成年人影院| 精品国产一区二区亚洲人成毛片| 韩国av一区二区三区| 国产精品网曝门| 色综合久久九月婷婷色综合| 亚洲成人精品在线观看| 91精品国产综合久久久久久久| 蜜桃视频第一区免费观看| 久久嫩草精品久久久久| 国产v日产∨综合v精品视频| 亚洲天堂精品在线观看| 欧美乱妇20p| 紧缚奴在线一区二区三区| 欧美国产丝袜视频| 在线一区二区三区四区五区 | 亚洲成人www| 日韩欧美成人一区二区| 大美女一区二区三区| 一区二区三区在线高清| 精品少妇一区二区三区日产乱码 | 国产伦精一区二区三区| 国产精品久久精品日日| 欧美嫩在线观看| 激情六月婷婷久久| 亚洲精品视频一区二区| 日韩一区二区免费电影| 风间由美一区二区三区在线观看| 一区二区三区欧美在线观看| 91精品国产黑色紧身裤美女| 不卡影院免费观看| 日韩黄色免费网站| 中文一区二区完整视频在线观看| 欧美日本精品一区二区三区| 国产精品一区免费视频| 亚洲最大的成人av| 中文字幕不卡在线播放| 91精品国产综合久久国产大片| 国产盗摄精品一区二区三区在线| 天堂成人免费av电影一区| 中文字幕乱码日本亚洲一区二区| 911精品产国品一二三产区| 97精品电影院| 国产精品一区久久久久| 日韩高清一区在线| 亚洲伊人伊色伊影伊综合网| 国产日韩高清在线| 精品人在线二区三区| 欧美久久一区二区| 99久久国产综合精品女不卡| 国产真实乱对白精彩久久| 亚洲一线二线三线视频| 综合在线观看色| 国产片一区二区| 精品久久人人做人人爰| 4438x成人网最大色成网站| 色综合久久天天| 成人国产精品免费| 国产电影精品久久禁18| 国产一区二区毛片| 韩日精品视频一区| 麻豆精品久久久| 精品少妇一区二区三区免费观看| 亚洲久本草在线中文字幕| 欧美久久一二三四区| 色偷偷久久一区二区三区| 91农村精品一区二区在线| 国产成人在线免费| 国产精品99久久久久久久女警 | 欧美高清一级片在线| 欧美在线不卡一区| 在线欧美一区二区| 欧美伊人精品成人久久综合97 | 国产高清精品网站| 国产成人在线免费观看| 成人黄色av电影| 成人三级在线视频| 成人性生交大片免费看中文 | 在线播放中文一区| 欧美人牲a欧美精品| 欧美一激情一区二区三区| 91.com在线观看| 精品国产成人系列| 欧美激情中文不卡| 亚洲美腿欧美偷拍| 亚洲一区二区三区视频在线播放 | 国产成人h网站| 成人涩涩免费视频| 91福利在线观看| 欧美日韩极品在线观看一区| 欧美一区二区国产| 久久久精品综合| 亚洲柠檬福利资源导航| 五月婷婷另类国产| 国产美女精品人人做人人爽| 9色porny自拍视频一区二区| 色视频一区二区| 日韩精品在线一区| 国产精品白丝在线| 丝袜美腿高跟呻吟高潮一区| 国产精品一级黄| 91免费视频观看| 欧美一级黄色大片| 国产精品美女久久久久久久| 亚洲一区二区三区国产| 激情图区综合网| 色综合久久综合网| 日韩欧美aaaaaa| 亚洲欧美韩国综合色| 麻豆91在线观看| 91免费视频网址| 国产精品久久久久久久久免费相片| 日韩精品中文字幕一区二区三区 | 国产日韩欧美不卡| 亚洲成av人影院在线观看网| 精品亚洲成a人| 一本到三区不卡视频| 日韩免费视频一区| 一区二区三区国产| 国内精品写真在线观看| 欧美在线一区二区三区| 国产欧美日韩在线看| 日韩经典一区二区| 91在线一区二区| 久久久久亚洲蜜桃| 天天亚洲美女在线视频| 不卡的av电影在线观看| 欧美v亚洲v综合ⅴ国产v| 亚洲一区在线视频| av色综合久久天堂av综合| 欧美成人a∨高清免费观看| 亚洲最新在线观看| 99热在这里有精品免费| 久久久久久久久97黄色工厂| 亚洲一区影音先锋| 91免费版在线| 国产精品理伦片| 国产美女久久久久| 欧美第一区第二区| 免费在线看成人av| 在线免费观看成人短视频| 国产精品久久久久影视| 国产成人在线色| 久久久三级国产网站| 紧缚奴在线一区二区三区| 日韩欧美国产系列| 日韩av二区在线播放| 9191久久久久久久久久久| 午夜精品视频在线观看| 欧美调教femdomvk| 亚洲福利电影网| 欧美色视频在线| 午夜欧美一区二区三区在线播放| av在线播放一区二区三区| 最新热久久免费视频| 91在线你懂得| 一二三四区精品视频| 欧美自拍偷拍一区|