• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Support for Intel Camera Imaging ISP subsystem.
4  * Copyright (c) 2015, Intel Corporation.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms and conditions of the GNU General Public License,
8  * version 2, as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13  * more details.
14  */
15 
16 #ifndef __ISYS_STREAM2MMIO_PUBLIC_H_INCLUDED__
17 #define __ISYS_STREAM2MMIO_PUBLIC_H_INCLUDED__
18 
19 /*****************************************************
20  *
21  * Native command interface (NCI).
22  *
23  *****************************************************/
24 /**
25  * @brief Get the stream2mmio-controller state.
26  * Get the state of the stream2mmio-controller regiester-set.
27  *
28  * @param[in]	id		The global unique ID of the steeam2mmio controller.
29  * @param[out]	state	Point to the register-state.
30  */
31 STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_get_state(
32     const stream2mmio_ID_t ID,
33     stream2mmio_state_t *state);
34 
35 /**
36  * @brief Get the state of the stream2mmio-controller sidess.
37  * Get the state of the register set per buf-controller sidess.
38  *
39  * @param[in]	id		The global unique ID of the steeam2mmio controller.
40  * @param[in]	sid_id		The sid ID.
41  * @param[out]	state		Point to the sid state.
42  */
43 STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_get_sid_state(
44     const stream2mmio_ID_t ID,
45     const stream2mmio_sid_ID_t sid_id,
46     stream2mmio_sid_state_t *state);
47 /* end of NCI */
48 
49 /*****************************************************
50  *
51  * Device level interface (DLI).
52  *
53  *****************************************************/
54 /**
55  * @brief Load the register value.
56  * Load the value of the register of the stream2mmio-controller.
57  *
58  * @param[in]	ID	The global unique ID for the stream2mmio-controller instance.
59  * @param[in]	sid_id	The SID in question.
60  * @param[in]	reg_idx	The offset address of the register.
61  *
62  * @return the value of the register.
63  */
64 STORAGE_CLASS_STREAM2MMIO_H hrt_data stream2mmio_reg_load(
65     const stream2mmio_ID_t ID,
66     const stream2mmio_sid_ID_t sid_id,
67     const uint32_t reg_idx);
68 
69 /**
70  * @brief Dump the SID processor state.
71  * Dump the state of the sid regiester-set.
72  *
73  * @param[in]	state		Pointer to the register-state.
74  */
75 STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_print_sid_state(
76     stream2mmio_sid_state_t	*state);
77 /**
78  * @brief Dump the stream2mmio state.
79  * Dump the state of the ibuf-controller regiester-set.
80  *
81  * @param[in]	id		The global unique ID of the st2mmio
82  * @param[in]	state		Pointer to the register-state.
83  */
84 STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_dump_state(
85     const stream2mmio_ID_t ID,
86     stream2mmio_state_t *state);
87 /**
88  * @brief Store a value to the register.
89  * Store a value to the registe of the stream2mmio-controller.
90  *
91  * @param[in]	ID		The global unique ID for the stream2mmio-controller instance.
92  * @param[in]	reg		The offset address of the register.
93  * @param[in]	value	The value to be stored.
94  *
95  */
96 STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_reg_store(
97     const stream2mmio_ID_t ID,
98     const hrt_address reg,
99     const hrt_data value);
100 /* end of DLI */
101 
102 #endif /* __ISYS_STREAM2MMIO_PUBLIC_H_INCLUDED__ */
103