summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/pci-enum.c
diff options
context:
space:
mode:
authorVenkata(Muni) Anda <muni@nvidia.com>2010-01-11 21:45:52 -0800
committerVenkata(Muni) Anda <muni@nvidia.com>2010-01-12 18:02:57 -0800
commitbc462b6f0c864944aa8d9751206a1b353323ddcd (patch)
tree6b83cbe359cac03d4794856eb9cc694702655869 /arch/arm/mach-tegra/pci-enum.c
parentc6acdf93b7ceb1dba5b365322bf56e52852082f3 (diff)
Tegra: Pcie driver update.
-Assign IO resources starting from 0x16 instead of 0. This is needed becase the linux driver is assuming that "start" value of 0 is an allocated resource. -Added asserts to catch config access other than byte/word/dword. -Configuring interrupt as INTA to all the PCI devices. With this change PCI driver is fully functional. Able to mount and see the SATA drive. Change-Id: I12a6017d0f304edf018bf54b518f5e40a95ab5eb
Diffstat (limited to 'arch/arm/mach-tegra/pci-enum.c')
-rw-r--r--arch/arm/mach-tegra/pci-enum.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/arm/mach-tegra/pci-enum.c b/arch/arm/mach-tegra/pci-enum.c
index 1dab1de0a86d..4f8c614ff8fc 100644
--- a/arch/arm/mach-tegra/pci-enum.c
+++ b/arch/arm/mach-tegra/pci-enum.c
@@ -434,8 +434,8 @@ static void pci_tegra_setup_pci_bridge(struct pci_tegra_device *dev)
reg |= PCI_COMMAND_SERR;
pci_conf_write16(dev->bus, dev->devfn, PCI_COMMAND, reg);
- /* FIXME how to handle interrutps */
- pci_conf_write8(dev->bus, dev->devfn, PCI_INTERRUPT_LINE, 0x82);
+ pci_conf_write8(dev->bus, dev->devfn, PCI_INTERRUPT_LINE,
+ tegra_get_module_inst_irq("pcie", 0, 0));
pci_conf_write8(dev->bus, dev->devfn, PCI_INTERRUPT_PIN, 0xa);
}
@@ -535,8 +535,9 @@ static void pci_tegra_setup_pci_device(struct pci_tegra_device *dev)
reg |= PCI_COMMAND_SERR;
pci_conf_write16(dev->bus, dev->devfn, PCI_COMMAND, reg);
- /* FIXME how to handle interrutps */
-
+ pci_conf_write8(dev->bus, dev->devfn, PCI_INTERRUPT_LINE,
+ tegra_get_module_inst_irq("pcie", 0, 0));
+ pci_conf_write8(dev->bus, dev->devfn, PCI_INTERRUPT_PIN, 0xa);
}
static void pci_tegra_print_device_tree(struct pci_tegra_device *dev)
@@ -612,8 +613,12 @@ void pci_tegra_enumerate(void)
/* Disable all execptions */
pci_tegra_afi_writel(0, AFI_FPCI_ERROR_MASKS_0);
- /* Set the base and limits of the resources */
- pci_tegra_io_base = TEGRA_PCIE_BASE + PCIE_DOWNSTREAM_IO_OFFSET;
+ /* Set the base and limits for the resources */
+
+ /* Starting the IO offset from non-zero value as linux equating a value
+ * of 0 as unallocated resoruce and bailing out!
+ */
+ pci_tegra_io_base = TEGRA_PCIE_BASE + PCIE_DOWNSTREAM_IO_OFFSET + 16;
pci_tegra_io_limt = pci_tegra_io_base + PCIE_DOWNSTREAM_IO_SIZE;
pci_tegra_mem_base = FPCI_NON_PREFETCH_MEMORY_OFFSET;