guo ecf2d82159
sync branch rt-smart. (#6641)
* Synchronize the code of the rt mart branch to the master branch.
  * TTY device
  * Add lwP code from rt-smart
  * Add vnode in DFS, but DFS will be re-write for rt-smart
  * There are three libcpu for rt-smart:
    * arm/cortex-a, arm/aarch64
    * riscv64

Co-authored-by: Rbb666 <zhangbingru@rt-thread.com>
Co-authored-by: zhkag <zhkag@foxmail.com>
2022-12-03 12:07:44 +08:00

47 lines
1.3 KiB
C

#ifndef SUNXI_HAL_CACHE_H
#define SUNXI_HAL_CACHE_H
#ifdef __cplusplus
extern "C"
{
#endif
#include <stddef.h>
#include <stdint.h>
#ifdef CONFIG_KERNEL_FREERTOS
#ifndef CONFIG_CORE_DSP0
#include <mmu_cache.h>
#include <armv7.h>
#endif
void hal_dcache_clean(unsigned long vaddr_start, unsigned long size);
void hal_dcache_invalidate(unsigned long vaddr_start, unsigned long size);
void hal_dcache_clean_invalidate(unsigned long vaddr_start, unsigned long size);
void hal_icache_invalidate_all(void);
void hal_dcache_invalidate_all(void);
void hal_dcache_clean_all(void);
#else
#include <arch.h>
#define hal_dcache_clean cpu_dcache_clean
#define hal_dcache_clean_invalidate cpu_dcache_clean_invalidate
#define hal_dcache_invalidate cpu_dcache_invalidate
#define hal_icache_invalidate_all cpu_icache_invalidate_all
#define hal_dcache_clean_all cpu_dcache_clean_all
#define hal_dcache_invalidate_all cpu_dcache_invalidate_all
void cpu_dcache_clean(unsigned long vaddr_start, unsigned long size);
void cpu_dcache_clean_invalidate(unsigned long vaddr_start, unsigned long size);
void cpu_dcache_invalidate(unsigned long vaddr_start, unsigned long size);
void cpu_icache_invalidate_all(void);
void cpu_dcache_clean_all(void);
void cpu_dcache_invalidate_all(void);
#endif
#ifdef __cplusplus
}
#endif
#endif