1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /* Copyright (c) 2010-2012 Broadcom. All rights reserved. */
7 /******************************************************************************
8 * Global funcs - implementation is specific to which side you are on
10 *****************************************************************************/
12 // Routine used to initialise the vchi on both local + remote connections
13 extern int32_t vchi_initialise(struct vchiq_instance **instance);
15 extern int32_t vchi_connect(struct vchiq_instance *instance);
17 //When this is called, ensure that all services have no data pending.
18 //Bulk transfers can remain 'queued'
19 extern int32_t vchi_disconnect(struct vchiq_instance *instance);
21 /******************************************************************************
23 *****************************************************************************/
24 // Routine to open a named service
25 extern int vchi_service_open(struct vchiq_instance *instance,
26 struct vchiq_service_params *params,
29 extern int32_t vchi_get_peer_version(unsigned handle, short *peer_version);
31 // Routine to close a named service
32 extern int32_t vchi_service_close(unsigned handle);
34 // Routine to increment ref count on a named service
35 extern int32_t vchi_service_use(unsigned handle);
37 // Routine to decrement ref count on a named service
38 extern int32_t vchi_service_release(unsigned handle);
40 // Routine to look at a message in place.
41 // The message is dequeued, so the caller is left holding it; the descriptor is
42 // filled in and must be released when the user has finished with the message.
43 struct vchiq_header *vchi_msg_hold(unsigned handle);
45 /*******************************************************************************
46 * Global service support API - operations on held messages
47 * and message iterators
48 ******************************************************************************/
50 // Routine to release a held message after it has been processed
51 extern int32_t vchi_held_msg_release(unsigned handle, struct vchiq_header *message);
53 /******************************************************************************
54 * Configuration plumbing
55 *****************************************************************************/
59 /****************************** End of file **********************************/