diff options
author | Iru Cai <mytbk920423@gmail.com> | 2019-01-01 18:00:14 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2019-11-17 15:10:46 +0800 |
commit | 8b644d0ed1b7995262000f56cd1d31dc427416c5 (patch) | |
tree | a25cbb57ac8eb7cae5f99442cf9d4bef81405314 /src | |
parent | e0c632d073768f1b553b7cd0888194481107ab25 (diff) | |
download | coreboot-8b644d0ed1b7995262000f56cd1d31dc427416c5.tar.xz |
frag_usb_fffaf75b
Diffstat (limited to 'src')
-rw-r--r-- | src/northbridge/intel/haswell/mrc_frags.c | 10 | ||||
-rw-r--r-- | src/northbridge/intel/haswell/pei_usb.asm | 29 |
2 files changed, 14 insertions, 25 deletions
diff --git a/src/northbridge/intel/haswell/mrc_frags.c b/src/northbridge/intel/haswell/mrc_frags.c index 875ca2d9a8..06f1e7f108 100644 --- a/src/northbridge/intel/haswell/mrc_frags.c +++ b/src/northbridge/intel/haswell/mrc_frags.c @@ -649,3 +649,13 @@ void set_usb_overcurrent(PEI_USB *upd) pci_write_config32(dev, 0xcc, u3ocm2); } } + +void frag_usb_fffaf75b(PEI_USB *upd); +void frag_usb_fffaf75b(PEI_USB *upd) +{ + for (int i = 0; i < nb_usb2_ports(); i++) { + u32 a1 = (u32)(upd->ehci_settings[i].f4 & 7) << 8; + u32 a2 = (u32)(upd->ehci_settings[i].f5 & 7) << 11; + pch_iobp_update((0xe50041 + i) << 8, 0xffff80ff, a1 | a2); + } +} diff --git a/src/northbridge/intel/haswell/pei_usb.asm b/src/northbridge/intel/haswell/pei_usb.asm index 975c600532..e54689e0b0 100644 --- a/src/northbridge/intel/haswell/pei_usb.asm +++ b/src/northbridge/intel/haswell/pei_usb.asm @@ -14,6 +14,7 @@ extern frag_usb_fffaecbe extern frag_usb_fffaed46 extern frag_usb_fffaeb10 extern set_usb_overcurrent +extern frag_usb_fffaf75b mrc_init_usb: push ebp @@ -747,33 +748,11 @@ add esp, 4 loc_fffaf75b: mov esi, dword [ebp - 0x30] -xor ebx, ebx -jmp short loc_fffaf797 ; jmp 0xfffaf797 -loc_fffaf762: -mov al, byte [esi + 5] -mov cl, byte [esi + 6] -and eax, 7 -and ecx, 7 -shl ecx, 0xb -sub esp, 0xc -shl eax, 8 -lea edx, [ebx + 0xe50041] -or eax, ecx -mov ecx, 0xffff80ff -push eax -shl edx, 8 -mov eax, dword [ebp - 0x44] -call mrc_pch_iobp_update -inc ebx -add esi, 6 -add esp, 0x10 +push esi +call frag_usb_fffaf75b +add esp, 4 -loc_fffaf797: -call nb_usb2_ports -movzx eax, al -cmp ebx, eax -jb short loc_fffaf762 ; jb 0xfffaf762 mov ecx, dword [ebp - 0x30] test byte [ecx], 1 je loc_fffaf94f ; je 0xfffaf94f |