FILE
pcie-cadence-host-common.h
File preview with syntax highlighting.
linux-6.19.14/drivers/pci/controller/cadence/pcie-cadence-host-common.h
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Cadence PCIe Host controller driver. 4 * 5 * Copyright (c) 2017 Cadence 6 * Author: Cyrille Pitchen <cyrille.pitchen@free-electrons.com> 7 */ 8#ifndef _PCIE_CADENCE_HOST_COMMON_H 9#define _PCIE_CADENCE_HOST_COMMON_H 10 11#include <linux/kernel.h> 12#include <linux/pci.h> 13 14extern u64 bar_max_size[]; 15 16typedef int (*cdns_pcie_host_bar_ib_cfg)(struct cdns_pcie_rc *, 17 enum cdns_pcie_rp_bar, 18 u64, 19 u64, 20 unsigned long); 21typedef bool (*cdns_pcie_linkup_func)(struct cdns_pcie *); 22 23int cdns_pcie_host_training_complete(struct cdns_pcie *pcie); 24int cdns_pcie_host_wait_for_link(struct cdns_pcie *pcie, 25 cdns_pcie_linkup_func pcie_link_up); 26int cdns_pcie_retrain(struct cdns_pcie *pcie, cdns_pcie_linkup_func pcie_linkup_func); 27int cdns_pcie_host_start_link(struct cdns_pcie_rc *rc, 28 cdns_pcie_linkup_func pcie_link_up); 29enum cdns_pcie_rp_bar 30cdns_pcie_host_find_min_bar(struct cdns_pcie_rc *rc, u64 size); 31enum cdns_pcie_rp_bar 32cdns_pcie_host_find_max_bar(struct cdns_pcie_rc *rc, u64 size); 33int cdns_pcie_host_dma_ranges_cmp(void *priv, const struct list_head *a, 34 const struct list_head *b); 35int cdns_pcie_host_bar_ib_config(struct cdns_pcie_rc *rc, 36 enum cdns_pcie_rp_bar bar, 37 u64 cpu_addr, 38 u64 size, 39 unsigned long flags); 40int cdns_pcie_host_bar_config(struct cdns_pcie_rc *rc, 41 struct resource_entry *entry, 42 cdns_pcie_host_bar_ib_cfg pci_host_ib_config); 43int cdns_pcie_host_map_dma_ranges(struct cdns_pcie_rc *rc, 44 cdns_pcie_host_bar_ib_cfg pci_host_ib_config); 45 46#endif /* _PCIE_CADENCE_HOST_COMMON_H */
~/
Read-only file preview.