Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Copyright (c) 2016-2017, Linaro Ltd
0004  */
0005 
0006 #ifndef __QCOM_GLINK_NATIVE_H__
0007 #define __QCOM_GLINK_NATIVE_H__
0008 
0009 #define GLINK_FEATURE_INTENT_REUSE  BIT(0)
0010 #define GLINK_FEATURE_MIGRATION     BIT(1)
0011 #define GLINK_FEATURE_TRACER_PKT    BIT(2)
0012 
0013 struct qcom_glink_pipe {
0014     size_t length;
0015 
0016     size_t (*avail)(struct qcom_glink_pipe *glink_pipe);
0017 
0018     void (*peak)(struct qcom_glink_pipe *glink_pipe, void *data,
0019              unsigned int offset, size_t count);
0020     void (*advance)(struct qcom_glink_pipe *glink_pipe, size_t count);
0021 
0022     void (*write)(struct qcom_glink_pipe *glink_pipe,
0023               const void *hdr, size_t hlen,
0024               const void *data, size_t dlen);
0025 };
0026 
0027 struct qcom_glink;
0028 
0029 struct qcom_glink *qcom_glink_native_probe(struct device *dev,
0030                        unsigned long features,
0031                        struct qcom_glink_pipe *rx,
0032                        struct qcom_glink_pipe *tx,
0033                        bool intentless);
0034 void qcom_glink_native_remove(struct qcom_glink *glink);
0035 
0036 void qcom_glink_native_unregister(struct qcom_glink *glink);
0037 #endif