提交 27eedbf5 编写于 作者: R Russell King 提交者: Dan Williams

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 <kernel@wantstofly.org>
Acked-by: NDan Williams <dan.j.williams@intel.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 c3a1c9c7
...@@ -209,8 +209,11 @@ int iop3xx_pci_setup(int nr, struct pci_sys_data *sys) ...@@ -209,8 +209,11 @@ int iop3xx_pci_setup(int nr, struct pci_sys_data *sys)
res[1].flags = IORESOURCE_MEM; res[1].flags = IORESOURCE_MEM;
request_resource(&iomem_resource, &res[1]); 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[0] = &res[0];
sys->resource[1] = &res[1]; sys->resource[1] = &res[1];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册