Files
android_kernel_samsung_sm86…/hw/qca6290/v1/seq_hwio.h
Debashis Dutt b27dcac106 fw-api: Update HW header files to version R102 for QCA6290
Update HW include header files to DV release version R102
from R81. This is required to support emulation
version E3 for all platforms. Note that this change only
updates the _EXISTING_ header files, which already existed
in the earlier version, and is also present in R102. Files
which are required to be newly added to the git repository
from the HW repository, as part of R102 upgrade will be
added using a separate change.

Change-Id: I934a343998d965457d2c5ffbc7dee31ec5208935
CRs-Fixed: 1105853
2017-01-03 13:53:45 -08:00

122 lines
3.3 KiB
C

/*
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/*********************************************************************************
*
* DESCRIPTION
* - This is an extension of standard msmhwio.h to support relative addressing
* scheme used in SCALe auto-generated sequences.
* - The objective of this new addressing scheme is enable the same C function
* definition to be applicable to multiple baseances of the same block.
* - Such code reuse is not feasible with the standard HWIO macros that use a
* absolute addressing scheme.
* - Compared to the standard HWIO macros, the new macros defined here take an
* additional parameter 'baseance offset'. So are the C functions generated
* by SCALe Autoseq from .seq inputs.
* - As such, macros defined in this file must be used with 'seq_msmhwiobase.h',
* 'seq_msmhwioreg.h', and the C codes generated from SCALe Autoseq.
* - Macros defined in this file leverage the lower-level macros from the
* standard 'msmhwio.h', and the two sets of macros are compatible.
*
********************************************************************************/
#ifndef __SEQ_H__
#define __SEQ_H__
#include "HALhwio.h"
/**** Register Ref Read ****/
#define SEQ_INH(base, regtype, reg) \
SEQ_##regtype##_INH(base, reg)
/**** Masked Register Read ****/
#define SEQ_INMH(base, regtype, reg, mask) \
SEQ_##regtype##_INMH(base, reg, mask)
/**** Ref Reg Field Read ****/
#define SEQ_INFH(base, regtype, reg, fld) \
(SEQ_##regtype##_INMH(base, reg, HWIO_FMSK(regtype, fld)) >> HWIO_SHFT(regtype, fld))
/**** Ref Register Write ****/
#define SEQ_OUTH(base, regtype, reg, val) \
SEQ_##regtype##_OUTH(base, reg, val)
/**** Ref Register Masked Write ****/
#define SEQ_OUTMH(base, regtype, reg, mask, val) \
SEQ_##regtype##_OUTMH(base, reg, mask, val)
/**** Ref Register Field Write ****/
#define SEQ_OUTFH(base, regtype, reg, fld, val) \
SEQ_##regtype##_OUTMH(base, reg, HWIO_FMSK(regtype, fld), val << HWIO_SHFT(regtype, fld))
/**** seq_msg() ****
typedef enum {
DEBUG,
INFO,
WARNING,
ERROR,
FATAL
} SeverityLevel ;
void seq_msg(SeverityLevel severity, unsigned int msg_id, const char *format_str, ... );
*/
/************ seq_wait() ************/
typedef enum {
SEC,
MS,
US,
NS
} SEQ_TimeUnit;
extern void seq_wait(uint32 time_value, SEQ_TimeUnit time_unit);
/************ seq_poll() ************/
extern uint32 seq_poll(uint32 reg_offset, uint32 expect_value, uint32 value_mask, uint32 value_shift, uint32 max_poll_cnt);
#endif /* __SEQ_H__ */