1 void __init
pcibios_fixup_bus(struct pci_bus
*b
)
3 Dprintk("pcibios_fixup_bus()\n");
6 static int pcibios_enable_resources(struct pci_dev
*dev
, int mask
)
12 pci_read_config_word(dev
, PCI_COMMAND
, &cmd
);
14 for (idx
= 0; idx
< 6; idx
++) {
15 /* Only set up the requested stuff */
16 if (!(mask
& (1 << idx
)))
19 r
= &dev
->resource
[idx
];
20 if (!r
->start
&& r
->end
) {
22 "PCI: Device %s not available because of resource collisions\n",
26 if (r
->flags
& IORESOURCE_IO
)
27 cmd
|= PCI_COMMAND_IO
;
28 if (r
->flags
& IORESOURCE_MEM
)
29 cmd
|= PCI_COMMAND_MEMORY
;
31 if (dev
->resource
[PCI_ROM_RESOURCE
].start
)
32 cmd
|= PCI_COMMAND_MEMORY
;
34 printk("PCI: Enabling device %s (%04x -> %04x)\n",
35 dev
->slot_name
, old_cmd
, cmd
);
36 pci_write_config_word(dev
, PCI_COMMAND
, cmd
);
41 int pcibios_enable_device(struct pci_dev
*dev
, int mask
)
45 if ((err
= pcibios_enable_resources(dev
, mask
)) < 0)
51 void __init
pcibios_align_resource(void *data
, struct resource
*res
,
52 unsigned long size
, unsigned long align
)
54 panic("Uhhoh called pcibios_align_resource");
57 unsigned __init
int pcibios_assign_all_busses(void)
62 char *pcibios_setup(char *str
)
67 struct pci_fixup pcibios_fixups
[] = {