Lines Matching refs:root
88 struct pci_dev *root; in __amd_smn_rw() local
94 root = amd_roots[node]; in __amd_smn_rw()
95 if (!root) in __amd_smn_rw()
103 err = pci_write_config_dword(root, i_off, address); in __amd_smn_rw()
109 err = (write ? pci_write_config_dword(root, d_off, *value) in __amd_smn_rw()
110 : pci_read_config_dword(root, d_off, value)); in __amd_smn_rw()
221 static struct pci_dev *get_next_root(struct pci_dev *root) in get_next_root() argument
223 while ((root = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8, root))) { in get_next_root()
225 if (root->devfn) in get_next_root()
228 if (root->vendor != PCI_VENDOR_ID_AMD && in get_next_root()
229 root->vendor != PCI_VENDOR_ID_HYGON) in get_next_root()
235 return root; in get_next_root()
250 struct pci_dev *root; in amd_smn_init() local
261 root = NULL; in amd_smn_init()
262 while ((root = get_next_root(root))) { in amd_smn_init()
263 pci_dbg(root, "Reserving PCI config space\n"); in amd_smn_init()
271 if (!pci_request_config_region_exclusive(root, 0, PCI_CFG_SPACE_SIZE, NULL)) { in amd_smn_init()
272 pci_err(root, "Failed to reserve config space\n"); in amd_smn_init()
293 root = NULL; in amd_smn_init()
294 while (node < num_nodes && (root = get_next_root(root))) { in amd_smn_init()
299 pci_dbg(root, "is root for AMD node %u\n", node); in amd_smn_init()
300 amd_roots[node++] = root; in amd_smn_init()