GNU Linux-libre 4.14.266-gnu1
[releases.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / hive_isp_css_include / host / mmu_public.h
1 /*
2  * Support for Intel Camera Imaging ISP subsystem.
3  * Copyright (c) 2015, Intel Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU General Public License,
7  * version 2, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  */
14
15 #ifndef __MMU_PUBLIC_H_INCLUDED__
16 #define __MMU_PUBLIC_H_INCLUDED__
17
18 #include "system_types.h"
19
20 /*! Set the page table base index of MMU[ID]
21
22  \param ID[in]                          MMU identifier
23  \param base_index[in]          page table base index
24
25  \return none, MMU[ID].page_table_base_index = base_index
26  */
27 STORAGE_CLASS_EXTERN void mmu_set_page_table_base_index(
28         const mmu_ID_t          ID,
29         const hrt_data          base_index);
30
31 /*! Get the page table base index of MMU[ID]
32
33  \param ID[in]                          MMU identifier
34  \param base_index[in]          page table base index
35
36  \return MMU[ID].page_table_base_index
37  */
38 STORAGE_CLASS_EXTERN hrt_data mmu_get_page_table_base_index(
39         const mmu_ID_t          ID);
40
41 /*! Invalidate the page table cache of MMU[ID]
42
43  \param ID[in]                          MMU identifier
44
45  \return none
46  */
47 STORAGE_CLASS_EXTERN void mmu_invalidate_cache(
48         const mmu_ID_t          ID);
49
50
51 /*! Invalidate the page table cache of all MMUs
52
53  \return none
54  */
55 STORAGE_CLASS_EXTERN void mmu_invalidate_cache_all(void);
56
57 /*! Write to a control register of MMU[ID]
58
59  \param ID[in]                          MMU identifier
60  \param reg[in]                         register index
61  \param value[in]                       The data to be written
62
63  \return none, MMU[ID].ctrl[reg] = value
64  */
65 STORAGE_CLASS_MMU_H void mmu_reg_store(
66         const mmu_ID_t          ID,
67         const unsigned int      reg,
68         const hrt_data          value);
69
70 /*! Read from a control register of MMU[ID]
71
72  \param ID[in]                          MMU identifier
73  \param reg[in]                         register index
74  \param value[in]                       The data to be written
75
76  \return MMU[ID].ctrl[reg]
77  */
78 STORAGE_CLASS_MMU_H hrt_data mmu_reg_load(
79         const mmu_ID_t          ID,
80         const unsigned int      reg);
81
82 #endif /* __MMU_PUBLIC_H_INCLUDED__ */