xref: /OK3568_Linux_fs/kernel/drivers/visorbus/visorbus_private.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Copyright (C) 2010 - 2015 UNISYS CORPORATION
4*4882a593Smuzhiyun  * All rights reserved.
5*4882a593Smuzhiyun  */
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun #ifndef __VISORBUS_PRIVATE_H__
8*4882a593Smuzhiyun #define __VISORBUS_PRIVATE_H__
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun #include <linux/uuid.h>
11*4882a593Smuzhiyun #include <linux/utsname.h>
12*4882a593Smuzhiyun #include <linux/visorbus.h>
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun #include "controlvmchannel.h"
15*4882a593Smuzhiyun #include "vbuschannel.h"
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
18*4882a593Smuzhiyun 					       struct visor_device *from);
19*4882a593Smuzhiyun int visorbus_create_instance(struct visor_device *dev);
20*4882a593Smuzhiyun void visorbus_remove_instance(struct visor_device *bus_info);
21*4882a593Smuzhiyun int create_visor_device(struct visor_device *dev_info);
22*4882a593Smuzhiyun void remove_visor_device(struct visor_device *dev_info);
23*4882a593Smuzhiyun int visorchipset_device_pause(struct visor_device *dev_info);
24*4882a593Smuzhiyun int visorchipset_device_resume(struct visor_device *dev_info);
25*4882a593Smuzhiyun void visorbus_response(struct visor_device *p, int response, int controlvm_id);
26*4882a593Smuzhiyun void visorbus_device_changestate_response(struct visor_device *p, int response,
27*4882a593Smuzhiyun 					  struct visor_segment_state state);
28*4882a593Smuzhiyun int visorbus_init(void);
29*4882a593Smuzhiyun void visorbus_exit(void);
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun /* visorchannel access functions */
32*4882a593Smuzhiyun struct visorchannel *visorchannel_create(u64 physaddr, gfp_t gfp,
33*4882a593Smuzhiyun 					 const guid_t *guid, bool needs_lock);
34*4882a593Smuzhiyun void visorchannel_destroy(struct visorchannel *channel);
35*4882a593Smuzhiyun int visorchannel_read(struct visorchannel *channel, ulong offset,
36*4882a593Smuzhiyun 		      void *dest, ulong nbytes);
37*4882a593Smuzhiyun int visorchannel_write(struct visorchannel *channel, ulong offset,
38*4882a593Smuzhiyun 		       void *dest, ulong nbytes);
39*4882a593Smuzhiyun u64 visorchannel_get_physaddr(struct visorchannel *channel);
40*4882a593Smuzhiyun ulong visorchannel_get_nbytes(struct visorchannel *channel);
41*4882a593Smuzhiyun char *visorchannel_id(struct visorchannel *channel, char *s);
42*4882a593Smuzhiyun char *visorchannel_zoneid(struct visorchannel *channel, char *s);
43*4882a593Smuzhiyun u64 visorchannel_get_clientpartition(struct visorchannel *channel);
44*4882a593Smuzhiyun int visorchannel_set_clientpartition(struct visorchannel *channel,
45*4882a593Smuzhiyun 				     u64 partition_handle);
46*4882a593Smuzhiyun char *visorchannel_guid_id(const guid_t *guid, char *s);
47*4882a593Smuzhiyun void *visorchannel_get_header(struct visorchannel *channel);
48*4882a593Smuzhiyun #endif
49