Skip to content
Snippets Groups Projects
Commit ae46d2a9 authored by Zhao Chenhui's avatar Zhao Chenhui Committed by Remy Bohmer
Browse files

ehci-pci: Fix PCI EHCI driver for 36-bit


Convert the PCI base address into a virtual address.

Signed-off-by: default avatarZhao Chenhui <b35336@freescale.com>
Signed-off-by: default avatarLi Yang <leoli@freescale.com>
parent b17ce92a
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,6 @@ static struct pci_device_id ehci_pci_ids[] = { ...@@ -42,7 +42,6 @@ static struct pci_device_id ehci_pci_ids[] = {
int ehci_hcd_init(void) int ehci_hcd_init(void)
{ {
pci_dev_t pdev; pci_dev_t pdev;
uint32_t addr;
pdev = pci_find_devices(ehci_pci_ids, CONFIG_PCI_EHCI_DEVICE); pdev = pci_find_devices(ehci_pci_ids, CONFIG_PCI_EHCI_DEVICE);
if (pdev == -1) { if (pdev == -1) {
...@@ -50,8 +49,8 @@ int ehci_hcd_init(void) ...@@ -50,8 +49,8 @@ int ehci_hcd_init(void)
return -1; return -1;
} }
pci_read_config_dword(pdev, PCI_BASE_ADDRESS_0, &addr); hccr = (struct ehci_hccr *)pci_map_bar(pdev,
hccr = (struct ehci_hccr *)addr; PCI_BASE_ADDRESS_0, PCI_REGION_MEM);
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)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment