Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5194 → Rev 5247

/drivers/ethernet/i8255x.asm
187,21 → 187,6
 
ends
 
macro delay {
push eax
in ax, dx
in ax, dx
in ax, dx
in ax, dx
in ax, dx
in ax, dx
in ax, dx
in ax, dx
in ax, dx
in ax, dx
pop eax
}
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; proc START ;;
896,7 → 881,7
 
mov al, EE_CS
out dx, al
delay
call udelay
 
;-----------------------
; Write this to the chip
908,11 → 893,11
or al, EE_DI
@@:
out dx, al
delay
call udelay
 
and al, not EE_SK
out dx, al
delay
call udelay
 
loop .loop
 
926,7 → 911,7
shl esi, 1
mov al, EE_CS + EE_SK
out dx, al
delay
call udelay
 
in al, dx
test al, EE_DO
936,7 → 921,7
 
mov al, EE_CS
out dx, al
delay
call udelay
 
loop .loop2
 
985,11 → 970,11
or al, EE_DI
@@:
out dx, al
delay
call udelay
 
and al, not EE_SK
out dx, al
delay
call udelay
 
loop .loop
 
1005,11 → 990,11
or al, EE_DI
@@:
out dx, al
delay
call udelay
 
and al, not EE_SK
out dx, al
delay
call udelay
 
loop .loop2
 
1032,7 → 1017,7
 
mov al, EE_CS ; activate eeprom
out dx, al
delay
call udelay
 
mov si, EE_READ shl 13
xor ecx, ecx
1043,11 → 1028,11
or al, EE_DI
@@:
out dx, al
delay
call udelay
 
and al, not EE_SK
out dx, al
delay
call udelay
 
inc ecx
 
1076,7 → 1061,17
ret
 
 
; Wait a minimum of 2µs
udelay:
pusha
mov esi, 1
invoke Sleep
popa
 
ret
 
 
 
; cx = phy addr
; dx = phy reg addr
 
1099,7 → 1094,7
out dx, eax
 
.wait:
delay
call udelay
in eax, dx
test eax, 1 shl 28 ; ready bit
jz .wait
1131,7 → 1126,7
out dx, eax
 
.wait:
delay
call udelay
in eax, dx
test eax, 1 shl 28 ; ready bit
jz .wait