From 10560f6b2a709090a4389af33c98cc8abbbe03bf Mon Sep 17 00:00:00 2001 From: proski Date: Thu, 13 Dec 2007 02:08:52 +0000 Subject: [PATCH] Fix compiling on non-MIPS platforms Define dma_cache_wback_inv(), move compatibility definitions before they are needed. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3040 0192ed92-7a03-0410-a25b-9323aeb14dbd --- ath/if_ath_ahb.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ath/if_ath_ahb.h b/ath/if_ath_ahb.h index a6f8b4d..d32abe2 100644 --- a/ath/if_ath_ahb.h +++ b/ath/if_ath_ahb.h @@ -102,6 +102,15 @@ #define AR531X_BD_MAGIC 0x35333131 /* "5311", for all 531x platforms */ +/* Allow compiling on non-mips platforms for code verification */ +#ifndef __mips__ +#define CAC_ADDR(addr) (addr) +#define UNCAC_ADDR(addr) (addr) +#define KSEG1ADDR(addr) (addr) +#define dma_cache_wback_inv(start,size) \ + do { (void) (start); (void) (size); } while (0) +#endif + /* set bus cachesize in 4B word units */ static __inline void bus_dma_sync_single(void *hwdev, dma_addr_t dma_handle, size_t size, int direction) @@ -135,11 +144,4 @@ void bus_free_consistent(void *, size_t, void *, dma_addr_t); #define sysRegRead(phys) (*(volatile u_int32_t *)phys) -/* Allow compiling on non-mips platforms for code verification */ -#ifndef __mips__ -#define CAC_ADDR(addr) (addr) -#define UNCAC_ADDR(addr) (addr) -#define KSEG1ADDR(addr) (addr) -#endif - #endif /* _DEV_ATH_AHB_H_ */ -- 2.35.1