Skip to content

Commit

Permalink
iop: when scanning PCI bus, translate the PCI addresses according to …
Browse files Browse the repository at this point in the history
…the outbound window settings

... otherwise we end up trying to access peripherals using wrong PCI
addresses.

Cc: Lennert Buytenhek <kernel@wantstofly.org>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Dan Williams committed Mar 26, 2008
1 parent c3a1c9c commit 27eedbf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch/arm/plat-iop/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,11 @@ int iop3xx_pci_setup(int nr, struct pci_sys_data *sys)
res[1].flags = IORESOURCE_MEM;
request_resource(&iomem_resource, &res[1]);

sys->mem_offset = IOP3XX_PCI_LOWER_MEM_PA - IOP3XX_PCI_LOWER_MEM_BA;
sys->io_offset = IOP3XX_PCI_LOWER_IO_PA - IOP3XX_PCI_LOWER_IO_BA;
/*
* Use whatever translation is already setup.
*/
sys->mem_offset = IOP3XX_PCI_LOWER_MEM_PA - *IOP3XX_OMWTVR0;
sys->io_offset = IOP3XX_PCI_LOWER_IO_PA - *IOP3XX_OIOWTVR;

sys->resource[0] = &res[0];
sys->resource[1] = &res[1];
Expand Down

0 comments on commit 27eedbf

Please sign in to comment.