]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - arch/alpha/kernel/pci.c
alpha: remove remaining __FUNCTION__ occurrences
[mirror_ubuntu-zesty-kernel.git] / arch / alpha / kernel / pci.c
index ab642a4f08de85eb538077c0261fb9d381d49ae9..baf57563b14c42c54cc433d0bea067c9330871cc 100644 (file)
@@ -71,25 +71,13 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, quirk_i
 static void __init
 quirk_cypress(struct pci_dev *dev)
 {
-       /* The Notorious Cy82C693 chip.  */
-
-       /* The Cypress IDE controller doesn't support native mode, but it
-          has programmable addresses of IDE command/control registers.
-          This violates PCI specifications, confuses the IDE subsystem and
-          causes resource conflicts between the primary HD_CMD register and
-          the floppy controller.  Ugh.  Fix that.  */
-       if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE) {
-               dev->resource[0].flags = 0;
-               dev->resource[1].flags = 0;
-       }
-
        /* The Cypress bridge responds on the PCI bus in the address range
           0xffff0000-0xffffffff (conventional x86 BIOS ROM).  There is no
           way to turn this off.  The bridge also supports several extended
           BIOS ranges (disabled after power-up), and some consoles do turn
           them on.  So if we use a large direct-map window, or a large SG
           window, we must avoid the entire 0xfff00000-0xffffffff region.  */
-       else if (dev->class >> 8 == PCI_CLASS_BRIDGE_ISA) {
+       if (dev->class >> 8 == PCI_CLASS_BRIDGE_ISA) {
                if (__direct_map_base + __direct_map_size >= 0xfff00000UL)
                        __direct_map_size = 0xfff00000UL - __direct_map_base;
                else {
@@ -195,7 +183,7 @@ pcibios_init(void)
 
 subsys_initcall(pcibios_init);
 
-char * __init
+char * __devinit
 pcibios_setup(char *str)
 {
        return str;
@@ -204,7 +192,7 @@ pcibios_setup(char *str)
 #ifdef ALPHA_RESTORE_SRM_SETUP
 static struct pdev_srm_saved_conf *srm_saved_configs;
 
-void __init
+void __devinit
 pdev_save_srm_config(struct pci_dev *dev)
 {
        struct pdev_srm_saved_conf *tmp;
@@ -220,7 +208,7 @@ pdev_save_srm_config(struct pci_dev *dev)
 
        tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
        if (!tmp) {
-               printk(KERN_ERR "%s: kmalloc() failed!\n", __FUNCTION__);
+               printk(KERN_ERR "%s: kmalloc() failed!\n", __func__);
                return;
        }
        tmp->next = srm_saved_configs;
@@ -247,14 +235,14 @@ pci_restore_srm_config(void)
 }
 #endif
 
-void __init
+void __devinit
 pcibios_fixup_resource(struct resource *res, struct resource *root)
 {
        res->start += root->start;
        res->end += root->start;
 }
 
-void __init
+void __devinit
 pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus)
 {
        /* Update device resources.  */
@@ -273,7 +261,7 @@ pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus)
        }
 }
 
-void __init
+void __devinit
 pcibios_fixup_bus(struct pci_bus *bus)
 {
        /* Propagate hose info into the subordinate devices.  */
@@ -372,28 +360,7 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
 int
 pcibios_enable_device(struct pci_dev *dev, int mask)
 {
-       u16 cmd, oldcmd;
-       int i;
-
-       pci_read_config_word(dev, PCI_COMMAND, &cmd);
-       oldcmd = cmd;
-
-       for (i = 0; i < PCI_NUM_RESOURCES; i++) {
-               struct resource *res = &dev->resource[i];
-
-               if (res->flags & IORESOURCE_IO)
-                       cmd |= PCI_COMMAND_IO;
-               else if (res->flags & IORESOURCE_MEM)
-                       cmd |= PCI_COMMAND_MEMORY;
-       }
-
-       if (cmd != oldcmd) {
-               printk(KERN_DEBUG "PCI: Enabling device: (%s), cmd %x\n",
-                      pci_name(dev), cmd);
-               /* Enable the appropriate bits in the PCI command register.  */
-               pci_write_config_word(dev, PCI_COMMAND, cmd);
-       }
-       return 0;
+       return pci_enable_resources(dev, mask);
 }
 
 /*
@@ -412,7 +379,7 @@ pcibios_set_master(struct pci_dev *dev)
        pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64);
 }
 
-static void __init
+void __init
 pcibios_claim_one_bus(struct pci_bus *b)
 {
        struct pci_dev *dev;
@@ -426,7 +393,8 @@ pcibios_claim_one_bus(struct pci_bus *b)
 
                        if (r->parent || !r->start || !r->flags)
                                continue;
-                       pci_claim_resource(dev, i);
+                       if (pci_probe_only || (r->flags & IORESOURCE_PCI_FIXED))
+                               pci_claim_resource(dev, i);
                }
        }
 
@@ -465,8 +433,7 @@ common_init_pci(void)
                }
        }
 
-       if (pci_probe_only)
-               pcibios_claim_console_setup();
+       pcibios_claim_console_setup();
 
        pci_assign_unassigned_resources();
        pci_fixup_irqs(alpha_mv.pci_swizzle, alpha_mv.pci_map_irq);