Cleanup endian macros.

Honor the AHC_REG_PRETTY_PRINT option.

Add lock placeholders for new locks used by the core.  These
are not currently needed for FreeBSD.
This commit is contained in:
Justin T. Gibbs 2002-08-31 06:44:20 +00:00
parent 226aa6ea7a
commit 4c4797e6b4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=102675

View File

@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic7xxx_osm.h#10 $
*
* $FreeBSD$
*/
@ -42,7 +42,9 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h> /* For device_t */
#if __FreeBSD_version >= 500000
#include <sys/endian.h>
#endif
#include <sys/eventhandler.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
@ -188,6 +190,7 @@ struct scb_platform_data {
};
/********************************* Byte Order *********************************/
#if __FreeBSD_version >= 500000
#define ahc_htobe16(x) htobe16(x)
#define ahc_htobe32(x) htobe32(x)
#define ahc_htobe64(x) htobe64(x)
@ -201,8 +204,28 @@ struct scb_platform_data {
#define ahc_le16toh(x) le16toh(x)
#define ahc_le32toh(x) le32toh(x)
#define ahc_le64toh(x) le64toh(x)
#else
#define ahc_htobe16(x) (x)
#define ahc_htobe32(x) (x)
#define ahc_htobe64(x) (x)
#define ahc_htole16(x) (x)
#define ahc_htole32(x) (x)
#define ahc_htole64(x) (x)
#define ahc_be16toh(x) (x)
#define ahc_be32toh(x) (x)
#define ahc_be64toh(x) (x)
#define ahc_le16toh(x) (x)
#define ahc_le32toh(x) (x)
#define ahc_le64toh(x) (x)
#endif
/***************************** Core Includes **********************************/
#if AHC_REG_PRETTY_PRINT
#define AIC_DEBUG_REGISTERS 1
#else
#define AIC_DEBUG_REGISTERS 0
#endif
#include <dev/aic7xxx/aic7xxx.h>
/*************************** Device Access ************************************/
@ -238,6 +261,11 @@ static __inline void ahc_done_lockinit(struct ahc_softc *);
static __inline void ahc_done_lock(struct ahc_softc *, unsigned long *flags);
static __inline void ahc_done_unlock(struct ahc_softc *, unsigned long *flags);
/* Lock held during ahc_list manipulation and ahc softc frees */
static __inline void ahc_list_lockinit(void);
static __inline void ahc_list_lock(unsigned long *flags);
static __inline void ahc_list_unlock(unsigned long *flags);
static __inline void
ahc_lockinit(struct ahc_softc *ahc)
{
@ -271,6 +299,21 @@ ahc_done_unlock(struct ahc_softc *ahc, unsigned long *flags)
{
}
/* Lock held during ahc_list manipulation and ahc softc frees */
static __inline void
ahc_list_lockinit()
{
}
static __inline void
ahc_list_lock(unsigned long *flags)
{
}
static __inline void
ahc_list_unlock(unsigned long *flags)
{
}
/****************************** OS Primitives *********************************/
#define ahc_delay DELAY