From 14247bc74fe1e528b3772ed087508846da564e81 Mon Sep 17 00:00:00 2001 From: proski Date: Sun, 24 May 2009 06:14:18 +0000 Subject: [PATCH] Provide compatibility iowrite32() and ioread() for old sparc32 32-bit sparc only gets those functions in Linux 2.6.18. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4028 0192ed92-7a03-0410-a25b-9323aeb14dbd --- ath_hal/ah_osdep.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ath_hal/ah_osdep.h b/ath_hal/ah_osdep.h index 8360e8a..abe60fa 100644 --- a/ath_hal/ah_osdep.h +++ b/ath_hal/ah_osdep.h @@ -123,6 +123,16 @@ struct ath_hal_rf *const *ah_rfs_ptrs[] = { \ #endif #endif /* AH_BYTE_ORDER */ +/* 32-bit sparc gets iowrite32() and ioread32() in Linux 2.6.18 */ +#if (defined(CONFIG_SPARC32) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18))) +#ifndef iowrite32 +#define iowrite32(_val, _addr) writel(_val, _addr) +#endif +#ifndef ioread32 +#define ioread32(_addr) readl(_addr) +#endif +#endif + /* * The HAL programs big-endian platforms to use byte-swapped hardware registers. * This is done to avoid the byte swapping needed to access PCI devices. -- 2.35.1