Rev 6717 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6717 | Rev 6948 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2017. 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 | ;; i8255x (Intel eepro 100) driver for KolibriOS ;; |
6 | ;; i8255x (Intel eepro 100) driver for KolibriOS ;; |
7 | ;; ;; |
7 | ;; ;; |
8 | ;; Written by hidnplayr@kolibrios.org ;; |
8 | ;; Written by hidnplayr@kolibrios.org ;; |
Line 430... | Line 430... | ||
430 | ; First, identify the device |
430 | ; First, identify the device |
Line 431... | Line 431... | ||
431 | 431 | ||
Line 432... | Line 432... | ||
432 | invoke PciRead32, [ebx + device.pci_bus], [ebx + device.pci_dev], PCI_header.vendor_id ; get device/vendor id |
432 | invoke PciRead32, [ebx + device.pci_bus], [ebx + device.pci_dev], PCI_header.vendor_id ; get device/vendor id |
433 | - | ||
434 | DEBUGF 1,"Vendor_id=0x%x\n", ax |
433 | |
435 | 434 | DEBUGF 1,"Vendor_id=0x%x\n", ax |
|
436 | cmp ax, 0x8086 |
435 | cmp ax, 0x8086 |
Line 437... | Line 436... | ||
437 | jne .notfound |
436 | jne .notfound |
438 | shr eax, 16 |
- | |
439 | 437 | shr eax, 16 |
|
440 | DEBUGF 1,"Device_id=0x%x\n", ax |
438 | |
441 | 439 | DEBUGF 1,"Device_id=0x%x\n", ax |
|
442 | mov ecx, DEVICE_IDs |
440 | mov ecx, DEVICE_IDs |
443 | mov edi, device_id_list |
441 | mov edi, device_id_list |
Line 481... | Line 479... | ||
481 | set_io [ebx + device.io_addr], 0 |
479 | set_io [ebx + device.io_addr], 0 |
482 | set_io [ebx + device.io_addr], REG_EEPROM |
480 | set_io [ebx + device.io_addr], REG_EEPROM |
483 | mov eax, PORT_SELECTIVE_RESET |
481 | mov eax, PORT_SELECTIVE_RESET |
484 | out dx, eax |
482 | out dx, eax |
Line 485... | Line 483... | ||
485 | 483 | ||
486 | mov esi, 1 |
484 | mov esi, 10 |
Line 487... | Line 485... | ||
487 | invoke Sleep |
485 | invoke Sleep |
488 | 486 | ||
Line 615... | Line 613... | ||
615 | mov esi, confcmd_data |
613 | mov esi, confcmd_data |
616 | lea edi, [ebx + device.confcmd.data] |
614 | lea edi, [ebx + device.confcmd.data] |
617 | mov ecx, 22 |
615 | mov ecx, 22 |
618 | rep movsb |
616 | rep movsb |
Line 619... | Line -... | ||
619 | - | ||
620 | mov byte[ebx + device.confcmd.data + 1], 0x88 ; fifo of 8 each |
- | |
621 | mov byte[ebx + device.confcmd.data + 4], 0 |
- | |
622 | mov byte[ebx + device.confcmd.data + 5], 0x80 |
- | |
623 | mov byte[ebx + device.confcmd.data + 15], 0x48 |
- | |
624 | mov byte[ebx + device.confcmd.data + 19], 0x80 |
- | |
625 | mov byte[ebx + device.confcmd.data + 21], 0x05 |
- | |
626 | 617 | ||
627 | set_io [ebx + device.io_addr], REG_SCB_PTR |
618 | set_io [ebx + device.io_addr], REG_SCB_PTR |
628 | lea eax, [ebx + device.confcmd.status] |
619 | lea eax, [ebx + device.confcmd.status] |
629 | invoke GetPhysAddr |
620 | invoke GetPhysAddr |