summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2019-01-02 16:24:03 +0800
committerIru Cai <mytbk920423@gmail.com>2019-11-17 15:10:46 +0800
commit2275cff4886350d377e07eb3fc00b138f3b71d6d (patch)
treea0b5c7fdf89981b66c16feae3fe9ed748c7f659c /src/northbridge
parent8a4b5d119c40becba64012e3307d37d118cfd941 (diff)
downloadcoreboot-2275cff4886350d377e07eb3fc00b138f3b71d6d.tar.xz
frag_usb_fffaf555
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/intel/haswell/mrc_frags.c12
-rw-r--r--src/northbridge/intel/haswell/pei_usb.asm26
2 files changed, 17 insertions, 21 deletions
diff --git a/src/northbridge/intel/haswell/mrc_frags.c b/src/northbridge/intel/haswell/mrc_frags.c
index 40a3af53c2..bc2c34122b 100644
--- a/src/northbridge/intel/haswell/mrc_frags.c
+++ b/src/northbridge/intel/haswell/mrc_frags.c
@@ -800,6 +800,18 @@ void set_usb_overcurrent(PEI_USB *upd)
}
}
+void frag_usb_fffaf555(PEI_USB *upd, int count);
+void frag_usb_fffaf555(PEI_USB *upd, int count)
+{
+ u32 v = 0;
+ for (int i = 0; i < count; i++) {
+ if (upd->xhci_resume_info[0x11 + i] == 1) {
+ v |= (1 << i);
+ }
+ }
+ pci_update_config32(PCI_DEV(0, 0x14, 0), 0xd8, 0xffffffc0, v);
+}
+
void frag_usb_fffaf75b(PEI_USB *upd);
void frag_usb_fffaf75b(PEI_USB *upd)
{
diff --git a/src/northbridge/intel/haswell/pei_usb.asm b/src/northbridge/intel/haswell/pei_usb.asm
index 2dcf7242fe..f7e2e1f4a6 100644
--- a/src/northbridge/intel/haswell/pei_usb.asm
+++ b/src/northbridge/intel/haswell/pei_usb.asm
@@ -20,6 +20,7 @@ extern frag_usb_loop1
extern frag_usb_loop2
extern frag_usb_loop3
extern frag_usb_loop4
+extern frag_usb_fffaf555
mrc_init_usb:
push ebp
@@ -502,28 +503,11 @@ push ebx
call frag_usb_loop1
add esp, 12
-xor eax, eax
-xor ecx, ecx
-jmp short loc_fffaf555 ; jmp 0xfffaf555
-
-loc_fffaf541:
-mov edx, dword [ebp - 0x30]
-cmp byte [edx + ecx + 0x66], 1
-jne short loc_fffaf554 ; jne 0xfffaf554
-mov edx, 1
-shl edx, cl
-or eax, edx
-
-loc_fffaf554:
-inc ecx
+push dword [ebp - 0x34]
+push dword [ebp - 0x30]
+call frag_usb_fffaf555
+add esp, 8
-loc_fffaf555:
-cmp ecx, dword [ebp - 0x34]
-jne short loc_fffaf541 ; jne 0xfffaf541
-mov edx, dword [edi + 0xa00d8]
-and edx, 0xffffffc0
-or edx, eax
-mov dword [edi + 0xa00d8], edx
mov ecx, dword [ebp - 0x34]
lea ecx, [esi + ecx*4]
mov dword [ebp - 0x2c], ecx