18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci// Copyright (C) 2005-2017 Andes Technology Corporation
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci#ifndef __NDS32_PROCFNS_H__
58c2ecf20Sopenharmony_ci#define __NDS32_PROCFNS_H__
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#ifdef __KERNEL__
88c2ecf20Sopenharmony_ci#include <asm/page.h>
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_cistruct mm_struct;
118c2ecf20Sopenharmony_cistruct vm_area_struct;
128c2ecf20Sopenharmony_ciextern void cpu_proc_init(void);
138c2ecf20Sopenharmony_ciextern void cpu_proc_fin(void);
148c2ecf20Sopenharmony_ciextern void cpu_do_idle(void);
158c2ecf20Sopenharmony_ciextern void cpu_reset(unsigned long reset);
168c2ecf20Sopenharmony_ciextern void cpu_switch_mm(struct mm_struct *mm);
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ciextern void cpu_dcache_inval_all(void);
198c2ecf20Sopenharmony_ciextern void cpu_dcache_wbinval_all(void);
208c2ecf20Sopenharmony_ciextern void cpu_dcache_inval_page(unsigned long page);
218c2ecf20Sopenharmony_ciextern void cpu_dcache_wb_page(unsigned long page);
228c2ecf20Sopenharmony_ciextern void cpu_dcache_wbinval_page(unsigned long page);
238c2ecf20Sopenharmony_ciextern void cpu_dcache_inval_range(unsigned long start, unsigned long end);
248c2ecf20Sopenharmony_ciextern void cpu_dcache_wb_range(unsigned long start, unsigned long end);
258c2ecf20Sopenharmony_ciextern void cpu_dcache_wbinval_range(unsigned long start, unsigned long end);
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ciextern void cpu_icache_inval_all(void);
288c2ecf20Sopenharmony_ciextern void cpu_icache_inval_page(unsigned long page);
298c2ecf20Sopenharmony_ciextern void cpu_icache_inval_range(unsigned long start, unsigned long end);
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ciextern void cpu_cache_wbinval_page(unsigned long page, int flushi);
328c2ecf20Sopenharmony_ciextern void cpu_cache_wbinval_range(unsigned long start,
338c2ecf20Sopenharmony_ci				    unsigned long end, int flushi);
348c2ecf20Sopenharmony_ciextern void cpu_cache_wbinval_range_check(struct vm_area_struct *vma,
358c2ecf20Sopenharmony_ci					  unsigned long start,
368c2ecf20Sopenharmony_ci					  unsigned long end, bool flushi,
378c2ecf20Sopenharmony_ci					  bool wbd);
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ciextern void cpu_dma_wb_range(unsigned long start, unsigned long end);
408c2ecf20Sopenharmony_ciextern void cpu_dma_inval_range(unsigned long start, unsigned long end);
418c2ecf20Sopenharmony_ciextern void cpu_dma_wbinval_range(unsigned long start, unsigned long end);
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci#endif /* __KERNEL__ */
448c2ecf20Sopenharmony_ci#endif /* __NDS32_PROCFNS_H__ */
45