Skip to content

Commit

Permalink
s390/pci: implement pcibios_add_device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Apr 17, 2013
1 parent cb65a66 commit af0a8a8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions arch/s390/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,17 @@ static void zpci_free_iomap(struct zpci_dev *zdev, int entry)
spin_unlock(&zpci_iomap_lock);
}

int pcibios_add_device(struct pci_dev *pdev)
{
struct zpci_dev *zdev = get_zdev(pdev);

zpci_debug_init_device(zdev);
zpci_fmb_enable_device(zdev);
zpci_map_resources(zdev);

return 0;
}

static int zpci_create_device_bus(struct zpci_dev *zdev)
{
struct resource *res;
Expand Down Expand Up @@ -1019,9 +1030,6 @@ int zpci_scan_device(struct zpci_dev *zdev)
goto out;
}

zpci_debug_init_device(zdev);
zpci_fmb_enable_device(zdev);
zpci_map_resources(zdev);
pci_bus_add_devices(zdev->bus);

/* now that pdev was added to the bus mark it as used */
Expand Down

0 comments on commit af0a8a8

Please sign in to comment.