mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-09 12:13:00 -04:00
mpc8xxx: USB: fix: access of ehci struct elements
This patch fixes the access to the 'ehci' struct elements which should have been taken care off in 4ef01010aa4799c759d75e67007fdd3a38c88c8a Sorry about that. Signed-off-by: Vivek Mahajan <vivek.mahajan@freescale.com> Signed-off-by: Remy Bohmer <linux@bohmer.net>
This commit is contained in:
parent
c3a012ce65
commit
0806615273
@ -41,15 +41,15 @@ int ehci_hcd_init(void)
|
|||||||
struct usb_ehci *ehci;
|
struct usb_ehci *ehci;
|
||||||
|
|
||||||
ehci = (struct usb_ehci *)CONFIG_SYS_MPC8xxx_USB_ADDR;
|
ehci = (struct usb_ehci *)CONFIG_SYS_MPC8xxx_USB_ADDR;
|
||||||
hccr = (struct ehci_hccr *)((uint32_t)ehci->caplength);
|
hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength);
|
||||||
hcor = (struct ehci_hcor *)((uint32_t) hccr +
|
hcor = (struct ehci_hcor *)((uint32_t) hccr +
|
||||||
HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
|
HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
|
||||||
|
|
||||||
/* Set to Host mode */
|
/* Set to Host mode */
|
||||||
setbits_le32((void *)ehci->usbmode, CM_HOST);
|
setbits_le32(&ehci->usbmode, CM_HOST);
|
||||||
|
|
||||||
out_be32((void *)ehci->snoop1, SNOOP_SIZE_2GB);
|
out_be32(&ehci->snoop1, SNOOP_SIZE_2GB);
|
||||||
out_be32((void *)ehci->snoop2, 0x80000000 | SNOOP_SIZE_2GB);
|
out_be32(&ehci->snoop2, 0x80000000 | SNOOP_SIZE_2GB);
|
||||||
|
|
||||||
/* Init phy */
|
/* Init phy */
|
||||||
if (!strcmp(getenv("usb_phy_type"), "utmi"))
|
if (!strcmp(getenv("usb_phy_type"), "utmi"))
|
||||||
@ -58,13 +58,13 @@ int ehci_hcd_init(void)
|
|||||||
out_le32(&(hcor->or_portsc[0]), PORT_PTS_ULPI);
|
out_le32(&(hcor->or_portsc[0]), PORT_PTS_ULPI);
|
||||||
|
|
||||||
/* Enable interface. */
|
/* Enable interface. */
|
||||||
setbits_be32((void *)ehci->control, USB_EN);
|
setbits_be32(&ehci->control, USB_EN);
|
||||||
|
|
||||||
out_be32((void *)ehci->prictrl, 0x0000000c);
|
out_be32(&ehci->prictrl, 0x0000000c);
|
||||||
out_be32((void *)ehci->age_cnt_limit, 0x00000040);
|
out_be32(&ehci->age_cnt_limit, 0x00000040);
|
||||||
out_be32((void *)ehci->sictrl, 0x00000001);
|
out_be32(&ehci->sictrl, 0x00000001);
|
||||||
|
|
||||||
in_le32((void *)ehci->usbmode);
|
in_le32(&ehci->usbmode);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user