include/pcie: Add PTM API
This is a really simple one: one function is exposed to enable PTM requester on a endpoint. PTM root capability will be enabled automatically via a dedicated driver and its related DTS exposure. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
766f567bfc
commit
379c1dea38
1 changed files with 30 additions and 0 deletions
30
include/drivers/pcie/ptm.h
Normal file
30
include/drivers/pcie/ptm.h
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ZEPHYR_INCLUDE_DRIVERS_PCIE_PTM_H_
|
||||||
|
#define ZEPHYR_INCLUDE_DRIVERS_PCIE_PTM_H_
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <zephyr/types.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enable PTM on endpoint
|
||||||
|
*
|
||||||
|
* @param bdf the PCI(e) endpoint
|
||||||
|
* @return true if that was sucessful, false otherwise
|
||||||
|
*/
|
||||||
|
bool pcie_ptm_enable(pcie_bdf_t bdf);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* ZEPHYR_INCLUDE_DRIVERS_PCIE_PTM_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue