summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorZhao Chenhui <b35336@freescale.com>2011-04-19 10:47:05 +0800
committerRemy Bohmer <linux@bohmer.net>2011-06-25 09:53:10 +0200
commitae46d2a952b9f061b8b2b6c9e03b18274b48a30e (patch)
tree87b464ad6c932c17474993272a9298433f951bcb /drivers/usb
parentb17ce92a424ab5ea93a1ed973e5d2ce047a7d321 (diff)
ehci-pci: Fix PCI EHCI driver for 36-bit
Convert the PCI base address into a virtual address. Signed-off-by: Zhao Chenhui <b35336@freescale.com> Signed-off-by: Li Yang <leoli@freescale.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-pci.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 4abe5e3b59..020ab11355 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -42,7 +42,6 @@ static struct pci_device_id ehci_pci_ids[] = {
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) {
@@ -50,8 +49,8 @@ int ehci_hcd_init(void)
return -1;
}
- pci_read_config_dword(pdev, PCI_BASE_ADDRESS_0, &addr);
- hccr = (struct ehci_hccr *)addr;
+ hccr = (struct ehci_hccr *)pci_map_bar(pdev,
+ PCI_BASE_ADDRESS_0, PCI_REGION_MEM);
hcor = (struct ehci_hcor *)((uint32_t) hccr +
HC_LENGTH(ehci_readl(&hccr->cr_capbase)));