📄 usbuhcdisr.c
字号:
/* usbUhcdIsr.c - USB UHCI HCD interrupt handler *//* Copyright 2004-2005 Wind River Systems, Inc. This software includes software licensed to Wind River Systems, Inc. by Wipro, Ltd. Wind River licensees may use this software according to the terms of their Wind River license agreement(s) applicable to this software.*//*Modification history--------------------01f,12oct05,hch Fix compiler error with -DDEBUG flag(SPR #113650)01e,28mar05,pdg non-PCI changes01d,15oct04,ami Refgen changes01c,28jul03,mat Endian Related Changes01b,26jun03,mat changing the code to WRS standards.01a,25apr02,ram written.*//*DESCRIPTIONThis file contains the Interrupt Service Routine for the UHCI driver.INCLUDE FILES: usb2/usbOsal.h, usb2/usbHst.h, usb2/usbUhci.h, usb2/usbUhcdSupport.h, usb2/usbUhcdCommon.h, usb2/usbUhcdScheduleQueue.h,usb2/BusAbstractionLayer.h*//*INTERNAL ******************************************************************************* * Filename : usbUhcdIsr.c * * Copyright : * * THE COPYRIGHT IN THE CONTENTS OF THIS SOFTWARE VEST WITH WIPRO * LIMITED A COMPANY INCORPORATED UNDER THE LAWS OF INDIA AND HAVING * ITS REGISTERED OFFICE AT DODDAKANNELLI SARJAPUR ROAD BANGALORE * 560 035. DISTRIBUTION OR COPYING OF THIS SOFTWARE BY * ANY INDIVIDUAL OR ENTITY OTHER THAN THE ADDRESSEE IS STRICTLY * PROHIBITED AND MAY INCUR LEGAL LIABILITY. IF YOU ARE NOT THE * ADDRESSEE PLEASE NOTIFY US IMMEDIATELY BY PHONE OR BY RETURN EMAIL. * THE ADDRESSEE IS ADVISED TO MAINTAIN THE PROPRIETARY INTERESTS OF * THIS COPYRIGHT AS PER APPLICABLE LAWS. * * * Description : This file contains the Interrupt Service Routine for the * UHCI driver. * * ******************************************************************************//* includes */#include "usb2/usbOsal.h"#include "usb2/usbHst.h"#include "usb2/usbUhci.h"#include "usb2/usbUhcdSupport.h"#include "usb2/usbUhcdCommon.h"#include "usb2/usbUhcdScheduleQueue.h"#include "usb2/BusAbstractionLayer.h"/***************************************************************************** usbUhcdIsr - interrupt service routine for the UHCI Driver.** This routine is the interrupt service routine for the UHCI Driver.** RETURNS: N/A** ERRNO:* None.* * \NOMANUAL*/void usbUhcdIsr ( INT32 pHCDData ) { /* To hold the value of the register */ UINT16 regx = 0; /* Pointer to the host controller stucture*/ PUHCD_DATA ptrHCDData = (PUHCD_DATA)pHCDData; /* Local variable to hold the interrupt status register value */ INT16 intStatusValue; regx = USB_UHCD_READ_WORD ( ptrHCDData->usbUhcdUsbBase + USB_UHCD_USBINTR); /* Update the value which is to be written */ regx = regx | 0x0; /* Write the value to the register */ USB_UHCD_WRITE_WORD (ptrHCDData->usbUhcdUsbBase + USB_UHCD_USBINTR, regx); OS_LOG_MESSAGE_HIGH(UHCD,"Entering ISR for UHCI\n",0,0,0,0); /* * Read the Interrupt Status Register... */ intStatusValue = usbUhcdReadReg(ptrHCDData,USB_UHCD_USBSTS); OS_LOG_MESSAGE_HIGH(UHCD,"INT STATUS [0x%x]\n",intStatusValue,0,0,0); if(intStatusValue) { /* Update the interrupt status register into the HCD data structure */ ptrHCDData->usbUhcdIntStatusValue |= intStatusValue; OS_LOG_MESSAGE_HIGH(UHCD,"ptrHCDData->usbUhcdIntStatusValue [0x%x]\n",ptrHCDData->usbUhcdIntStatusValue,0,0,0); /* Clears the interrupt status bits by writing '1' to it. */ USB_UHCD_WRITE_WORD((ptrHCDData->usbUhcdUsbBase + USB_UHCD_USBSTS),intStatusValue); /* Release semaphore for handling the transfer completion */ OS_RELEASE_EVENT(ptrHCDData->usbUhcdSemCleanupTd); /*OS_LOG_MESSAGE_HIGH(UHCD,"Semaphore Released ID [0x%x]\n",ptrHCDData->usbUhcdSemCleanupTd,0,0,0);*/ } regx = USB_UHCD_READ_WORD (ptrHCDData->usbUhcdUsbBase + USB_UHCD_USBINTR); /* Update the value which is to be written */ regx = regx | 0xF; /* Write the value to the register */ USB_UHCD_WRITE_WORD (ptrHCDData->usbUhcdUsbBase + USB_UHCD_USBINTR, regx); OS_LOG_MESSAGE_HIGH(UHCD,"Exiting ISR\n",0,0,0,0); /* Return from the ISR function */ return; }/* End of UHC_ISR() *//*********************** end of usbUhcdIsr.c **********************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -