14 #ifdef __SIMPLE_DEVICE__
23 if (mem_base == 0 || mem_base == 0xffffffff)
26 return (
u8 *)(mem_base & ~0xf);
71 #define XHCI_RESET_DELAY_US 1000
72 #define XHCI_RESET_TIMEOUT 100
81 #ifdef __SIMPLE_DEVICE__
87 u32 status, port_disabled;
103 if (port_disabled & (1 <<
port))
121 if (port_disabled & (1 <<
port))
129 port_disabled |= 1 <<
port;
137 if (port_disabled & (1 <<
port))
155 #ifdef __SIMPLE_DEVICE__
163 if (!mem_base || slp_typ <
ACPI_S3)
174 reg32 =
read32(mem_base + 0x816c);
175 reg32 &= ~((1 << 14) | (1 << 2));
176 write32(mem_base + 0x816c, reg32);
182 reg32 =
read32(mem_base + 0x80e0);
184 write32(mem_base + 0x80e0, reg32);
196 u32 port_mask, route;
244 reg32 |= (1 << 18) | (1 << 17) | (1 << 8);
247 reg32 |= (1 << 21) | (1 << 20);
250 reg32 |= (1 << 21) | (1 << 20) | (1 << 18) | (1 << 17) | (1 << 8);
286 reg32 =
read32(mem_base + 0x8144);
289 reg32 |= (1 << 8) | (1 << 7) | (1 << 6);
292 reg32 &= ~((1 << 7) | (1 << 6));
295 write32(mem_base + 0x8144, reg32);
299 reg32 =
read32(mem_base + 0x816c);
300 reg32 &= ~0x000fffff;
302 write32(mem_base + 0x816c, reg32);
311 reg32 &= ~0x1fffffff;
315 reg32 &= ~0x07ffffff;
350 static const struct pci_driver pch_usb_xhci
__pci_driver = {
static int acpi_is_wakeup_s3(void)
static void write32(void *addr, uint32_t val)
static uint32_t read32(const void *addr)
#define APM_CNT_ROUTE_ALL_XHCI
static __always_inline void pci_or_config32(const struct device *dev, u16 reg, u32 ormask)
static __always_inline void pci_write_config32(const struct device *dev, u16 reg, u32 val)
static __always_inline void pci_update_config32(const struct device *dev, u16 reg, u32 mask, u32 or)
static __always_inline void pci_or_config16(const struct device *dev, u16 reg, u16 ormask)
static __always_inline u32 pci_read_config32(const struct device *dev, u16 reg)
static __always_inline void pci_write_config16(const struct device *dev, u16 reg, u16 val)
static __always_inline void pci_update_config16(const struct device *dev, u16 reg, u16 mask, u16 or)
static __always_inline void pci_and_config32(const struct device *dev, u16 reg, u32 andmask)
static __always_inline void pci_write_config8(const struct device *dev, u16 reg, u8 val)
#define PCI_BASE_ADDRESS_0
void pci_dev_enable_resources(struct device *dev)
void pci_dev_read_resources(struct device *dev)
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
void pci_dev_set_resources(struct device *dev)
#define PCI_DID_INTEL_LPT_H_XHCI
#define PCI_DID_INTEL_LPT_LP_XHCI
#define XHCI_USB3_PORTSC_PED
#define XHCI_USB3_PORTSC_WPR
#define XHCI_USB3_PORTSC_CHST
#define XHCI_PLSR_POLLING
#define XHCI_USB3_PORTSC_WRC
#define XHCI_USB3_PORTSC_PLS
#define XHCI_USB3_PORTSC(port)
#define XHCI_PLSR_RXDETECT
#define PCH_DISABLE_EHCI1
void usb_xhci_sleep_prepare(pci_devfn_t dev, u8 slp_typ)
#define XHCI_USB3FUS_SS_MASK
#define XHCI_USB2PR_HCSEL
#define XHCI_USB3FUS_SS_SHIFT
void pch_iobp_update(u32 address, u32 andvalue, u32 orvalue)
static int pch_is_lp(void)
#define PWR_CTL_STATUS_PME
void usb_xhci_route_all(void)
#define PWR_CTL_ENABLE_PME
void usb_ehci_disable(pci_devfn_t dev)
static void usb_xhci_reset_status_usb3(u8 *mem_base, int port)
static void usb_xhci_clock_gating(struct device *dev)
static int usb_xhci_port_count_usb3(u8 *mem_base)
static struct device_operations usb_xhci_ops
#define XHCI_RESET_DELAY_US
static u8 * usb_xhci_mem_base(struct device *dev)
static const struct pci_driver pch_usb_xhci __pci_driver
static const unsigned short pci_device_ids[]
static void usb_xhci_reset_port_usb3(u8 *mem_base, int port)
#define XHCI_RESET_TIMEOUT
static void usb_xhci_init(struct device *dev)
static void usb_xhci_reset_usb3(struct device *dev, int all)
void(* read_resources)(struct device *dev)
DEVTREE_CONST void * chip_info