Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343279
b: refs/heads/master
c: f9a37be
h: refs/heads/master
i:
  343277: ef0d4be
  343275: 7538b11
  343271: 27352ba
  343263: 116e950
v: v3
  • Loading branch information
Matthew Garrett authored and Bjorn Helgaas committed Dec 5, 2012
1 parent a8a0012 commit db63445
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84c1b80e32638f881c17390dfe88143e5cd3f583
refs/heads/master: f9a37be0f02a943d63e3346b19f9c9d8d91826cb
4 changes: 0 additions & 4 deletions trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,7 @@ int default_check_phys_apicid_present(int phys_apicid)
}
#endif

#ifndef CONFIG_DEBUG_BOOT_PARAMS
struct boot_params __initdata boot_params;
#else
struct boot_params boot_params;
#endif

/*
* Machine setup..
Expand Down
30 changes: 30 additions & 0 deletions trunk/arch/x86/pci/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <asm/io.h>
#include <asm/smp.h>
#include <asm/pci_x86.h>
#include <asm/setup.h>

unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
PCI_PROBE_MMCONF;
Expand Down Expand Up @@ -608,6 +609,35 @@ unsigned int pcibios_assign_all_busses(void)
return (pci_probe & PCI_ASSIGN_ALL_BUSSES) ? 1 : 0;
}

int pcibios_add_device(struct pci_dev *dev)
{
struct setup_data *data;
struct pci_setup_rom *rom;
u64 pa_data;

pa_data = boot_params.hdr.setup_data;
while (pa_data) {
data = phys_to_virt(pa_data);

if (data->type == SETUP_PCI) {
rom = (struct pci_setup_rom *)data;

if ((pci_domain_nr(dev->bus) == rom->segment) &&
(dev->bus->number == rom->bus) &&
(PCI_SLOT(dev->devfn) == rom->device) &&
(PCI_FUNC(dev->devfn) == rom->function) &&
(dev->vendor == rom->vendor) &&
(dev->device == rom->devid)) {
dev->rom = (void *)(unsigned long)(pa_data +
offsetof(struct pci_setup_rom, romdata));
dev->romlen = rom->pcilen;
}
}
pa_data = data->next;
}
return 0;
}

int pcibios_enable_device(struct pci_dev *dev, int mask)
{
int err;
Expand Down

0 comments on commit db63445

Please sign in to comment.