diff options
Diffstat (limited to 'arch/unicore32/kernel/pci.c')
| -rw-r--r-- | arch/unicore32/kernel/pci.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/arch/unicore32/kernel/pci.c b/arch/unicore32/kernel/pci.c index ef69c0c8282..4892fbb54eb 100644 --- a/arch/unicore32/kernel/pci.c +++ b/arch/unicore32/kernel/pci.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
| 22 | 22 | ||
| 23 | static int debug_pci; | 23 | static int debug_pci; |
| 24 | static int use_firmware; | ||
| 24 | 25 | ||
| 25 | #define CONFIG_CMD(bus, devfn, where) \ | 26 | #define CONFIG_CMD(bus, devfn, where) \ |
| 26 | (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3)) | 27 | (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3)) |
| @@ -154,6 +155,14 @@ void __init puv3_pci_adjust_zones(unsigned long *zone_size, | |||
| 154 | zhole_size[0] = 0; | 155 | zhole_size[0] = 0; |
| 155 | } | 156 | } |
| 156 | 157 | ||
| 158 | void __devinit pcibios_update_irq(struct pci_dev *dev, int irq) | ||
| 159 | { | ||
| 160 | if (debug_pci) | ||
| 161 | printk(KERN_DEBUG "PCI: Assigning IRQ %02d to %s\n", | ||
| 162 | irq, pci_name(dev)); | ||
| 163 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); | ||
| 164 | } | ||
| 165 | |||
| 157 | /* | 166 | /* |
| 158 | * If the bus contains any of these devices, then we must not turn on | 167 | * If the bus contains any of these devices, then we must not turn on |
| 159 | * parity checking of any kind. | 168 | * parity checking of any kind. |
| @@ -167,7 +176,7 @@ static inline int pdev_bad_for_parity(struct pci_dev *dev) | |||
| 167 | * pcibios_fixup_bus - Called after each bus is probed, | 176 | * pcibios_fixup_bus - Called after each bus is probed, |
| 168 | * but before its children are examined. | 177 | * but before its children are examined. |
| 169 | */ | 178 | */ |
| 170 | void pcibios_fixup_bus(struct pci_bus *bus) | 179 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) |
| 171 | { | 180 | { |
| 172 | struct pci_dev *dev; | 181 | struct pci_dev *dev; |
| 173 | u16 features = PCI_COMMAND_SERR | 182 | u16 features = PCI_COMMAND_SERR |
| @@ -250,7 +259,9 @@ void pcibios_fixup_bus(struct pci_bus *bus) | |||
| 250 | printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n", | 259 | printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n", |
| 251 | bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis"); | 260 | bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis"); |
| 252 | } | 261 | } |
| 262 | #ifdef CONFIG_HOTPLUG | ||
| 253 | EXPORT_SYMBOL(pcibios_fixup_bus); | 263 | EXPORT_SYMBOL(pcibios_fixup_bus); |
| 264 | #endif | ||
| 254 | 265 | ||
| 255 | static int __init pci_common_init(void) | 266 | static int __init pci_common_init(void) |
| 256 | { | 267 | { |
| @@ -265,7 +276,7 @@ static int __init pci_common_init(void) | |||
| 265 | 276 | ||
| 266 | pci_fixup_irqs(pci_common_swizzle, pci_puv3_map_irq); | 277 | pci_fixup_irqs(pci_common_swizzle, pci_puv3_map_irq); |
| 267 | 278 | ||
| 268 | if (!pci_has_flag(PCI_PROBE_ONLY)) { | 279 | if (!use_firmware) { |
| 269 | /* | 280 | /* |
| 270 | * Size the bridge windows. | 281 | * Size the bridge windows. |
| 271 | */ | 282 | */ |
| @@ -286,23 +297,18 @@ static int __init pci_common_init(void) | |||
| 286 | } | 297 | } |
| 287 | subsys_initcall(pci_common_init); | 298 | subsys_initcall(pci_common_init); |
| 288 | 299 | ||
| 289 | char * __init pcibios_setup(char *str) | 300 | char * __devinit pcibios_setup(char *str) |
| 290 | { | 301 | { |
| 291 | if (!strcmp(str, "debug")) { | 302 | if (!strcmp(str, "debug")) { |
| 292 | debug_pci = 1; | 303 | debug_pci = 1; |
| 293 | return NULL; | 304 | return NULL; |
| 294 | } else if (!strcmp(str, "firmware")) { | 305 | } else if (!strcmp(str, "firmware")) { |
| 295 | pci_add_flags(PCI_PROBE_ONLY); | 306 | use_firmware = 1; |
| 296 | return NULL; | 307 | return NULL; |
| 297 | } | 308 | } |
| 298 | return str; | 309 | return str; |
| 299 | } | 310 | } |
| 300 | 311 | ||
| 301 | void pcibios_set_master(struct pci_dev *dev) | ||
| 302 | { | ||
| 303 | /* No special bus mastering setup handling */ | ||
| 304 | } | ||
| 305 | |||
| 306 | /* | 312 | /* |
| 307 | * From arch/i386/kernel/pci-i386.c: | 313 | * From arch/i386/kernel/pci-i386.c: |
| 308 | * | 314 | * |
