Exemplo n.º 1
0
int tiny_ehci_init(void)
{
	int retval;
	ehci = &_ehci;

	//memset(ehci,0,sizeof(*ehci));
	if(usb_os_init()<0)
			return 0;

	ehci->caps = (void*)0x0D040000;
	ehci->regs = (void*)(0x0D040000 + HC_LENGTH(ehci_readl(&ehci->caps->hc_capbase)));

	ehci->num_port = 4;
	/* cache this readonly data; minimize chip reads */
	ehci->hcs_params = ehci_readl( &ehci->caps->hcs_params );

	/* data structure init */
	retval = ehci_init();
	if (retval)
		return retval; 

	ehci_release_ports(); //quickly release none usb2 port

	return 0;
}
Exemplo n.º 2
0
s32 EHCI_Init(void)
{
	s32 ret;

	ehci = &_ehci;

	/* EHCI addresses */
	ehci->caps = (void *)(0x0D040000);
	ehci->regs = (void *)(0x0D040000 + HC_LENGTH(ehci_readl(&ehci->caps->hc_capbase)));

	/* Setup EHCI */
        ehci->num_port   = 4;
	ehci->hcs_params = ehci_readl(&ehci->caps->hcs_params);

	/* Initialize EHCI */
	ret = ehci_init();
	if (ret)
		return ret; 

	/* Release non USB2 ports */
        ehci_release_ports();

	return 0;
}