@@ -949,7 +949,6 @@ static int rockchip_pcie_probe(struct platform_device *pdev)
949
949
{
950
950
struct rockchip_pcie * rockchip ;
951
951
struct device * dev = & pdev -> dev ;
952
- struct pci_bus * bus , * child ;
953
952
struct pci_host_bridge * bridge ;
954
953
struct resource * bus_res ;
955
954
int err ;
@@ -1015,20 +1014,10 @@ static int rockchip_pcie_probe(struct platform_device *pdev)
1015
1014
bridge -> map_irq = of_irq_parse_and_map_pci ;
1016
1015
bridge -> swizzle_irq = pci_common_swizzle ;
1017
1016
1018
- err = pci_scan_root_bus_bridge (bridge );
1017
+ err = pci_host_probe (bridge );
1019
1018
if (err < 0 )
1020
1019
goto err_remove_irq_domain ;
1021
1020
1022
- bus = bridge -> bus ;
1023
-
1024
- rockchip -> root_bus = bus ;
1025
-
1026
- pci_bus_size_bridges (bus );
1027
- pci_bus_assign_resources (bus );
1028
- list_for_each_entry (child , & bus -> children , node )
1029
- pcie_bus_configure_settings (child );
1030
-
1031
- pci_bus_add_devices (bus );
1032
1021
return 0 ;
1033
1022
1034
1023
err_remove_irq_domain :
@@ -1051,9 +1040,10 @@ static int rockchip_pcie_remove(struct platform_device *pdev)
1051
1040
{
1052
1041
struct device * dev = & pdev -> dev ;
1053
1042
struct rockchip_pcie * rockchip = dev_get_drvdata (dev );
1043
+ struct pci_host_bridge * bridge = pci_host_bridge_from_priv (rockchip );
1054
1044
1055
- pci_stop_root_bus (rockchip -> root_bus );
1056
- pci_remove_root_bus (rockchip -> root_bus );
1045
+ pci_stop_root_bus (bridge -> bus );
1046
+ pci_remove_root_bus (bridge -> bus );
1057
1047
irq_domain_remove (rockchip -> irq_domain );
1058
1048
1059
1049
rockchip_pcie_deinit_phys (rockchip );
0 commit comments