[PATCH 07/15] ARM: dove: use fixed PCI i/o mapping
From: arnd@arndb.de (Arnd Bergmann)
Date: 2012-07-09 15:50:55
On Friday 06 July 2012, Rob Herring wrote:
quoted hunk ↗ jump to hunk
--- a/arch/arm/mach-dove/pcie.c +++ b/arch/arm/mach-dove/pcie.c@@ -60,13 +60,8 @@ static int __init dove_pcie_setup(int nr, struct pci_sys_data *sys) "PCIe %d I/O", pp->index); pp->io_space_name[sizeof(pp->io_space_name) - 1] = 0; pp->res[0].name = pp->io_space_name; - if (pp->index == 0) { - pp->res[0].start = DOVE_PCIE0_IO_PHYS_BASE; - pp->res[0].end = pp->res[0].start + DOVE_PCIE0_IO_SIZE - 1; - } else { - pp->res[0].start = DOVE_PCIE1_IO_PHYS_BASE; - pp->res[0].end = pp->res[0].start + DOVE_PCIE1_IO_SIZE - 1; - } + pp->res[0].start = nr * SZ_1M; + pp->res[0].end = pp->res[0].start + SZ_64K - 1; pp->res[0].flags = IORESOURCE_IO; if (request_resource(&ioport_resource, &pp->res[0])) panic("Request PCIe IO resource failed\n");
Why use SZ_64K here when the mapping is actually 1M? Arnd