ehci: memset the qTD structures in ehci_alloc_intr_pipe

The qTD structures were not being cleared in ehci_alloc_intr_pipe()
and it was possible that garbage could have been in some of the
fields.  Also, memset the data array for sanity purposes.

A similar fix is in the Chromium seabios repo (3e711dc261).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vgahooks: Add Google stumpy, lumpy, and link boards to intel vgahook list.

Add in the detection for a handful of additional boards found in the
Chromium repo.  This ports over and simplifies the code in that repo.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
coreboot: Support alternative locations for CBFS.

The Google builds of SeaBIOS place the CBFS data in a non-standard
location.  Add a config parameter to support non-standard locations.
This is based on a patch from Stefan Reinauer <reinauer@chromium.org>
in the Chromium seabios repo (commit 60534ec785).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
scripts: Allow encodeint.py to take integers in hex notation.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Testing of usb debug device.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
xhci: allocate scratch pad buffers

Untested.  Anyone who tried to get xhci run on real hardware
is welcome to test whenever this patch improves things.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
xhci: Use 64bit writes to ERDP register.

At least some real-world XHCI controllers expect a 64bit write to the
ERDP register.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
xhci: Fix incorrect direction setting on status transmissions.

The status part of a control message was likely to have an incorrect
direction set.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
xhci: Set the interval parameter on interrupt pipes.

Be sure to set the interval parameter when creating an interrupt based
pipe.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
xhci: Verify PAGESIZE register before initializing driver.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
xhci: Allocate and free the xhci inctx structure on each use.

The inctx struct isn't long lived, so it doesn't need to be allocated
in permanent memory.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
xhci: Move set_address code from xhci_control to xhci_alloc_pipe.

It's easier to run the set_address from xhci_alloc_pipe as there is
more information available there.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
xhci: Eliminate 'struct xhci_device'.

Eliminate the xhci_device struct by storing the slotid in usbdevice_s
and in xhci_pipe.  The remaining storage in that struct (xhci_devctx)
is available from xhci->devs.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
xhci: Support xhci controllers with 64 byte contexts.

At least some real-world controllers require 64 byte contexts.  Detect
this case and handle it appropriately.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
xhci: Allow the XHCI USB controller to be enabled for coreboot.

Initial tests look promising and at least two different real-world
chipsets show limited functionality with the support enabled.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
xhci: Don't use a dummy endpoint count in configure command.

At least some real-world controllers expect the endpoint count in the
inctx to be accurate, so set it to the pipe currently being activated.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
xhci: Report the "protocol defined" and PSIC bits of extended capabilities.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
xhci: Hack to get hubs working.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add call32_params() helper function.

Add helper function for calling 32bit functions with more than just
one parameter.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add space between DTYPE_* definitions.

Avoi consective numbering on the DTYPE_* definitions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>