1*e7b8153eSMauro Carvalho Chehab /* SPDX-License-Identifier: GPL-2.0 */ 2*e7b8153eSMauro Carvalho Chehab /* 3*e7b8153eSMauro Carvalho Chehab * Copyright (C) STMicroelectronics SA 2015 4*e7b8153eSMauro Carvalho Chehab * Authors: Yannick Fertre <yannick.fertre@st.com> 5*e7b8153eSMauro Carvalho Chehab * Hugues Fruchet <hugues.fruchet@st.com> 6*e7b8153eSMauro Carvalho Chehab */ 7*e7b8153eSMauro Carvalho Chehab 8*e7b8153eSMauro Carvalho Chehab #ifndef HVA_HW_H 9*e7b8153eSMauro Carvalho Chehab #define HVA_HW_H 10*e7b8153eSMauro Carvalho Chehab 11*e7b8153eSMauro Carvalho Chehab #include "hva-mem.h" 12*e7b8153eSMauro Carvalho Chehab 13*e7b8153eSMauro Carvalho Chehab /* HVA Versions */ 14*e7b8153eSMauro Carvalho Chehab #define HVA_VERSION_UNKNOWN 0x000 15*e7b8153eSMauro Carvalho Chehab #define HVA_VERSION_V400 0x400 16*e7b8153eSMauro Carvalho Chehab 17*e7b8153eSMauro Carvalho Chehab /* HVA command types */ 18*e7b8153eSMauro Carvalho Chehab enum hva_hw_cmd_type { 19*e7b8153eSMauro Carvalho Chehab /* RESERVED = 0x00 */ 20*e7b8153eSMauro Carvalho Chehab /* RESERVED = 0x01 */ 21*e7b8153eSMauro Carvalho Chehab H264_ENC = 0x02, 22*e7b8153eSMauro Carvalho Chehab /* RESERVED = 0x03 */ 23*e7b8153eSMauro Carvalho Chehab /* RESERVED = 0x04 */ 24*e7b8153eSMauro Carvalho Chehab /* RESERVED = 0x05 */ 25*e7b8153eSMauro Carvalho Chehab /* RESERVED = 0x06 */ 26*e7b8153eSMauro Carvalho Chehab /* RESERVED = 0x07 */ 27*e7b8153eSMauro Carvalho Chehab REMOVE_CLIENT = 0x08, 28*e7b8153eSMauro Carvalho Chehab FREEZE_CLIENT = 0x09, 29*e7b8153eSMauro Carvalho Chehab START_CLIENT = 0x0A, 30*e7b8153eSMauro Carvalho Chehab FREEZE_ALL = 0x0B, 31*e7b8153eSMauro Carvalho Chehab START_ALL = 0x0C, 32*e7b8153eSMauro Carvalho Chehab REMOVE_ALL = 0x0D 33*e7b8153eSMauro Carvalho Chehab }; 34*e7b8153eSMauro Carvalho Chehab 35*e7b8153eSMauro Carvalho Chehab int hva_hw_probe(struct platform_device *pdev, struct hva_dev *hva); 36*e7b8153eSMauro Carvalho Chehab void hva_hw_remove(struct hva_dev *hva); 37*e7b8153eSMauro Carvalho Chehab int hva_hw_runtime_suspend(struct device *dev); 38*e7b8153eSMauro Carvalho Chehab int hva_hw_runtime_resume(struct device *dev); 39*e7b8153eSMauro Carvalho Chehab int hva_hw_execute_task(struct hva_ctx *ctx, enum hva_hw_cmd_type cmd, 40*e7b8153eSMauro Carvalho Chehab struct hva_buffer *task); 41*e7b8153eSMauro Carvalho Chehab #ifdef CONFIG_VIDEO_STI_HVA_DEBUGFS 42*e7b8153eSMauro Carvalho Chehab void hva_hw_dump_regs(struct hva_dev *hva, struct seq_file *s); 43*e7b8153eSMauro Carvalho Chehab #endif 44*e7b8153eSMauro Carvalho Chehab 45*e7b8153eSMauro Carvalho Chehab #endif /* HVA_HW_H */ 46