/* * Create the appropriate control structures to manage * a new EHCI host controller. */ int ehci_hcd_init(void) { hccr = (struct ehci_hccr *)(INTER_REGS_BASE + MV_USB_REGS_OFFSET(0) + 0x100); hcor = (struct ehci_hcor *)((uint32_t) hccr + HC_LENGTH(ehci_readl(&hccr->cr_capbase))); debug ("Marvell init hccr %x and hcor %x hc_length %d\n", (uint32_t)hccr, (uint32_t)hcor, (uint32_t)HC_LENGTH(ehci_readl(&hccr->cr_capbase))); return 0; }
/* * Create the appropriate control structures to manage * a new EHCI host controller. */ int ehci_hcd_init(void) { char *env; int usbActive; env = getenv("usbActive"); usbActive = simple_strtoul(env, NULL, 10); printf("Active port:\t"); if (usbActive >= mvCtrlUsbMaxGet()) { printf("invalid port number %d, switching to port 0\n", usbActive); usbActive=0; } else { printf("%d\n", usbActive); } hccr = (struct ehci_hccr *)(INTER_REGS_BASE + MV_USB_REGS_OFFSET(usbActive) + 0x100); hcor = (struct ehci_hcor *)((uint32_t) hccr + HC_LENGTH(ehci_readl(&hccr->cr_capbase))); debug ("Marvell init hccr %x and hcor %x hc_length %d\n", (uint32_t)hccr, (uint32_t)hcor, (uint32_t)HC_LENGTH(ehci_readl(&hccr->cr_capbase))); return 0; }