Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102256
b: refs/heads/master
c: 53eb2fb
h: refs/heads/master
v: v3
  • Loading branch information
Jesse Barnes authored and Jesse Barnes committed Jun 12, 2008
1 parent 1094857 commit ecf0d53
Show file tree
Hide file tree
Showing 58 changed files with 3,100 additions and 1,128 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: 0e6859d49ff194e01afc229c996e3aefca1a0539
refs/heads/master: 53eb2fbeb9e68e1a9a23945de8450999c46270ce
3 changes: 3 additions & 0 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1496,6 +1496,9 @@ and is between 256 and 4096 characters. It is defined in the file
Use with caution as certain devices share
address decoders between ROMs and other
resources.
norom [X86-32,X86_64] Do not assign address space to
expansion ROMs that do not already have
BIOS assigned address ranges.
irqmask=0xMMMM [X86-32] Set a bit mask of IRQs allowed to be
assigned automatically to PCI devices. You can
make the kernel exclude IRQs of your ISA cards
Expand Down
12 changes: 6 additions & 6 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ S: Supported
ACPI PCI HOTPLUG DRIVER
P: Kristen Carlson Accardi
M: kristen.c.accardi@intel.com
L: pcihpd-discuss@lists.sourceforge.net
L: linux-pci@vger.kernel.org
S: Supported

ACPI THERMAL DRIVER
Expand Down Expand Up @@ -1134,21 +1134,21 @@ COMPACTPCI HOTPLUG CORE
P: Scott Murray
M: scottm@somanetworks.com
M: scott@spiteful.org
L: pcihpd-discuss@lists.sourceforge.net
L: linux-pci@vger.kernel.org
S: Supported

COMPACTPCI HOTPLUG ZIATECH ZT5550 DRIVER
P: Scott Murray
M: scottm@somanetworks.com
M: scott@spiteful.org
L: pcihpd-discuss@lists.sourceforge.net
L: linux-pci@vger.kernel.org
S: Supported

COMPACTPCI HOTPLUG GENERIC DRIVER
P: Scott Murray
M: scottm@somanetworks.com
M: scott@spiteful.org
L: pcihpd-discuss@lists.sourceforge.net
L: linux-pci@vger.kernel.org
S: Supported

COMPUTONE INTELLIPORT MULTIPORT CARD
Expand Down Expand Up @@ -3177,7 +3177,7 @@ S: Supported
PCIE HOTPLUG DRIVER
P: Kristen Carlson Accardi
M: kristen.c.accardi@intel.com
L: pcihpd-discuss@lists.sourceforge.net
L: linux-pci@vger.kernel.org
S: Supported

PCMCIA SUBSYSTEM
Expand Down Expand Up @@ -3808,7 +3808,7 @@ S: Maintained
SHPC HOTPLUG DRIVER
P: Kristen Carlson Accardi
M: kristen.c.accardi@intel.com
L: pcihpd-discuss@lists.sourceforge.net
L: linux-pci@vger.kernel.org
S: Supported

SECURE DIGITAL HOST CONTROLLER INTERFACE DRIVER
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/x86/kernel/apm_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1211,9 +1211,9 @@ static int suspend(int vetoable)
if (err != APM_SUCCESS)
apm_error("suspend", err);
err = (err == APM_SUCCESS) ? 0 : -EIO;
device_power_up();
device_power_up(PMSG_RESUME);
local_irq_enable();
device_resume();
device_resume(PMSG_RESUME);
queue_event(APM_NORMAL_RESUME, NULL);
spin_lock(&user_list_lock);
for (as = user_list; as != NULL; as = as->next) {
Expand All @@ -1238,7 +1238,7 @@ static void standby(void)
apm_error("standby", err);

local_irq_disable();
device_power_up();
device_power_up(PMSG_RESUME);
local_irq_enable();
}

Expand Down Expand Up @@ -1324,7 +1324,7 @@ static void check_events(void)
ignore_bounce = 1;
if ((event != APM_NORMAL_RESUME)
|| (ignore_normal_resume == 0)) {
device_resume();
device_resume(PMSG_RESUME);
queue_event(event, NULL);
}
ignore_normal_resume = 0;
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/x86/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,11 @@ void __init setup_arch(char **cmdline_p)

parse_early_param();

#ifdef CONFIG_PCI
if (pci_early_dump_regs)
early_dump_pci_devices();
#endif

#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
if (init_ohci1394_dma_early)
init_ohci1394_dma_on_all_controllers();
Expand Down
26 changes: 26 additions & 0 deletions trunk/arch/x86/pci/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
PCI_PROBE_MMCONF;

unsigned int pci_early_dump_regs;
static int pci_bf_sort;
int pci_routeirq;
int pcibios_last_bus = -1;
Expand Down Expand Up @@ -121,14 +122,33 @@ void __init dmi_check_skip_isa_align(void)
dmi_check_system(can_skip_pciprobe_dmi_table);
}

static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
{
struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE];

if (pci_probe & PCI_NOASSIGN_ROMS) {
if (rom_r->parent)
return;
if (rom_r->start) {
/* we deal with BIOS assigned ROM later */
return;
}
rom_r->start = rom_r->end = rom_r->flags = 0;
}
}

/*
* Called after each bus is probed, but before its children
* are examined.
*/

void __devinit pcibios_fixup_bus(struct pci_bus *b)
{
struct pci_dev *dev;

pci_read_bridge_bases(b);
list_for_each_entry(dev, &b->devices, bus_list)
pcibios_fixup_device_resources(dev);
}

/*
Expand Down Expand Up @@ -483,12 +503,18 @@ char * __devinit pcibios_setup(char *str)
else if (!strcmp(str, "rom")) {
pci_probe |= PCI_ASSIGN_ROMS;
return NULL;
} else if (!strcmp(str, "norom")) {
pci_probe |= PCI_NOASSIGN_ROMS;
return NULL;
} else if (!strcmp(str, "assign-busses")) {
pci_probe |= PCI_ASSIGN_ALL_BUSSES;
return NULL;
} else if (!strcmp(str, "use_crs")) {
pci_probe |= PCI_USE__CRS;
return NULL;
} else if (!strcmp(str, "earlydump")) {
pci_early_dump_regs = 1;
return NULL;
} else if (!strcmp(str, "routeirq")) {
pci_routeirq = 1;
return NULL;
Expand Down
60 changes: 59 additions & 1 deletion trunk/arch/x86/pci/early.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,69 @@ void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val)
{
PDprintk("%x writing to %x: %x\n", slot, offset, val);
outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8);
outb(val, 0xcfc);
outb(val, 0xcfc + (offset&3));
}

void write_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset, u16 val)
{
PDprintk("%x writing to %x: %x\n", slot, offset, val);
outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8);
outw(val, 0xcfc + (offset&2));
}

int early_pci_allowed(void)
{
return (pci_probe & (PCI_PROBE_CONF1|PCI_PROBE_NOEARLY)) ==
PCI_PROBE_CONF1;
}

void early_dump_pci_device(u8 bus, u8 slot, u8 func)
{
int i;
int j;
u32 val;

printk("PCI: %02x:%02x:%02x", bus, slot, func);

for (i = 0; i < 256; i += 4) {
if (!(i & 0x0f))
printk("\n%04x:",i);

val = read_pci_config(bus, slot, func, i);
for (j = 0; j < 4; j++) {
printk(" %02x", val & 0xff);
val >>= 8;
}
}
printk("\n");
}

void early_dump_pci_devices(void)
{
unsigned bus, slot, func;

if (!early_pci_allowed())
return;

for (bus = 0; bus < 256; bus++) {
for (slot = 0; slot < 32; slot++) {
for (func = 0; func < 8; func++) {
u32 class;
u8 type;
class = read_pci_config(bus, slot, func,
PCI_CLASS_REVISION);
if (class == 0xffffffff)
break;

early_dump_pci_device(bus, slot, func);

/* No multi-function device? */
type = read_pci_config_byte(bus, slot, func,
PCI_HEADER_TYPE);
if (!(type & 0x80))
break;
}
}
}
}

Loading

0 comments on commit ecf0d53

Please sign in to comment.