18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Header file for using the wbflush routine 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 58c2ecf20Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 68c2ecf20Sopenharmony_ci * for more details. 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * Copyright (c) 1998 Harald Koerfgen 98c2ecf20Sopenharmony_ci * Copyright (C) 2002 Maciej W. Rozycki 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci#ifndef _ASM_WBFLUSH_H 128c2ecf20Sopenharmony_ci#define _ASM_WBFLUSH_H 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#ifdef CONFIG_CPU_HAS_WB 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ciextern void (*__wbflush)(void); 188c2ecf20Sopenharmony_ciextern void wbflush_setup(void); 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#define wbflush() \ 218c2ecf20Sopenharmony_ci do { \ 228c2ecf20Sopenharmony_ci __sync(); \ 238c2ecf20Sopenharmony_ci __wbflush(); \ 248c2ecf20Sopenharmony_ci } while (0) 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#else /* !CONFIG_CPU_HAS_WB */ 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci#define wbflush_setup() do { } while (0) 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#define wbflush() fast_iob() 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#endif /* !CONFIG_CPU_HAS_WB */ 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#endif /* _ASM_WBFLUSH_H */ 35