Subversion Repositories Kolibri OS

Rev

Rev 5363 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5363 Rev 9571
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 5363 $
8
$Revision: 9571 $
9
 
9
 
Line 44... Line 44...
44
        db      'UHCI',0
44
        db      'UHCI',0
45
ohci_service_name:
45
ohci_service_name:
46
        db      'OHCI',0
46
        db      'OHCI',0
47
ehci_service_name:
47
ehci_service_name:
48
        db      'EHCI',0
48
        db      'EHCI',0
-
 
49
xhci_service_name:
-
 
50
        db      'XHCI',0
49
endg
51
endg
Line 50... Line 52...
50
 
52
 
51
; Initializes the USB subsystem.
53
; Initializes the USB subsystem.
52
proc usb_init
54
proc usb_init
Line 76... Line 78...
76
        mov     ebx, ohci_service_name
78
        mov     ebx, ohci_service_name
77
        cmp     byte [esi+PCIDEV.class], 0x10
79
        cmp     byte [esi+PCIDEV.class], 0x10
78
        jz      .do_kickoff
80
        jz      .do_kickoff
79
        mov     ebx, ehci_service_name
81
        mov     ebx, ehci_service_name
80
        cmp     byte [esi+PCIDEV.class], 0x20
82
        cmp     byte [esi+PCIDEV.class], 0x20
-
 
83
        jz      .do_kickoff
-
 
84
        mov     ebx, xhci_service_name
-
 
85
        cmp     byte [esi+PCIDEV.class], 0x30
81
        jnz     .kickoff
86
        jnz     .kickoff
82
.do_kickoff:
87
.do_kickoff:
83
        inc     dword [esp]
88
        inc     dword [esp]
84
        push    ebx esi
89
        push    ebx esi
85
        stdcall get_service, ebx
90
        stdcall get_service, ebx
Line 115... Line 120...
115
; in the second loop. (One loop in reversed PCI order could also be used,
120
; in the second loop. (One loop in reversed PCI order could also be used,
116
; but seems less natural.)
121
; but seems less natural.)
117
; 4a. Loop over all PCI devices, call usb_init_controller
122
; 4a. Loop over all PCI devices, call usb_init_controller
118
; for all EHCI controllers.
123
; for all EHCI controllers.
119
        mov     eax, pcidev_list
124
        mov     eax, pcidev_list
-
 
125
.scan_xhci:
-
 
126
        mov     eax, [eax+PCIDEV.fd]
-
 
127
        cmp     eax, pcidev_list
-
 
128
        jz      .done_xhci
-
 
129
        cmp     [eax+PCIDEV.class], 0x0C0330
-
 
130
        jnz     .scan_xhci
-
 
131
        call    usb_init_controller
-
 
132
        jmp     .scan_xhci
-
 
133
.done_xhci:
-
 
134
        mov     eax, pcidev_list
120
.scan_ehci:
135
.scan_ehci:
121
        mov     eax, [eax+PCIDEV.fd]
136
        mov     eax, [eax+PCIDEV.fd]
122
        cmp     eax, pcidev_list
137
        cmp     eax, pcidev_list
123
        jz      .done_ehci
138
        jz      .done_ehci
124
        cmp     [eax+PCIDEV.class], 0x0C0320
139
        cmp     [eax+PCIDEV.class], 0x0C0320