Subversion Repositories Kolibri OS

Rev

Rev 4423 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4423 Rev 5201
Line -... Line 1...
-
 
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
2
;;                                                              ;;
-
 
3
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;;
-
 
4
;; Distributed under terms of the GNU General Public License    ;;
-
 
5
;;                                                              ;;
-
 
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
 
7
 
-
 
8
$Revision: 4850 $
-
 
9
 
-
 
10
 
1
; Initialization of the USB subsystem.
11
; Initialization of the USB subsystem.
2
; Provides usb_init procedure, includes all needed files.
12
; Provides usb_init procedure, includes all needed files.
Line 3... Line 13...
3
 
13
 
4
; General notes:
14
; General notes:
Line 53... Line 63...
53
; hangoff.
63
; hangoff.
54
; Thus, process controllers in PCI order.
64
; Thus, process controllers in PCI order.
55
        mov     esi, pcidev_list
65
        mov     esi, pcidev_list
56
        push    0
66
        push    0
57
.kickoff:
67
.kickoff:
58
        mov     esi, [esi+PCIDEV.list.next]
68
        mov     esi, [esi+PCIDEV.fd]
59
        cmp     esi, pcidev_list
69
        cmp     esi, pcidev_list
60
        jz      .done_kickoff
70
        jz      .done_kickoff
61
        cmp     word [esi+PCIDEV.class+1], 0x0C03
71
        cmp     word [esi+PCIDEV.class+1], 0x0C03
62
        jnz     .kickoff
72
        jnz     .kickoff
63
        mov     ebx, uhci_service_name
73
        mov     ebx, uhci_service_name
Line 106... Line 116...
106
; but seems less natural.)
116
; but seems less natural.)
107
; 4a. Loop over all PCI devices, call usb_init_controller
117
; 4a. Loop over all PCI devices, call usb_init_controller
108
; for all EHCI controllers.
118
; for all EHCI controllers.
109
        mov     eax, pcidev_list
119
        mov     eax, pcidev_list
110
.scan_ehci:
120
.scan_ehci:
111
        mov     eax, [eax+PCIDEV.list.next]
121
        mov     eax, [eax+PCIDEV.fd]
112
        cmp     eax, pcidev_list
122
        cmp     eax, pcidev_list
113
        jz      .done_ehci
123
        jz      .done_ehci
114
        cmp     [eax+PCIDEV.class], 0x0C0320
124
        cmp     [eax+PCIDEV.class], 0x0C0320
115
        jnz     .scan_ehci
125
        jnz     .scan_ehci
116
        call    usb_init_controller
126
        call    usb_init_controller
Line 118... Line 128...
118
.done_ehci:
128
.done_ehci:
119
; 4b. Loop over all PCI devices, call usb_init_controller
129
; 4b. Loop over all PCI devices, call usb_init_controller
120
; for all UHCI and OHCI controllers.
130
; for all UHCI and OHCI controllers.
121
        mov     eax, pcidev_list
131
        mov     eax, pcidev_list
122
.scan_usb1:
132
.scan_usb1:
123
        mov     eax, [eax+PCIDEV.list.next]
133
        mov     eax, [eax+PCIDEV.fd]
124
        cmp     eax, pcidev_list
134
        cmp     eax, pcidev_list
125
        jz      .done_usb1
135
        jz      .done_usb1
126
        cmp     [eax+PCIDEV.class], 0x0C0300
136
        cmp     [eax+PCIDEV.class], 0x0C0300
127
        jz      @f
137
        jz      @f
128
        cmp     [eax+PCIDEV.class], 0x0C0310
138
        cmp     [eax+PCIDEV.class], 0x0C0310