18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (C) STMicroelectronics SA 2015
48c2ecf20Sopenharmony_ci * Authors: Yannick Fertre <yannick.fertre@st.com>
58c2ecf20Sopenharmony_ci *          Hugues Fruchet <hugues.fruchet@st.com>
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef HVA_HW_H
98c2ecf20Sopenharmony_ci#define HVA_HW_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include "hva-mem.h"
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci/* HVA Versions */
148c2ecf20Sopenharmony_ci#define HVA_VERSION_UNKNOWN    0x000
158c2ecf20Sopenharmony_ci#define HVA_VERSION_V400       0x400
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci/* HVA command types */
188c2ecf20Sopenharmony_cienum hva_hw_cmd_type {
198c2ecf20Sopenharmony_ci	/* RESERVED = 0x00 */
208c2ecf20Sopenharmony_ci	/* RESERVED = 0x01 */
218c2ecf20Sopenharmony_ci	H264_ENC = 0x02,
228c2ecf20Sopenharmony_ci	/* RESERVED = 0x03 */
238c2ecf20Sopenharmony_ci	/* RESERVED = 0x04 */
248c2ecf20Sopenharmony_ci	/* RESERVED = 0x05 */
258c2ecf20Sopenharmony_ci	/* RESERVED = 0x06 */
268c2ecf20Sopenharmony_ci	/* RESERVED = 0x07 */
278c2ecf20Sopenharmony_ci	REMOVE_CLIENT = 0x08,
288c2ecf20Sopenharmony_ci	FREEZE_CLIENT = 0x09,
298c2ecf20Sopenharmony_ci	START_CLIENT = 0x0A,
308c2ecf20Sopenharmony_ci	FREEZE_ALL = 0x0B,
318c2ecf20Sopenharmony_ci	START_ALL = 0x0C,
328c2ecf20Sopenharmony_ci	REMOVE_ALL = 0x0D
338c2ecf20Sopenharmony_ci};
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciint hva_hw_probe(struct platform_device *pdev, struct hva_dev *hva);
368c2ecf20Sopenharmony_civoid hva_hw_remove(struct hva_dev *hva);
378c2ecf20Sopenharmony_ciint hva_hw_runtime_suspend(struct device *dev);
388c2ecf20Sopenharmony_ciint hva_hw_runtime_resume(struct device *dev);
398c2ecf20Sopenharmony_ciint hva_hw_execute_task(struct hva_ctx *ctx, enum hva_hw_cmd_type cmd,
408c2ecf20Sopenharmony_ci			struct hva_buffer *task);
418c2ecf20Sopenharmony_ci#ifdef CONFIG_VIDEO_STI_HVA_DEBUGFS
428c2ecf20Sopenharmony_civoid hva_hw_dump_regs(struct hva_dev *hva, struct seq_file *s);
438c2ecf20Sopenharmony_ci#endif
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci#endif /* HVA_HW_H */
46