aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/pci
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2013-04-16 08:13:21 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-04-17 08:07:36 -0400
commitaf0a8a8453f7c7b3497c9fecc053897690e00695 (patch)
tree5a31479aebeef7e87d4c65864c3988f2a866b409 /arch/s390/pci
parentcb65a669f62ecca123cf4f6998903ee628c59caf (diff)
s390/pci: implement pcibios_add_device
Use pcibios_add_device to do arch specific device initialization. This function will be called during pci_bus_add_device. Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/pci')
-rw-r--r--arch/s390/pci/pci.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index 24dcf059f061..01478f63c8a8 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -868,6 +868,17 @@ static void zpci_free_iomap(struct zpci_dev *zdev, int entry)
868 spin_unlock(&zpci_iomap_lock); 868 spin_unlock(&zpci_iomap_lock);
869} 869}
870 870
871int pcibios_add_device(struct pci_dev *pdev)
872{
873 struct zpci_dev *zdev = get_zdev(pdev);
874
875 zpci_debug_init_device(zdev);
876 zpci_fmb_enable_device(zdev);
877 zpci_map_resources(zdev);
878
879 return 0;
880}
881
871static int zpci_create_device_bus(struct zpci_dev *zdev) 882static int zpci_create_device_bus(struct zpci_dev *zdev)
872{ 883{
873 struct resource *res; 884 struct resource *res;
@@ -1019,9 +1030,6 @@ int zpci_scan_device(struct zpci_dev *zdev)
1019 goto out; 1030 goto out;
1020 } 1031 }
1021 1032
1022 zpci_debug_init_device(zdev);
1023 zpci_fmb_enable_device(zdev);
1024 zpci_map_resources(zdev);
1025 pci_bus_add_devices(zdev->bus); 1033 pci_bus_add_devices(zdev->bus);
1026 1034
1027 /* now that pdev was added to the bus mark it as used */ 1035 /* now that pdev was added to the bus mark it as used */