Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 792688fd authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branches 'pci/host-generic', 'pci/host-mvebu', 'pci/host-rcar',...

Merge branches 'pci/host-generic', 'pci/host-mvebu', 'pci/host-rcar', 'pci/host-tegra', 'pci/msi', 'pci/misc', 'pci/resource' and 'pci/virtualization' into next

* pci/host-generic:
  PCI: generic: Fix GPL v2 license string typo

* pci/host-mvebu:
  PCI: mvebu: Fix GPL v2 license string typo

* pci/host-rcar:
  PCI: rcar: Fix GPL v2 license string typo

* pci/host-tegra:
  PCI: tegra: Fix GPL v2 license string typo

* pci/msi:
  PCI/MSI: Use irq_get_msi_desc() to simplify code
  PCI/MSI: Remove unused list access in __pci_restore_msix_state()
  PCI/MSI: Retrieve first MSI IRQ from msi_desc rather than pci_dev
  PCI/MSI: Remove unused function msi_remove_pci_irq_vectors()
  PCI/MSI: Add msi_setup_entry() to clean up MSI initialization

* pci/misc:
  PCI: Configure ASPM when enabling device
  x86: don't exclude low BIOS area when allocating address space for non-PCI cards
  PCI: Add include guard to include/linux/pci_ids.h
  x86, ia64: Move EFI_FB vga_default_device() initialization to pci_vga_fixup()

* pci/resource:
  PCI: Tidy resource assignment messages
  PCI: Return conventional error values from pci_revert_fw_address()
  PCI: Cleanup control flow
  PCI: Support BAR sizes up to 128GB
  PCI: Keep original resource if we fail to expand it

* pci/virtualization:
  powerpc/pci: Remove duplicate logic
  PCI: Make resetting secondary bus logic common
Loading
+22 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/vgaarb.h>
#include <linux/screen_info.h>

#include <asm/machvec.h>

@@ -37,6 +38,27 @@ static void pci_fixup_video(struct pci_dev *pdev)
		return;
	/* Maybe, this machine supports legacy memory map. */

	if (!vga_default_device()) {
		resource_size_t start, end;
		int i;

		/* Does firmware framebuffer belong to us? */
		for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
			if (!(pci_resource_flags(pdev, i) & IORESOURCE_MEM))
				continue;

			start = pci_resource_start(pdev, i);
			end  = pci_resource_end(pdev, i);

			if (!start || !end)
				continue;

			if (screen_info.lfb_base >= start &&
			    (screen_info.lfb_base + screen_info.lfb_size) < end)
				vga_set_default_device(pdev);
		}
	}

	/* Is VGA routed to us? */
	bus = pdev->bus;
	while (bus) {
+1 −10
Original line number Diff line number Diff line
@@ -123,21 +123,12 @@ resource_size_t pcibios_window_alignment(struct pci_bus *bus,

void pcibios_reset_secondary_bus(struct pci_dev *dev)
{
	u16 ctrl;

	if (ppc_md.pcibios_reset_secondary_bus) {
		ppc_md.pcibios_reset_secondary_bus(dev);
		return;
	}

	pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &ctrl);
	ctrl |= PCI_BRIDGE_CTL_BUS_RESET;
	pci_write_config_word(dev, PCI_BRIDGE_CONTROL, ctrl);
	msleep(2);

	ctrl &= ~PCI_BRIDGE_CTL_BUS_RESET;
	pci_write_config_word(dev, PCI_BRIDGE_CONTROL, ctrl);
	ssleep(1);
	pci_reset_secondary_bus(dev);
}

static resource_size_t pcibios_io_size(const struct pci_controller *hose)
+0 −6
Original line number Diff line number Diff line
@@ -17,10 +17,4 @@
#define vga_readb(x) (*(x))
#define vga_writeb(x, y) (*(y) = (x))

#ifdef CONFIG_FB_EFI
#define __ARCH_HAS_VGA_DEFAULT_DEVICE
extern struct pci_dev *vga_default_device(void);
extern void vga_set_default_device(struct pci_dev *pdev);
#endif

#endif /* _ASM_X86_VGA_H */
+5 −3
Original line number Diff line number Diff line
@@ -37,10 +37,12 @@ static void remove_e820_regions(struct resource *avail)

void arch_remove_reservations(struct resource *avail)
{
	/* Trim out BIOS areas (low 1MB and high 2MB) and E820 regions */
	/*
	 * Trim out BIOS area (high 2MB) and E820 regions. We do not remove
	 * the low 1MB unconditionally, as this area is needed for some ISA
	 * cards requiring a memory range, e.g. the i82365 PCMCIA controller.
	 */
	if (avail->flags & IORESOURCE_MEM) {
		if (avail->start < BIOS_END)
			avail->start = BIOS_END;
		resource_clip(avail, BIOS_ROM_BASE, BIOS_ROM_END);

		remove_e820_regions(avail);
+21 −0
Original line number Diff line number Diff line
@@ -326,6 +326,27 @@ static void pci_fixup_video(struct pci_dev *pdev)
	struct pci_bus *bus;
	u16 config;

	if (!vga_default_device()) {
		resource_size_t start, end;
		int i;

		/* Does firmware framebuffer belong to us? */
		for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
			if (!(pci_resource_flags(pdev, i) & IORESOURCE_MEM))
				continue;

			start = pci_resource_start(pdev, i);
			end  = pci_resource_end(pdev, i);

			if (!start || !end)
				continue;

			if (screen_info.lfb_base >= start &&
			    (screen_info.lfb_base + screen_info.lfb_size) < end)
				vga_set_default_device(pdev);
		}
	}

	/* Is VGA routed to us? */
	bus = pdev->bus;
	while (bus) {
Loading