/* Create the appropriate control structures to manage a new EHCI host controller.  */
int ehci_hcd_init(void)
/* Create the appropriate control structures to manage a new EHCI host controller.  */
int ehci_hcd_init(void)
{
	pci_dev_t pdev;
	uint32_t addr;
	pdev = pci_find_devices(ehci_pci_ids, CONFIG_PCI_EHCI_DEVICE);
	if (pdev == -1) {
		printf("EHCI host controller not found\n");
		return -1;
	}
	pci_read_config_dword(pdev, PCI_BASE_ADDRESS_0, &addr);
	hccr = (struct ehci_hccr *)addr;
	hcor = (struct ehci_hcor *)((uint32_t) hccr +
			HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
	return 0;
}