Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * PCC (Platform Communications Channel) methods
0004  */
0005 
0006 #ifndef _PCC_H
0007 #define _PCC_H
0008 
0009 #include <linux/mailbox_controller.h>
0010 #include <linux/mailbox_client.h>
0011 
0012 struct pcc_mbox_chan {
0013     struct mbox_chan *mchan;
0014     u64 shmem_base_addr;
0015     u64 shmem_size;
0016     u32 latency;
0017     u32 max_access_rate;
0018     u16 min_turnaround_time;
0019 };
0020 
0021 #define MAX_PCC_SUBSPACES   256
0022 #ifdef CONFIG_PCC
0023 extern struct pcc_mbox_chan *
0024 pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id);
0025 extern void pcc_mbox_free_channel(struct pcc_mbox_chan *chan);
0026 #else
0027 static inline struct pcc_mbox_chan *
0028 pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id)
0029 {
0030     return ERR_PTR(-ENODEV);
0031 }
0032 static inline void pcc_mbox_free_channel(struct pcc_mbox_chan *chan) { }
0033 #endif
0034 
0035 #endif /* _PCC_H */