device/xhci: Factor out `struct xhci_usb_info`

This commit factors out `struct xhci_usb_info` from intel specific code
as it will be useful on other platforms.

BUG=b:186792595
TEST=Builds for volteer

Change-Id: I5b4cc6268f072c6948f11c7498a564d7a5c0a190
Signed-off-by: Robert Zieba <robertzieba@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67934
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
This commit is contained in:
Robert Zieba 2022-08-10 16:56:09 -06:00 committed by Martin L Roth
parent 4428195692
commit a23aa1ca90
2 changed files with 15 additions and 14 deletions

View File

@ -81,6 +81,20 @@ struct xhci_ext_cap {
}; };
}; };
/*
* struct xhci_usb_info - Data containing number of USB ports & offset.
* @usb2_port_status_reg: Offset to USB2 port status register.
* @num_usb2_ports: Number of USB2 ports.
* @usb3_port_status_reg: Offset to USB3 port status register.
* @num_usb3_ports: Number of USB3 ports.
*/
struct xhci_usb_info {
uint32_t usb2_port_status_reg;
uint32_t num_usb2_ports;
uint32_t usb3_port_status_reg;
uint32_t num_usb3_ports;
};
/** /**
* Iterates over the xHCI Extended Capabilities List. * Iterates over the xHCI Extended Capabilities List.
*/ */

View File

@ -4,23 +4,10 @@
#define SOC_INTEL_COMMON_BLOCK_XHCI_H #define SOC_INTEL_COMMON_BLOCK_XHCI_H
#include <device/device.h> #include <device/device.h>
#include <device/xhci.h>
#include <elog.h> #include <elog.h>
#include <stdint.h> #include <stdint.h>
/*
* struct xhci_usb_info - Data containing number of USB ports & offset.
* @usb2_port_status_reg: Offset to USB2 port status register.
* @num_usb2_ports: Number of USB2 ports.
* @usb3_port_status_reg: Offset to USB3 port status register.
* @num_usb3_ports: Number of USB3 ports.
*/
struct xhci_usb_info {
uint32_t usb2_port_status_reg;
uint32_t num_usb2_ports;
uint32_t usb3_port_status_reg;
uint32_t num_usb3_ports;
};
/* /*
* struct xhci_wake_info - Relates an XHCI device to registers and wake types * struct xhci_wake_info - Relates an XHCI device to registers and wake types
* @xhci_dev: devfn of the XHCI device * @xhci_dev: devfn of the XHCI device