xref: /linux/drivers/media/platform/chips-media/wave5/wave5-vdi.h (revision 06d07429858317ded2db7986113a9e0129cd599b)
1 /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2 /*
3  * Wave5 series multi-standard codec IP - low level access functions
4  *
5  * Copyright (C) 2021-2023 CHIPS&MEDIA INC
6  */
7 
8 #ifndef _VDI_H_
9 #define _VDI_H_
10 
11 #include "wave5-vpuconfig.h"
12 #include <linux/string.h>
13 #include <linux/slab.h>
14 #include <linux/device.h>
15 
16 /************************************************************************/
17 /* COMMON REGISTERS */
18 /************************************************************************/
19 #define VPU_PRODUCT_CODE_REGISTER 0x1044
20 
21 /* system register write */
22 #define vpu_write_reg(VPU_INST, ADDR, DATA) wave5_vdi_write_register(VPU_INST, ADDR, DATA)
23 /* system register read */
24 #define vpu_read_reg(CORE, ADDR) wave5_vdi_read_register(CORE, ADDR)
25 
26 struct vpu_buf {
27 	size_t size;
28 	dma_addr_t daddr;
29 	void *vaddr;
30 };
31 
32 int wave5_vdi_init(struct device *dev);
33 int wave5_vdi_release(struct device *dev);	//this function may be called only at system off.
34 
35 #endif //#ifndef _VDI_H_
36