pci-bridge-emul.c (2a267e7c41aa88215de2b542de797d03d16ecdfd) | pci-bridge-emul.c (f6b6aefee70aa5261deec7feab80c249bf58397f) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2018 Marvell 4 * 5 * Author: Thomas Petazzoni <thomas.petazzoni@bootlin.com> 6 * 7 * This file helps PCI controller drivers implement a fake root port 8 * PCI bridge when the HW doesn't provide such a root port PCI --- 291 unchanged lines hidden (view full) --- 300 bridge->pci_regs_behavior[PCI_PREF_MEMORY_BASE / 4].ro = ~0; 301 bridge->pci_regs_behavior[PCI_PREF_MEMORY_BASE / 4].rw = 0; 302 } 303 304 return 0; 305} 306 307/* | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2018 Marvell 4 * 5 * Author: Thomas Petazzoni <thomas.petazzoni@bootlin.com> 6 * 7 * This file helps PCI controller drivers implement a fake root port 8 * PCI bridge when the HW doesn't provide such a root port PCI --- 291 unchanged lines hidden (view full) --- 300 bridge->pci_regs_behavior[PCI_PREF_MEMORY_BASE / 4].ro = ~0; 301 bridge->pci_regs_behavior[PCI_PREF_MEMORY_BASE / 4].rw = 0; 302 } 303 304 return 0; 305} 306 307/* |
308 * Cleanup a pci_bridge_emul structure that was previously initilized | 308 * Cleanup a pci_bridge_emul structure that was previously initialized |
309 * using pci_bridge_emul_init(). 310 */ 311void pci_bridge_emul_cleanup(struct pci_bridge_emul *bridge) 312{ 313 if (bridge->has_pcie) 314 kfree(bridge->pcie_cap_regs_behavior); 315 kfree(bridge->pci_regs_behavior); 316} --- 124 unchanged lines hidden --- | 309 * using pci_bridge_emul_init(). 310 */ 311void pci_bridge_emul_cleanup(struct pci_bridge_emul *bridge) 312{ 313 if (bridge->has_pcie) 314 kfree(bridge->pcie_cap_regs_behavior); 315 kfree(bridge->pci_regs_behavior); 316} --- 124 unchanged lines hidden --- |