47 u8 ehci_bar = 0x10 + 4 * ((cap >> 29) - 1);
56 *
base = CONFIG_EHCI_BAR;
57 *dbg_offset = (cap>>16) & 0x1ffc;
69 static void pci_ehci_set_resources(
struct device *dev)
92 memcpy(&ehci_dbg_ops, dev->
ops,
sizeof(ehci_dbg_ops));
93 ehci_drv_ops = dev->
ops;
95 dev->
ops = &ehci_dbg_ops;
static uint32_t read32(const void *addr)
void * memcpy(void *dest, const void *src, size_t n)
#define printk(level,...)
struct resource * probe_resource(const struct device *dev, unsigned int index)
See if a resource structure already exists for a given index.
void report_resource_stored(struct device *dev, const struct resource *resource, const char *comment)
Print the resource that was just stored.
const char * dev_path(const struct device *dev)
void usbdebug_disable(void)
void usbdebug_re_enable(uintptr_t ehci_base)
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define PCI_CAP_ID_EHCI_DEBUG
#define PCI_PM_CTRL_STATE_MASK
#define PCI_COMMAND_MASTER
#define PCI_COMMAND_MEMORY
#define PCI_PM_CTRL_PME_ENABLE
#define PCI_DEV2SEGBUS(sdev)
#define PCI_CLASS_REVISION
unsigned int pci_match_simple_dev(struct device *dev, pci_devfn_t sdev)
Test for match between romstage and ramstage device instance.
void pci_dev_read_resources(struct device *dev)
int ehci_debug_hw_enable(unsigned int *base, unsigned int *dbg_offset)
u8 * pci_ehci_base_regs(pci_devfn_t sdev)
void ehci_debug_select_port(unsigned int port)
#define pci_ehci_read_resources
pci_devfn_t pci_ehci_dbg_dev(unsigned int hcd_idx)
void pci_ehci_dbg_set_port(pci_devfn_t dev, unsigned int port)
#define PCI_EHCI_CLASSCODE
static __always_inline uint32_t pci_s_read_config32(pci_devfn_t dev, uint16_t reg)
static __always_inline uint16_t pci_s_read_config16(pci_devfn_t dev, uint16_t reg)
static __always_inline void pci_s_write_config8(pci_devfn_t dev, uint16_t reg, uint8_t value)
static __always_inline void pci_s_write_config16(pci_devfn_t dev, uint16_t reg, uint16_t value)
static __always_inline void pci_s_write_config32(pci_devfn_t dev, uint16_t reg, uint32_t value)
u16 pci_s_find_capability(pci_devfn_t dev, u16 cap)
Given a device, and a capability type, return the next matching capability.
void(* set_resources)(struct device *dev)
struct device_operations * ops