diff options
author | Venkata(Muni) Anda <muni@nvidia.com> | 2010-01-21 18:14:37 -0800 |
---|---|---|
committer | Venkata(Muni) Anda <muni@nvidia.com> | 2010-01-21 20:18:16 -0800 |
commit | 8d2a49a219f346573de10866042037e45898aca9 (patch) | |
tree | fb1bb2d32f0db81e58c6b369698a1bf678bd42cb | |
parent | 5e6f67c8be842c0edb243638e2b17e56a1704692 (diff) |
tegra: Added map_irq ops for the PCIe driver.
This API is used by the PCI subsystem to get the IRQ value to be used by the
devices attached to AP20.
Change-Id: I23d0020fd31673fce4a264454d88dd6e1de57634
-rw-r--r-- | arch/arm/mach-tegra/pci-enum.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/pci.c | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/pci-enum.c b/arch/arm/mach-tegra/pci-enum.c index 4355eefda6bc..1bcf659fe696 100644 --- a/arch/arm/mach-tegra/pci-enum.c +++ b/arch/arm/mach-tegra/pci-enum.c @@ -494,7 +494,7 @@ static void pci_tegra_setup_pci_device(struct pci_tegra_device *dev) } dev->res[bar_index].flags = IORESOURCE_MEM; - dev->res[bar_index].start = 0; + dev->res[bar_index].start = addr; dev->res[bar_index].end = dev->res[bar_index].start + size - 1; diff --git a/arch/arm/mach-tegra/pci.c b/arch/arm/mach-tegra/pci.c index c4ced311e223..11cafe2d85ae 100644 --- a/arch/arm/mach-tegra/pci.c +++ b/arch/arm/mach-tegra/pci.c @@ -402,12 +402,21 @@ static struct pci_bus __init *pci_tegra_scan_bus(int nr, return NULL; } +int pci_tegra_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + int ret = 0; + pci_tegra_read_conf(dev->bus, dev->devfn, PCI_INTERRUPT_LINE, + sizeof(int), &ret); + return (ret & 0x000000ff); +} + static struct hw_pci pci_tegra_data __initdata = { .nr_controllers = 2, .preinit = pci_tegra_preinit, .setup = pci_tegra_setup, .scan = pci_tegra_scan_bus, .swizzle = pci_std_swizzle, + .map_irq = pci_tegra_map_irq, }; late_initcall(pcie_tegra_init); |