1*9ed785a9SBenjamin Gaignard /* SPDX-License-Identifier: GPL-2.0 */ 257b2c062SJean-Christophe Trotin /* 357b2c062SJean-Christophe Trotin * Copyright (C) STMicroelectronics SA 2015 457b2c062SJean-Christophe Trotin * Authors: Yannick Fertre <yannick.fertre@st.com> 557b2c062SJean-Christophe Trotin * Hugues Fruchet <hugues.fruchet@st.com> 657b2c062SJean-Christophe Trotin */ 757b2c062SJean-Christophe Trotin 857b2c062SJean-Christophe Trotin #ifndef HVA_HW_H 957b2c062SJean-Christophe Trotin #define HVA_HW_H 1057b2c062SJean-Christophe Trotin 1157b2c062SJean-Christophe Trotin #include "hva-mem.h" 1257b2c062SJean-Christophe Trotin 1357b2c062SJean-Christophe Trotin /* HVA Versions */ 1457b2c062SJean-Christophe Trotin #define HVA_VERSION_UNKNOWN 0x000 1557b2c062SJean-Christophe Trotin #define HVA_VERSION_V400 0x400 1657b2c062SJean-Christophe Trotin 1757b2c062SJean-Christophe Trotin /* HVA command types */ 1857b2c062SJean-Christophe Trotin enum hva_hw_cmd_type { 1957b2c062SJean-Christophe Trotin /* RESERVED = 0x00 */ 2057b2c062SJean-Christophe Trotin /* RESERVED = 0x01 */ 2157b2c062SJean-Christophe Trotin H264_ENC = 0x02, 2257b2c062SJean-Christophe Trotin /* RESERVED = 0x03 */ 2357b2c062SJean-Christophe Trotin /* RESERVED = 0x04 */ 2457b2c062SJean-Christophe Trotin /* RESERVED = 0x05 */ 2557b2c062SJean-Christophe Trotin /* RESERVED = 0x06 */ 2657b2c062SJean-Christophe Trotin /* RESERVED = 0x07 */ 2757b2c062SJean-Christophe Trotin REMOVE_CLIENT = 0x08, 2857b2c062SJean-Christophe Trotin FREEZE_CLIENT = 0x09, 2957b2c062SJean-Christophe Trotin START_CLIENT = 0x0A, 3057b2c062SJean-Christophe Trotin FREEZE_ALL = 0x0B, 3157b2c062SJean-Christophe Trotin START_ALL = 0x0C, 3257b2c062SJean-Christophe Trotin REMOVE_ALL = 0x0D 3357b2c062SJean-Christophe Trotin }; 3457b2c062SJean-Christophe Trotin 3557b2c062SJean-Christophe Trotin int hva_hw_probe(struct platform_device *pdev, struct hva_dev *hva); 3657b2c062SJean-Christophe Trotin void hva_hw_remove(struct hva_dev *hva); 3757b2c062SJean-Christophe Trotin int hva_hw_runtime_suspend(struct device *dev); 3857b2c062SJean-Christophe Trotin int hva_hw_runtime_resume(struct device *dev); 3957b2c062SJean-Christophe Trotin int hva_hw_execute_task(struct hva_ctx *ctx, enum hva_hw_cmd_type cmd, 4057b2c062SJean-Christophe Trotin struct hva_buffer *task); 41c610b5a8SJean-Christophe Trotin #ifdef CONFIG_VIDEO_STI_HVA_DEBUGFS 42c610b5a8SJean-Christophe Trotin void hva_hw_dump_regs(struct hva_dev *hva, struct seq_file *s); 43c610b5a8SJean-Christophe Trotin #endif 4457b2c062SJean-Christophe Trotin 4557b2c062SJean-Christophe Trotin #endif /* HVA_HW_H */ 46