Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
vc.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DRIVERS_PCIE_VC_H_
8#define ZEPHYR_INCLUDE_DRIVERS_PCIE_VC_H_
9
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#include <zephyr/kernel.h>
22#include <zephyr/types.h>
23#include <stdbool.h>
24
26
27/*
28 * 1 default VC + 7 extended VCs
29 */
30#define PCIE_VC_MAX_COUNT 8U
31
32#define PCIE_VC_SET_TC0 BIT(0)
33#define PCIE_VC_SET_TC1 BIT(1)
34#define PCIE_VC_SET_TC2 BIT(2)
35#define PCIE_VC_SET_TC3 BIT(3)
36#define PCIE_VC_SET_TC4 BIT(4)
37#define PCIE_VC_SET_TC5 BIT(5)
38#define PCIE_VC_SET_TC6 BIT(6)
39#define PCIE_VC_SET_TC7 BIT(7)
40
42 /*
43 * Map the TCs for each VC by setting bits relevantly
44 * Note: one bit cannot be set more than once among the VCs
45 */
47 /*
48 * Number of VCs being addressed
49 */
51};
52
63
70
85
86
87#ifdef __cplusplus
88}
89#endif
90
95#endif /* ZEPHYR_INCLUDE_DRIVERS_PCIE_VC_H_ */
uint32_t pcie_bdf_t
A unique PCI(e) endpoint (bus, device, function).
Definition pcie.h:37
#define PCIE_VC_MAX_COUNT
Definition vc.h:30
int pcie_vc_enable(pcie_bdf_t bdf)
Enable PCIe Virtual Channel handling.
int pcie_vc_disable(pcie_bdf_t bdf)
Disable PCIe Virtual Channel handling.
int pcie_vc_map_tc(pcie_bdf_t bdf, struct pcie_vctc_map *map)
Map PCIe TC/VC.
Public kernel APIs.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Definition vc.h:41
uint8_t vc_tc[8U]
Definition vc.h:46
int vc_count
Definition vc.h:50