]> Pileus Git - ~andy/linux/commitdiff
Merge branch 'pci/host-mvebu' into next
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 8 Jan 2014 00:34:14 +0000 (17:34 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 8 Jan 2014 00:34:14 +0000 (17:34 -0700)
* pci/host-mvebu:
  PCI: mvebu: Use max_t() instead of max(resource_size_t,)
  PCI: mvebu: Call pci_ioremap_io() at startup instead of dynamically

1  2 
drivers/pci/host/pci-mvebu.c

index bedc0b1562b9bee2be8ed647d41bd88cd934e2f9,7889feb632edab5ccccb3a385a85b83f66486ec4..13478ecd411306115b666a9e344754966ce3012b
@@@ -342,8 -342,6 +342,6 @@@ static void mvebu_pcie_handle_iobase_ch
        mvebu_mbus_add_window_remap_by_id(port->io_target, port->io_attr,
                                          port->iowin_base, port->iowin_size,
                                          iobase);
-       pci_ioremap_io(iobase, port->iowin_base);
  }
  
  static void mvebu_pcie_handle_membase_change(struct mvebu_pcie_port *port)
@@@ -463,11 -461,6 +461,11 @@@ static int mvebu_sw_pci_bridge_read(str
                *value = 0;
                break;
  
 +      case PCI_INTERRUPT_LINE:
 +              /* LINE PIN MIN_GNT MAX_LAT */
 +              *value = 0;
 +              break;
 +
        default:
                *value = 0xffffffff;
                return PCIBIOS_BAD_REGISTER_NUMBER;
@@@ -735,9 -728,9 +733,9 @@@ static resource_size_t mvebu_pcie_align
         * aligned on their size
         */
        if (res->flags & IORESOURCE_IO)
-               return round_up(start, max((resource_size_t)SZ_64K, size));
+               return round_up(start, max_t(resource_size_t, SZ_64K, size));
        else if (res->flags & IORESOURCE_MEM)
-               return round_up(start, max((resource_size_t)SZ_1M, size));
+               return round_up(start, max_t(resource_size_t, SZ_1M, size));
        else
                return start;
  }
@@@ -993,6 -986,10 +991,10 @@@ static int mvebu_pcie_probe(struct plat
        }
  
        pcie->nports = i;
+       for (i = 0; i < (IO_SPACE_LIMIT - SZ_64K); i += SZ_64K)
+               pci_ioremap_io(i, pcie->io.start + i);
        mvebu_pcie_msi_enable(pcie);
        mvebu_pcie_enable(pcie);