Commit | Line | Data |
---|---|---|
b886d83c | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
866ae696 HT |
2 | /* |
3 | * PCC (Platform Communications Channel) methods | |
866ae696 HT |
4 | */ |
5 | ||
6 | #ifndef _PCC_H | |
7 | #define _PCC_H | |
8 | ||
9 | #include <linux/mailbox_controller.h> | |
10 | #include <linux/mailbox_client.h> | |
11 | ||
0f2591e2 SH |
12 | struct pcc_mbox_chan { |
13 | struct mbox_chan *mchan; | |
14 | u64 shmem_base_addr; | |
15 | u64 shmem_size; | |
16 | u32 latency; | |
17 | u32 max_access_rate; | |
18 | u16 min_turnaround_time; | |
19 | }; | |
20 | ||
c4b766c2 | 21 | #define MAX_PCC_SUBSPACES 256 |
866ae696 | 22 | #ifdef CONFIG_PCC |
7b6da7fe SH |
23 | extern struct pcc_mbox_chan * |
24 | pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id); | |
25 | extern void pcc_mbox_free_channel(struct pcc_mbox_chan *chan); | |
866ae696 | 26 | #else |
7b6da7fe SH |
27 | static inline struct pcc_mbox_chan * |
28 | pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id) | |
866ae696 | 29 | { |
d0679cfa | 30 | return ERR_PTR(-ENODEV); |
866ae696 | 31 | } |
7b6da7fe | 32 | static inline void pcc_mbox_free_channel(struct pcc_mbox_chan *chan) { } |
866ae696 HT |
33 | #endif |
34 | ||
35 | #endif /* _PCC_H */ |