libpayload: Add USB support for non-PCI controllers
Restructure USB stack to not depend on PCI, and make PCI stub available on x86, but provide fixed BARs for ARM (Exynos 5) Change-Id: Iee7c8b134c22b661a9a515e24943470c9dbadd1f Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/49970 Reviewed-on: http://review.coreboot.org/4175 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
committed by
Stefan Reinauer
parent
441a4baf87
commit
8992e53c23
@@ -147,7 +147,7 @@ uhci_reinit (hci_t *controller)
|
||||
}
|
||||
|
||||
hci_t *
|
||||
uhci_init (pcidev_t addr)
|
||||
uhci_pci_init (pcidev_t addr)
|
||||
{
|
||||
int i;
|
||||
u16 reg16;
|
||||
@@ -182,16 +182,17 @@ uhci_init (pcidev_t addr)
|
||||
init_device_entry (controller, 0);
|
||||
UHCI_INST (controller)->roothub = controller->devices[0];
|
||||
|
||||
controller->bus_address = addr;
|
||||
controller->reg_base = pci_read_config32 (controller->bus_address, 0x20) & ~1; /* ~1 clears the register type indicator that is set to 1 for IO space */
|
||||
/* ~1 clears the register type indicator that is set to 1
|
||||
* for IO space */
|
||||
controller->reg_base = pci_read_config32 (addr, 0x20) & ~1;
|
||||
|
||||
/* kill legacy support handler */
|
||||
uhci_stop (controller);
|
||||
mdelay (1);
|
||||
uhci_reg_write16 (controller, USBSTS, 0x3f);
|
||||
reg16 = pci_read_config16(controller->bus_address, 0xc0);
|
||||
reg16 = pci_read_config16(addr, 0xc0);
|
||||
reg16 &= 0xdf80;
|
||||
pci_write_config16 (controller->bus_address, 0xc0, reg16);
|
||||
pci_write_config16 (addr, 0xc0, reg16);
|
||||
|
||||
UHCI_INST (controller)->framelistptr = memalign (0x1000, 1024 * sizeof (flistp_t)); /* 4kb aligned to 4kb */
|
||||
if (! UHCI_INST (controller)->framelistptr)
|
||||
|
Reference in New Issue
Block a user