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

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

?? usb_ohci.c

?? 改寫的U-boot for s3c4510 (注意此源碼是在windows下壓縮了)。 1、支持串口下載
?? C
?? 第 1 頁 / 共 3 頁
字號:
					if (RD_RH_PORTSTAT & RH_PS_CCS)					    WR_RH_PORTSTAT (RH_PS_PES );					OK (0);		}		break;	case RH_SET_ADDRESS: gohci.rh.devnum = wValue; OK(0);	case RH_GET_DESCRIPTOR:		switch ((wValue & 0xff00) >> 8) {			case (0x01): /* device descriptor */				len = min_t(unsigned int,					  leni,					  min_t(unsigned int,					      sizeof (root_hub_dev_des),					      wLength));				data_buf = root_hub_dev_des; OK(len);			case (0x02): /* configuration descriptor */				len = min_t(unsigned int,					  leni,					  min_t(unsigned int,					      sizeof (root_hub_config_des),					      wLength));				data_buf = root_hub_config_des; OK(len);			case (0x03): /* string descriptors */				if(wValue==0x0300) {					len = min_t(unsigned int,						  leni,						  min_t(unsigned int,						      sizeof (root_hub_str_index0),						      wLength));					data_buf = root_hub_str_index0;					OK(len);				}				if(wValue==0x0301) {					len = min_t(unsigned int,						  leni,						  min_t(unsigned int,						      sizeof (root_hub_str_index1),						      wLength));					data_buf = root_hub_str_index1;					OK(len);			}			default:				stat = USB_ST_STALLED;		}		break;	case RH_GET_DESCRIPTOR | RH_CLASS:	{		__u32 temp = roothub_a (&gohci);		data_buf [0] = 9;		/* min length; */		data_buf [1] = 0x29;		data_buf [2] = temp & RH_A_NDP;#ifdef CONFIG_AT91C_PQFP_UHPBUG		data_buf [2] = (data_buf [2] == 2) ? 1:0;#endif		data_buf [3] = 0;		if (temp & RH_A_PSM)	/* per-port power switching? */			data_buf [3] |= 0x1;		if (temp & RH_A_NOCP)	/* no overcurrent reporting? */			data_buf [3] |= 0x10;		else if (temp & RH_A_OCPM)	/* per-port overcurrent reporting? */			data_buf [3] |= 0x8;		/* corresponds to data_buf[4-7] */		datab [1] = 0;		data_buf [5] = (temp & RH_A_POTPGT) >> 24;		temp = roothub_b (&gohci);		data_buf [7] = temp & RH_B_DR;		if (data_buf [2] < 7) {			data_buf [8] = 0xff;		} else {			data_buf [0] += 2;			data_buf [8] = (temp & RH_B_DR) >> 8;			data_buf [10] = data_buf [9] = 0xff;		}		len = min_t(unsigned int, leni,		min_t(unsigned int, data_buf [0], wLength));		OK (len);	}	case RH_GET_CONFIGURATION:	*(__u8 *) data_buf = 0x01; OK (1);	case RH_SET_CONFIGURATION:	WR_RH_STAT (0x10000); OK (0);	default:		dbg ("unsupported root hub command");		stat = USB_ST_STALLED;	}#ifdef	DEBUG	ohci_dump_roothub (&gohci, 1);#else	wait_ms(1);#endif	len = min_t(int, len, leni);	if (data != data_buf)	    memcpy (data, data_buf, len);	dev->act_len = len;	dev->status = stat;#ifdef DEBUG	if (transfer_len)		urb_priv.actual_length = transfer_len;	pkt_print(dev, pipe, buffer, transfer_len, cmd, "RET(rh)", 0/*usb_pipein(pipe)*/);#else	wait_ms(1);#endif	return stat;}/*-------------------------------------------------------------------------*//* common code for handling submit messages - used for all but root hub *//* accesses. */int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,		int transfer_len, struct devrequest *setup, int interval){	int stat = 0;	int maxsize = usb_maxpacket(dev, pipe);	int timeout;	/* device pulled? Shortcut the action. */	if (devgone == dev) {		dev->status = USB_ST_CRC_ERR;		return 0;	}#ifdef DEBUG	urb_priv.actual_length = 0;	pkt_print(dev, pipe, buffer, transfer_len, setup, "SUB", usb_pipein(pipe));#else	wait_ms(1);#endif	if (!maxsize) {		err("submit_common_message: pipesize for pipe %lx is zero",			pipe);		return -1;	}	if (sohci_submit_job(dev, pipe, buffer, transfer_len, setup, interval) < 0) {		err("sohci_submit_job failed");		return -1;	}	wait_ms(10);	/* ohci_dump_status(&gohci); */	/* allow more time for a BULK device to react - some are slow */#define BULK_TO	 5000	/* timeout in milliseconds */	if (usb_pipetype (pipe) == PIPE_BULK)		timeout = BULK_TO;	else		timeout = 100;	/* wait for it to complete */	for (;;) {		/* check whether the controller is done */		stat = hc_interrupt();		if (stat < 0) {			stat = USB_ST_CRC_ERR;			break;		}		if (stat >= 0 && stat != 0xff) {			/* 0xff is returned for an SF-interrupt */			break;		}		if (--timeout) {			wait_ms(1);		} else {			err("CTL:TIMEOUT ");			stat = USB_ST_CRC_ERR;			break;		}	}	/* we got an Root Hub Status Change interrupt */	if (got_rhsc) {#ifdef DEBUG		ohci_dump_roothub (&gohci, 1);#endif		got_rhsc = 0;		/* abuse timeout */		timeout = rh_check_port_status(&gohci);		if (timeout >= 0) {#if 0 /* this does nothing useful, but leave it here in case that changes */			/* the called routine adds 1 to the passed value */			usb_hub_port_connect_change(gohci.rh.dev, timeout - 1);#endif			/*			 * XXX			 * This is potentially dangerous because it assumes			 * that only one device is ever plugged in!			 */			devgone = dev;		}	}	dev->status = stat;	dev->act_len = transfer_len;#ifdef DEBUG	pkt_print(dev, pipe, buffer, transfer_len, setup, "RET(ctlr)", usb_pipein(pipe));#else	wait_ms(1);#endif	/* free TDs in urb_priv */	urb_free_priv (&urb_priv);	return 0;}/* submit routines called from usb.c */int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, void *buffer,		int transfer_len){	info("submit_bulk_msg");	return submit_common_msg(dev, pipe, buffer, transfer_len, NULL, 0);}int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,		int transfer_len, struct devrequest *setup){	int maxsize = usb_maxpacket(dev, pipe);	info("submit_control_msg");#ifdef DEBUG	urb_priv.actual_length = 0;	pkt_print(dev, pipe, buffer, transfer_len, setup, "SUB", usb_pipein(pipe));#else	wait_ms(1);#endif	if (!maxsize) {		err("submit_control_message: pipesize for pipe %lx is zero",			pipe);		return -1;	}	if (((pipe >> 8) & 0x7f) == gohci.rh.devnum) {		gohci.rh.dev = dev;		/* root hub - redirect */		return ohci_submit_rh_msg(dev, pipe, buffer, transfer_len,			setup);	}	return submit_common_msg(dev, pipe, buffer, transfer_len, setup, 0);}int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,		int transfer_len, int interval){	info("submit_int_msg");	return -1;}/*-------------------------------------------------------------------------* * HC functions *-------------------------------------------------------------------------*//* reset the HC and BUS */static int hc_reset (ohci_t *ohci){	int timeout = 30;	int smm_timeout = 50; /* 0,5 sec */	dbg("%s\n", __FUNCTION__);	if (readl (&ohci->regs->control) & OHCI_CTRL_IR) { /* SMM owns the HC */		writel (OHCI_OCR, &ohci->regs->cmdstatus); /* request ownership */		info("USB HC TakeOver from SMM");		while (readl (&ohci->regs->control) & OHCI_CTRL_IR) {			wait_ms (10);			if (--smm_timeout == 0) {				err("USB HC TakeOver failed!");				return -1;			}		}	}	/* Disable HC interrupts */	writel (OHCI_INTR_MIE, &ohci->regs->intrdisable);	dbg("USB HC reset_hc usb-%s: ctrl = 0x%X ;\n",		ohci->slot_name,		readl(&ohci->regs->control));	/* Reset USB (needed by some controllers) */	writel (0, &ohci->regs->control);	/* HC Reset requires max 10 us delay */	writel (OHCI_HCR,  &ohci->regs->cmdstatus);	while ((readl (&ohci->regs->cmdstatus) & OHCI_HCR) != 0) {		if (--timeout == 0) {			err("USB HC reset timed out!");			return -1;		}		udelay (1);	}	return 0;}/*-------------------------------------------------------------------------*//* Start an OHCI controller, set the BUS operational * enable interrupts * connect the virtual root hub */static int hc_start (ohci_t * ohci){	__u32 mask;	unsigned int fminterval;	ohci->disabled = 1;	/* Tell the controller where the control and bulk lists are	 * The lists are empty now. */	writel (0, &ohci->regs->ed_controlhead);	writel (0, &ohci->regs->ed_bulkhead);	writel ((__u32)ohci->hcca, &ohci->regs->hcca); /* a reset clears this */	fminterval = 0x2edf;	writel ((fminterval * 9) / 10, &ohci->regs->periodicstart);	fminterval |= ((((fminterval - 210) * 6) / 7) << 16);	writel (fminterval, &ohci->regs->fminterval);	writel (0x628, &ohci->regs->lsthresh);	/* start controller operations */	ohci->hc_control = OHCI_CONTROL_INIT | OHCI_USB_OPER;	ohci->disabled = 0;	writel (ohci->hc_control, &ohci->regs->control);	/* disable all interrupts */	mask = (OHCI_INTR_SO | OHCI_INTR_WDH | OHCI_INTR_SF | OHCI_INTR_RD |			OHCI_INTR_UE | OHCI_INTR_FNO | OHCI_INTR_RHSC |			OHCI_INTR_OC | OHCI_INTR_MIE);	writel (mask, &ohci->regs->intrdisable);	/* clear all interrupts */	mask &= ~OHCI_INTR_MIE;	writel (mask, &ohci->regs->intrstatus);	/* Choose the interrupts we care about now  - but w/o MIE */	mask = OHCI_INTR_RHSC | OHCI_INTR_UE | OHCI_INTR_WDH | OHCI_INTR_SO;	writel (mask, &ohci->regs->intrenable);#ifdef	OHCI_USE_NPS	/* required for AMD-756 and some Mac platforms */	writel ((roothub_a (ohci) | RH_A_NPS) & ~RH_A_PSM,		&ohci->regs->roothub.a);	writel (RH_HS_LPSC, &ohci->regs->roothub.status);#endif	/* OHCI_USE_NPS */#define mdelay(n) ({unsigned long msec=(n); while (msec--) udelay(1000);})	/* POTPGT delay is bits 24-31, in 2 ms units. */	mdelay ((roothub_a (ohci) >> 23) & 0x1fe);	/* connect the virtual root hub */	ohci->rh.devnum = 0;	return 0;}/*-------------------------------------------------------------------------*//* an interrupt happens */static inthc_interrupt (void){	ohci_t *ohci = &gohci;	struct ohci_regs *regs = ohci->regs;	int ints;	int stat = -1;	if ((ohci->hcca->done_head != 0) && !(m32_swap (ohci->hcca->done_head) & 0x01)) {		ints =	OHCI_INTR_WDH;	} else {		ints = readl (&regs->intrstatus);	}	/* dbg("Interrupt: %x frame: %x", ints, le16_to_cpu (ohci->hcca->frame_no)); */	if (ints & OHCI_INTR_RHSC) {		got_rhsc = 1;	}	if (ints & OHCI_INTR_UE) {		ohci->disabled++;		err ("OHCI Unrecoverable Error, controller usb-%s disabled",			ohci->slot_name);		/* e.g. due to PCI Master/Target Abort */#ifdef	DEBUG		ohci_dump (ohci, 1);#else	wait_ms(1);#endif		/* FIXME: be optimistic, hope that bug won't repeat often. */		/* Make some non-interrupt context restart the controller. */		/* Count and limit the retries though; either hardware or */		/* software errors can go forever... */		hc_reset (ohci);		return -1;	}	if (ints & OHCI_INTR_WDH) {		wait_ms(1);		writel (OHCI_INTR_WDH, &regs->intrdisable);		stat = dl_done_list (&gohci, dl_reverse_done_list (&gohci));		writel (OHCI_INTR_WDH, &regs->intrenable);	}	if (ints & OHCI_INTR_SO) {		dbg("USB Schedule overrun\n");		writel (OHCI_INTR_SO, &regs->intrenable);		stat = -1;	}	/* FIXME:  this assumes SOF (1/ms) interrupts don't get lost... */	if (ints & OHCI_INTR_SF) {		unsigned int frame = m16_swap (ohci->hcca->frame_no) & 1;		wait_ms(1);		writel (OHCI_INTR_SF, &regs->intrdisable);		if (ohci->ed_rm_list[frame] != NULL)			writel (OHCI_INTR_SF, &regs->intrenable);		stat = 0xff;	}	writel (ints, &regs->intrstatus);	return stat;}/*-------------------------------------------------------------------------*//*-------------------------------------------------------------------------*//* De-allocate all resources.. */static void hc_release_ohci (ohci_t *ohci){	dbg ("USB HC release ohci usb-%s", ohci->slot_name);	if (!ohci->disabled)		hc_reset (ohci);}/*-------------------------------------------------------------------------*//* * low level initalisation routine, called from usb.c */static char ohci_inited = 0;int usb_lowlevel_init(void){	/*	 * Enable USB host clock.	 */	*AT91C_PMC_SCER = AT91C_PMC_UHP;	/* 48MHz clock enabled for UHP */	*AT91C_PMC_PCER = 1 << AT91C_ID_UHP;	/* Peripheral Clock Enable Register */	memset (&gohci, 0, sizeof (ohci_t));	memset (&urb_priv, 0, sizeof (urb_priv_t));	/* align the storage */	if ((__u32)&ghcca[0] & 0xff) {		err("HCCA not aligned!!");		return -1;	}	phcca = &ghcca[0];	info("aligned ghcca %p", phcca);	memset(&ohci_dev, 0, sizeof(struct ohci_device));	if ((__u32)&ohci_dev.ed[0] & 0x7) {		err("EDs not aligned!!");		return -1;	}	memset(gtd, 0, sizeof(td_t) * (NUM_TD + 1));	if ((__u32)gtd & 0x7) {		err("TDs not aligned!!");		return -1;	}	ptd = gtd;	gohci.hcca = phcca;	memset (phcca, 0, sizeof (struct ohci_hcca));	gohci.disabled = 1;	gohci.sleeping = 0;	gohci.irq = -1;	gohci.regs = (struct ohci_regs *)AT91_USB_HOST_BASE;	gohci.flags = 0;	gohci.slot_name = "at91rm9200";	if (hc_reset (&gohci) < 0) {		hc_release_ohci (&gohci);		/* Initialization failed */		*AT91C_PMC_PCER = AT91C_ID_UHP;		*AT91C_PMC_SCDR = 1 << AT91C_PMC_UHP;	/* 48MHz clock disabled for UHP */		return -1;	}	/* FIXME this is a second HC reset; why?? *//*	writel (gohci.hc_control = OHCI_USB_RESET, &gohci.regs->control);	wait_ms (10);*/	if (hc_start (&gohci) < 0) {		err ("can't start usb-%s", gohci.slot_name);		hc_release_ohci (&gohci);		/* Initialization failed */		*AT91C_PMC_PCER = AT91C_ID_UHP;		*AT91C_PMC_SCDR = 1 << AT91C_PMC_UHP;	/* 48MHz clock disabled for UHP */		return -1;	}#ifdef	DEBUG	ohci_dump (&gohci, 1);#else	wait_ms(1);#endif	ohci_inited = 1;	return 0;}int usb_lowlevel_stop(void){	/* this gets called really early - before the controller has */	/* even been initialized! */	if (!ohci_inited)		return 0;	/* TODO release any interrupts, etc. */	/* call hc_release_ohci() here ? */	hc_reset (&gohci);	/* may not want to do this */	*AT91C_PMC_PCER = 1 << AT91C_ID_UHP;	*AT91C_PMC_SCDR = 1 << AT91C_PMC_UHP;	/* 48MHz clock disabled for UHP */	return 0;}#endif /* CONFIG_USB_OHCI */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲日本在线a| 亚洲国产精品国自产拍av| 国产精品美女久久久久久久久| 老司机精品视频一区二区三区| 91麻豆精品国产自产在线| 日韩成人一区二区三区在线观看| 欧美人与z0zoxxxx视频| 秋霞午夜av一区二区三区| 中文字幕精品—区二区四季| 国产日韩精品久久久| 一本到高清视频免费精品| 日韩不卡在线观看日韩不卡视频| 亚洲第四色夜色| 久久久亚洲综合| 在线欧美小视频| 久久精品99国产国产精| 久久不见久久见免费视频1| 国产一区亚洲一区| 亚洲综合丁香婷婷六月香| 精品嫩草影院久久| av一区二区三区黑人| 亚洲成人动漫av| 麻豆高清免费国产一区| 香蕉久久一区二区不卡无毒影院| 婷婷丁香激情综合| 亚洲一区在线看| 爽好久久久欧美精品| 亚洲精品一二三四区| 国产女人水真多18毛片18精品视频| 日本一二三不卡| 日韩制服丝袜av| 丁香一区二区三区| 极品少妇xxxx精品少妇| 日韩高清不卡一区二区三区| 国产伦精一区二区三区| 在线观看国产一区二区| 精品国产91亚洲一区二区三区婷婷| 宅男在线国产精品| 亚洲国产成人午夜在线一区| 亚洲国产成人91porn| 亚洲激情欧美激情| 国产在线视频一区二区| 久久国产综合精品| 色婷婷综合久久久中文字幕| 精品国产91乱码一区二区三区 | 精品国产一区二区三区av性色 | 日韩三级视频在线看| 欧美日韩一级二级| 欧美三级视频在线播放| 国产日韩v精品一区二区| 天天综合网 天天综合色| 成人免费黄色大片| 99精品欧美一区二区蜜桃免费| 成人黄色软件下载| 97久久精品人人澡人人爽| 日韩欧美久久久| 久久先锋影音av鲁色资源| 欧美国产精品一区二区三区| 日本免费新一区视频| 在线一区二区视频| 91精品国产欧美一区二区18| 欧美成人伊人久久综合网| 一级精品视频在线观看宜春院| 亚洲国产乱码最新视频| 成年人国产精品| 久久久久88色偷偷免费| 久久99精品国产麻豆婷婷洗澡| 欧洲视频一区二区| 一区二区三区在线看| jvid福利写真一区二区三区| 国产亚洲视频系列| 亚洲制服丝袜在线| 91高清视频免费看| 一区二区在线观看免费视频播放| 99视频有精品| 中文字幕一区在线观看视频| 亚洲国产色一区| 91搞黄在线观看| 亚洲福利一区二区三区| 欧美日韩中文字幕一区| 香蕉久久夜色精品国产使用方法 | 精品国产一区二区三区久久久蜜月 | 91精品国产一区二区三区香蕉| 一区二区三区精品视频在线| 91欧美一区二区| 日韩欧美色电影| 国产真实乱子伦精品视频| 久久婷婷国产综合精品青草| 国产精品18久久久久久久网站| 欧美日韩一区成人| 蜜桃视频第一区免费观看| 欧美一级片免费看| 韩国午夜理伦三级不卡影院| 国产欧美精品一区| 91极品美女在线| 丝袜脚交一区二区| 国产日韩欧美高清在线| 在线观看三级视频欧美| 免费av成人在线| 亚洲国产精品高清| 欧美日韩国产小视频| 精品无人区卡一卡二卡三乱码免费卡| 久久久久久免费网| 欧美在线综合视频| 韩国在线一区二区| 亚洲综合久久久| 久久亚洲一区二区三区明星换脸 | 56国语精品自产拍在线观看| 国产一区二三区好的| 最好看的中文字幕久久| 欧美一级夜夜爽| 99精品一区二区三区| 久久国产日韩欧美精品| 最新高清无码专区| 精品日本一线二线三线不卡| 色婷婷一区二区三区四区| 精品一二三四区| 亚洲成va人在线观看| 国产精品美女一区二区| 日韩手机在线导航| 色综合天天视频在线观看| 国内成人精品2018免费看| 亚洲综合色视频| 国产精品国产三级国产普通话蜜臀| 国产a视频精品免费观看| 午夜不卡在线视频| 国产精品二三区| 久久精品水蜜桃av综合天堂| 欧美久久久一区| 老司机午夜精品| 亚洲国产中文字幕在线视频综合| 国产午夜精品久久久久久免费视 | 国产一区在线观看视频| 肉色丝袜一区二区| 亚洲精品欧美综合四区| 国产精品久久久久久久久免费樱桃| 日韩欧美一卡二卡| 777xxx欧美| 欧美疯狂性受xxxxx喷水图片| 91在线porny国产在线看| 国产91在线|亚洲| 国产精品99久久久久久有的能看| 麻豆一区二区99久久久久| 亚洲电影视频在线| 亚洲成人在线免费| 午夜在线成人av| 香蕉久久夜色精品国产使用方法 | 强制捆绑调教一区二区| 亚洲成av人片www| 亚洲已满18点击进入久久| 亚洲欧美一区二区三区极速播放| 91精品福利在线| 在线免费亚洲电影| 欧美日韩视频在线第一区| 欧美视频一区二区三区四区 | 国产成人在线视频播放| 亚洲综合一区在线| 亚洲男帅同性gay1069| 亚洲欧美综合色| 一区二区三区精品| 日韩一区精品字幕| 日韩avvvv在线播放| 久久成人免费网| 国模一区二区三区白浆| 成人福利在线看| 99精品视频免费在线观看| 欧美视频第二页| 337p亚洲精品色噜噜噜| 欧美精品一区二区三区蜜臀| 国产蜜臀97一区二区三区| 亚洲欧洲av在线| 日本欧美肥老太交大片| 国产精品456露脸| 99v久久综合狠狠综合久久| 欧美制服丝袜第一页| 日韩欧美成人一区二区| 国产片一区二区| 亚洲一区二区偷拍精品| 久久精品国产99国产| 99久久精品国产网站| 在线成人免费观看| 久久久99免费| 亚洲一区在线观看免费观看电影高清| 日本美女视频一区二区| 成人精品视频.| 7777精品伊人久久久大香线蕉经典版下载 | 日韩欧美资源站| 中文字幕一区二区不卡| 午夜精品久久久久久久蜜桃app| 九一久久久久久| 欧美午夜电影一区| 国产亚洲成av人在线观看导航| 一区二区三区四区五区视频在线观看| 日韩不卡在线观看日韩不卡视频| 成人97人人超碰人人99| 欧美va在线播放| 亚洲国产日韩一级| 粉嫩aⅴ一区二区三区四区五区| 欧美精品123区| 欧美肥妇bbw|