From 27eedbf557f511efbe5651fa2fbfa0e4e8315ab7 Mon Sep 17 00:00:00 2001 From: Russell King Date: Wed, 26 Mar 2008 18:44:58 -0700 Subject: iop: when scanning PCI bus, translate the PCI addresses according to the outbound window settings ... otherwise we end up trying to access peripherals using wrong PCI addresses. Cc: Lennert Buytenhek Acked-by: Dan Williams Signed-off-by: Russell King --- arch/arm/plat-iop/pci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-iop/pci.c b/arch/arm/plat-iop/pci.c index 9e83066cc056..ee6deaabf9b5 100644 --- a/arch/arm/plat-iop/pci.c +++ b/arch/arm/plat-iop/pci.c @@ -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]; -- cgit v1.2.3-59-g8ed1b