[PATCH 07/15] ARM: dove: use fixed PCI i/o mapping

Arnd Bergmann arnd at arndb.de
Mon Jul 9 11:50:55 EDT 2012


On Friday 06 July 2012, Rob Herring wrote:
> --- 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



More information about the linux-arm-kernel mailing list