/*****************************************************************************
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
* Copyright 2014 QLogic Corporation
* The contents of this file are subject to the terms of the
* QLogic End User License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing permissions
* and limitations under the License.
*
*****************************************************************************/
#include "sync.h"
#include "lm5710.h"
#ifndef UEFI64
#else
#endif
typedef int mm_spin_lock_t;
#define mm_read_barrier_imp()
#define mm_write_barrier_imp()
#define mm_barrier_imp()
{
LOCK();
*p = v;
UNLOCK();
}
{
LOCK();
ret = --(*p);
UNLOCK();
return ret;
}
{
LOCK();
ret = ++(*p);
UNLOCK();
return ret;
}
{
LOCK();
ret = *p;
*p &= v;
UNLOCK();
return ret;
}
unsigned long v)
{
unsigned long ret;
LOCK();
ret = *p;
*p &= v;
UNLOCK();
return ret;
}
{
LOCK();
ret = *p;
*p |= v;
UNLOCK();
return ret;
}
unsigned long v)
{
unsigned long ret;
LOCK();
ret = *p;
*p |= v;
UNLOCK();
return ret;
}
{
LOCK();
ret = *p;
if (*p == old_v)
{
*p = new_v;
}
UNLOCK();
return ret;
}
LM_BAR_WR32_OFFSET((PDEV), BAR_1, (u32_t)((int_ptr_t)((u8_t *)(PDEV)->context_info->array[CID].cid_resc.mapped_cid_bar_addr - \
#ifdef VF_INVOLVED
#endif /* VF_INVOLVED */
{
/* Do nothing */
}
{
LOCK();
return LM_STATUS_SUCCESS;
}
{
UNLOCK();
return LM_STATUS_SUCCESS;
}
#ifdef BIG_ENDIAN
// LE
// BE
#else /* LITTLE_ENDIAN */
// LE
// BE
#endif /* ifdef BIG_ENDIAN */
void mm_bar_copy_buffer(
struct _lm_device_t * _pdev,
);
u64_t mm_query_system_time(void);