18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef ___ASM_SPARC_IO_H 38c2ecf20Sopenharmony_ci#define ___ASM_SPARC_IO_H 48c2ecf20Sopenharmony_ci#if defined(__sparc__) && defined(__arch64__) 58c2ecf20Sopenharmony_ci#include <asm/io_64.h> 68c2ecf20Sopenharmony_ci#else 78c2ecf20Sopenharmony_ci#include <asm/io_32.h> 88c2ecf20Sopenharmony_ci#endif 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci/* 118c2ecf20Sopenharmony_ci * Defines used for both SPARC32 and SPARC64 128c2ecf20Sopenharmony_ci */ 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci/* Big endian versions of memory read/write routines */ 158c2ecf20Sopenharmony_ci#define readb_be(__addr) __raw_readb(__addr) 168c2ecf20Sopenharmony_ci#define readw_be(__addr) __raw_readw(__addr) 178c2ecf20Sopenharmony_ci#define readl_be(__addr) __raw_readl(__addr) 188c2ecf20Sopenharmony_ci#define writeb_be(__b, __addr) __raw_writeb(__b, __addr) 198c2ecf20Sopenharmony_ci#define writel_be(__w, __addr) __raw_writel(__w, __addr) 208c2ecf20Sopenharmony_ci#define writew_be(__l, __addr) __raw_writew(__l, __addr) 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#endif 23