sb/intel/bd82x6x/early_usb: Print error for invalid USB setting
According to BWG the USB current setting 0 should not be used for desktop boards. As autoport defaults to 0 if the USB current doesn't match one of the lookup table entries most of the desktop boards in tree have such a setting. Print an error to alert users of such boards to update the USB current settings. Tested: Lenovo X220 still boots. Change-Id: If76e9126b4aba8e16c1c91dece725aac12e1a7e9 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78827 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
42ea8b2c67
commit
c943d6f6a4
|
@ -1,5 +1,6 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <console/console.h>
|
||||||
#include <device/mmio.h>
|
#include <device/mmio.h>
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
#include <device/pci_def.h>
|
#include <device/pci_def.h>
|
||||||
|
@ -23,8 +24,22 @@ void early_usb_init(const struct southbridge_usb_port *portmap)
|
||||||
/* Unlock registers. */
|
/* Unlock registers. */
|
||||||
write_pmbase16(UPRWC, read_pmbase16(UPRWC) | UPRWC_WR_EN);
|
write_pmbase16(UPRWC, read_pmbase16(UPRWC) | UPRWC_WR_EN);
|
||||||
|
|
||||||
for (i = 0; i < 14; i++)
|
for (i = 0; i < 14; i++) {
|
||||||
|
if (portmap[i].enabled && !pch_is_mobile() && portmap[i].current == 0) {
|
||||||
|
/*
|
||||||
|
* Note for developers: You can fix this by re-running autoport on
|
||||||
|
* vendor firmware and then updating portmap currents accordingly.
|
||||||
|
* If that is not possible, another option is to choose a non-zero
|
||||||
|
* current setting. In either case, please test all the USB ports.
|
||||||
|
*/
|
||||||
|
printk(BIOS_ERR, "%s: USB%02d: current setting of 0 is an invalid setting for desktop!\n",
|
||||||
|
__func__, i);
|
||||||
|
|
||||||
|
RCBA32(USBIR0 + 4 * i) = currents[1];
|
||||||
|
} else {
|
||||||
RCBA32(USBIR0 + 4 * i) = currents[portmap[i].current];
|
RCBA32(USBIR0 + 4 * i) = currents[portmap[i].current];
|
||||||
|
}
|
||||||
|
}
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
||||||
RCBA32(0x3538 + 4 * i) = 0;
|
RCBA32(0x3538 + 4 * i) = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue