⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xllp_usbohci.cod

📁 pxa270为硬件平台的wince操作系统XLLP驱动源码
💻 COD
📖 第 1 页 / 共 2 页
字号:

; 123  : 				break;
; 124  : 
; 125  : 	case	XLLP_USBOHCI_PPM_GLOBAL:
; 126  : 				// make sure the NO Power Switching mode bit is OFF so Power Switching can occur
; 127  : 				// make sure the PSM bit is CLEAR, which allows all ports to be controlled with 
; 128  : 				// the GLOBAL set and clear power commands
; 129  : 				//pUsbhHandle->pUSBHRegs->UHCRHDA &= ~(XLLP_USBOHCI_UHCRHDA_NPS|XLLP_USBOHCI_UHCRHDA_PSM);
; 130  : 		        pUsbhHandle->pUSBHRegs->UHCRHDA &= ~(XLLP_USBOHCI_UHCRHDA_NPS);

  000e8	e5902000	 ldr         r2, [r0]

; 131  : 				pUsbhHandle->pUSBHRegs->UHCRHDA &= ~(XLLP_USBOHCI_UHCRHDA_PSM);

  000ec	e5923048	 ldr         r3, [r2, #0x48]
  000f0	e3c33c02	 bic         r3, r3, #2, 24
  000f4	e5823048	 str         r3, [r2, #0x48]
  000f8	e5902000	 ldr         r2, [r0]
  000fc	e5923048	 ldr         r3, [r2, #0x48]
  00100	e3c33c01	 bic         r3, r3, #1, 24

; 132  : 				break;

  00104	ea000002	 b           |$L1006|
  00108		 |$L906|

; 119  : 	{
; 120  : 	case	XLLP_USBOHCI_PPM_NPS:
; 121  : 				// set NO Power Switching mode
; 122  : 				pUsbhHandle->pUSBHRegs->UHCRHDA |= XLLP_USBOHCI_UHCRHDA_NPS;			

  00108	e5902000	 ldr         r2, [r0]
  0010c	e5923048	 ldr         r3, [r2, #0x48]
  00110	e3833c02	 orr         r3, r3, #2, 24
  00114		 |$L1006|
  00114	e5823048	 str         r3, [r2, #0x48]
  00118		 |$L903|

; 181  : 
; 182  : 	}
; 183  :     return (XLLP_USBH_SUCCESS);

  00118	e3a00000	 mov         r0, #0

; 184  : }

  0011c	e8bd40f0	 ldmia       sp!, {r4 - r7, lr}
  00120	e12fff1e	 bx          lr
  00124		 |$M1008|

			 ENDP  ; |XllpUsbhSelectPowerManagementMode|

	EXPORT	|XllpUsbhPowerUp|
	IMPORT	|XllpUsbhPortEnableOverCurrentNotification|
	IMPORT	|XllpUsbhPortEnablePower|

  00000			 AREA	 |.text| { |XllpUsbhPowerUp| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$XllpUsbhPowerUp|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpUsbhPowerUp| } ; comdat associative
|$T1046| DCD	|$L1045|
	DCD	0x40001401
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |XllpUsbhPowerUp| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |XllpUsbhPowerUp| PROC

; 212  : {

  00000		 |$L1045|
  00000	e92d4010	 stmdb       sp!, {r4, lr}
  00004		 |$M1043|
  00004	e1a04000	 mov         r4, r0

; 213  : 	// make sure the ohci block is running (eg. getting clocked)
; 214  : 	XllpUsbhTurnOnUSBHostClock(pUsbhHandle);	

  00008	e594200c	 ldr         r2, [r4, #0xC]

; 215  : 
; 216  : 	// this sets up Port 1 Pwr notification using gpio 88 as input in alternate function 1 mode
; 217  : 	XllpUsbhPortEnableOverCurrentNotification(pUsbhHandle, XLLP_USBH_PORT_1);

  0000c	e3a01001	 mov         r1, #1
  00010	e5923004	 ldr         r3, [r2, #4]
  00014	e3833b01	 orr         r3, r3, #1, 22
  00018	e5823004	 str         r3, [r2, #4]
  0001c	eb000000	 bl          XllpUsbhPortEnableOverCurrentNotification

; 218  : 
; 219  : 	// this sets up Port 1 Pwr enable using gpio 89 as output in alternate function 2 mode
; 220  : 	XllpUsbhPortEnablePower(pUsbhHandle, XLLP_USBH_PORT_1);

  00020	e3a01001	 mov         r1, #1
  00024	e1a00004	 mov         r0, r4
  00028	eb000000	 bl          XllpUsbhPortEnablePower

; 221  : 
; 222  : 	XllpUsbhSelectPowerManagementMode(pUsbhHandle, XLLP_USBOHCI_PPM_NPS, 0, 0 );

  0002c	e5942000	 ldr         r2, [r4]

; 223  : 
; 224  : 	XllpUsbhReset(pUsbhHandle);

  00030	e1a00004	 mov         r0, r4
  00034	e5923048	 ldr         r3, [r2, #0x48]
  00038	e3833c02	 orr         r3, r3, #2, 24
  0003c	e5823048	 str         r3, [r2, #0x48]
  00040	eb000000	 bl          XllpUsbhReset

; 225  : 
; 226  :     return (XLLP_USBH_SUCCESS);

  00044	e3a00000	 mov         r0, #0

; 227  : }

  00048	e8bd4010	 ldmia       sp!, {r4, lr}
  0004c	e12fff1e	 bx          lr
  00050		 |$M1044|

			 ENDP  ; |XllpUsbhPowerUp|

	EXPORT	|XllpUsbhPowerDown|

  00000			 AREA	 |.text| { |XllpUsbhPowerDown| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$XllpUsbhPowerDown|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpUsbhPowerDown| } ; comdat associative
|$T1056| DCD	|$L1055|
	DCD	0x40000c00
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |XllpUsbhPowerDown| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |XllpUsbhPowerDown| PROC

; 253  : {

  00000		 |$L1055|
  00000		 |$M1053|
  00000	e1a01000	 mov         r1, r0

; 254  : 
; 255  : 	//Check this whether its enough
; 256  : 	//set global power switch mode
; 257  : 	pUsbhHandle->pUSBHRegs->UHCRHDA  &= ~ (XLLP_USBOHCI_UHCRHDA_NPS | XLLP_USBOHCI_UHCRHDA_PSM);  

  00004	e5912000	 ldr         r2, [r1]

; 258  : 
; 259  :     //Clear global power
; 260  : 	XLLP_USBOHCI_UHCRHS_MWRITE( pUsbhHandle, XLLP_USBOHCI_UHCRHS_CGP); 
; 261  : 
; 262  :     return (XLLP_USBH_SUCCESS);

  00008	e3a00000	 mov         r0, #0
  0000c	e5923048	 ldr         r3, [r2, #0x48]
  00010	e3c33c03	 bic         r3, r3, #3, 24
  00014	e5823048	 str         r3, [r2, #0x48]
  00018	e5912000	 ldr         r2, [r1]
  0001c	e5923050	 ldr         r3, [r2, #0x50]
  00020	e3c33802	 bic         r3, r3, #2, 16
  00024	e3833001	 orr         r3, r3, #1
  00028	e5823050	 str         r3, [r2, #0x50]

; 263  : }

  0002c	e12fff1e	 bx          lr
  00030		 |$M1054|

			 ENDP  ; |XllpUsbhPowerDown|

	EXPORT	|XllpUsbhPortEnableSleepStandbyEnable|

  00000			 AREA	 |.text| { |XllpUsbhPortEnableSleepStandbyEnable| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$XllpUsbhPortEnableSleepStandbyEnable|, PDATA, SELECTION=5, ASSOC=|.text| { |XllpUsbhPortEnableSleepStandbyEnable| } ; comdat associative
|$T1069| DCD	|$L1068|
	DCD	0x40001c00
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |XllpUsbhPortEnableSleepStandbyEnable| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |XllpUsbhPortEnableSleepStandbyEnable| PROC

; 298  : {

  00000		 |$L1068|
  00000		 |$M1066|

; 299  : 	switch(Port)

  00000	e3510001	 cmp         r1, #1
  00004	0a000011	 beq         |$L940|
  00008	e3510002	 cmp         r1, #2
  0000c	0a000008	 beq         |$L943|
  00010	e3510003	 cmp         r1, #3
  00014	1a000013	 bne         |$L942|

; 323  : 
; 324  : 
; 325  : 	  case	XLLP_USBH_PORT_3:		
; 326  : 		if (XLLP_TRUE == enable)

  00018	e3520001	 cmp         r2, #1

; 327  : 		{
; 328  : 		  pUsbhHandle->pUSBHRegs->UHCHR &= ~XLLP_USBOHCI_UHCHR_SSEP3;

  0001c	e5902000	 ldr         r2, [r0]
  00020	e5923064	 ldr         r3, [r2, #0x64]
  00024	03c33b02	 biceq       r3, r3, #2, 22
  00028	0a00000d	 beq         |$L1065|

; 329  : 		}
; 330  : 		else
; 331  : 		{
; 332  : 		  pUsbhHandle->pUSBHRegs->UHCHR |= XLLP_USBOHCI_UHCHR_SSEP3;

  0002c	e3833b02	 orr         r3, r3, #2, 22

; 333  : 		}
; 334  : 		break;

  00030	ea00000b	 b           |$L1065|
  00034		 |$L943|

; 309  : 		}
; 310  : 		break;
; 311  : 
; 312  : 
; 313  : 	  case	XLLP_USBH_PORT_2:		
; 314  : 		if (XLLP_TRUE == enable)

  00034	e3520001	 cmp         r2, #1

; 315  : 		{
; 316  : 		  pUsbhHandle->pUSBHRegs->UHCHR &= ~XLLP_USBOHCI_UHCHR_SSEP2;

  00038	e5902000	 ldr         r2, [r0]
  0003c	e5923064	 ldr         r3, [r2, #0x64]
  00040	03c33b01	 biceq       r3, r3, #1, 22
  00044	0a000006	 beq         |$L1065|

; 317  : 		}
; 318  : 		else
; 319  : 		{
; 320  : 		  pUsbhHandle->pUSBHRegs->UHCHR |= XLLP_USBOHCI_UHCHR_SSEP2;

  00048	e3833b01	 orr         r3, r3, #1, 22

; 321  : 		}
; 322  : 		break;

  0004c	ea000004	 b           |$L1065|
  00050		 |$L940|

; 300  : 	{
; 301  : 	  case	XLLP_USBH_PORT_1:		
; 302  : 		if (XLLP_TRUE == enable)

  00050	e3520001	 cmp         r2, #1

; 303  : 		{
; 304  : 		  pUsbhHandle->pUSBHRegs->UHCHR &= ~XLLP_USBOHCI_UHCHR_SSEP1;

  00054	e5902000	 ldr         r2, [r0]
  00058	e5923064	 ldr         r3, [r2, #0x64]
  0005c	03c33c02	 biceq       r3, r3, #2, 24

; 305  : 		}
; 306  : 		else
; 307  : 		{
; 308  : 		  pUsbhHandle->pUSBHRegs->UHCHR |= XLLP_USBOHCI_UHCHR_SSEP1;

  00060	13833c02	 orrne       r3, r3, #2, 24
  00064		 |$L1065|
  00064	e5823064	 str         r3, [r2, #0x64]
  00068		 |$L942|

; 335  : 	}
; 336  :     return (XLLP_USBH_SUCCESS);

  00068	e3a00000	 mov         r0, #0

; 337  : }

  0006c	e12fff1e	 bx          lr
  00070		 |$M1067|

			 ENDP  ; |XllpUsbhPortEnableSleepStandbyEnable|

	END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -