Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:42

0001 /* SPDX-License-Identifier: BSD-2-Clause */
0002 
0003 /**
0004  * @file
0005  *
0006  * @ingroup RTEMSDeviceGRLIBAHBSTAT
0007  *
0008  * @brief This header file defines the AHBSTAT register block interface.
0009  */
0010 
0011 /*
0012  * Copyright (C) 2021 embedded brains GmbH & Co. KG
0013  *
0014  * Redistribution and use in source and binary forms, with or without
0015  * modification, are permitted provided that the following conditions
0016  * are met:
0017  * 1. Redistributions of source code must retain the above copyright
0018  *    notice, this list of conditions and the following disclaimer.
0019  * 2. Redistributions in binary form must reproduce the above copyright
0020  *    notice, this list of conditions and the following disclaimer in the
0021  *    documentation and/or other materials provided with the distribution.
0022  *
0023  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0024  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0025  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0026  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
0027  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0028  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
0029  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0030  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
0031  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0032  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
0033  * POSSIBILITY OF SUCH DAMAGE.
0034  */
0035 
0036 /*
0037  * This file is part of the RTEMS quality process and was automatically
0038  * generated.  If you find something that needs to be fixed or
0039  * worded better please post a report or patch to an RTEMS mailing list
0040  * or raise a bug report:
0041  *
0042  * https://www.rtems.org/bugs.html
0043  *
0044  * For information on updating and regenerating please refer to the How-To
0045  * section in the Software Requirements Engineering chapter of the
0046  * RTEMS Software Engineering manual.  The manual is provided as a part of
0047  * a release.  For development sources please refer to the online
0048  * documentation at:
0049  *
0050  * https://docs.rtems.org
0051  */
0052 
0053 /* Generated from spec:/dev/grlib/if/ahbstat-header */
0054 
0055 #ifndef _GRLIB_AHBSTAT_REGS_H
0056 #define _GRLIB_AHBSTAT_REGS_H
0057 
0058 #include <stdint.h>
0059 
0060 #ifdef __cplusplus
0061 extern "C" {
0062 #endif
0063 
0064 /* Generated from spec:/dev/grlib/if/ahbstat */
0065 
0066 /**
0067  * @defgroup RTEMSDeviceGRLIBAHBSTAT AHBSTAT
0068  *
0069  * @ingroup RTEMSDeviceGRLIB
0070  *
0071  * @brief This group contains the AHBSTAT interfaces.
0072  *
0073  * @{
0074  */
0075 
0076 /**
0077  * @defgroup RTEMSDeviceGRLIBAHBSTATAHBS AHB Status register (AHBS)
0078  *
0079  * @brief This group contains register bit definitions.
0080  *
0081  * @{
0082  */
0083 
0084 #define AHBSTAT_AHBS_ME 0x2000U
0085 
0086 #define AHBSTAT_AHBS_FW 0x1000U
0087 
0088 #define AHBSTAT_AHBS_CF 0x800U
0089 
0090 #define AHBSTAT_AHBS_AF 0x400U
0091 
0092 #define AHBSTAT_AHBS_CE 0x200U
0093 
0094 #define AHBSTAT_AHBS_NE 0x100U
0095 
0096 #define AHBSTAT_AHBS_HWRITE 0x80U
0097 
0098 #define AHBSTAT_AHBS_HMASTER_SHIFT 3
0099 #define AHBSTAT_AHBS_HMASTER_MASK 0x78U
0100 #define AHBSTAT_AHBS_HMASTER_GET( _reg ) \
0101   ( ( ( _reg ) & AHBSTAT_AHBS_HMASTER_MASK ) >> \
0102     AHBSTAT_AHBS_HMASTER_SHIFT )
0103 #define AHBSTAT_AHBS_HMASTER_SET( _reg, _val ) \
0104   ( ( ( _reg ) & ~AHBSTAT_AHBS_HMASTER_MASK ) | \
0105     ( ( ( _val ) << AHBSTAT_AHBS_HMASTER_SHIFT ) & \
0106       AHBSTAT_AHBS_HMASTER_MASK ) )
0107 #define AHBSTAT_AHBS_HMASTER( _val ) \
0108   ( ( ( _val ) << AHBSTAT_AHBS_HMASTER_SHIFT ) & \
0109     AHBSTAT_AHBS_HMASTER_MASK )
0110 
0111 #define AHBSTAT_AHBS_HSIZE_SHIFT 0
0112 #define AHBSTAT_AHBS_HSIZE_MASK 0x7U
0113 #define AHBSTAT_AHBS_HSIZE_GET( _reg ) \
0114   ( ( ( _reg ) & AHBSTAT_AHBS_HSIZE_MASK ) >> \
0115     AHBSTAT_AHBS_HSIZE_SHIFT )
0116 #define AHBSTAT_AHBS_HSIZE_SET( _reg, _val ) \
0117   ( ( ( _reg ) & ~AHBSTAT_AHBS_HSIZE_MASK ) | \
0118     ( ( ( _val ) << AHBSTAT_AHBS_HSIZE_SHIFT ) & \
0119       AHBSTAT_AHBS_HSIZE_MASK ) )
0120 #define AHBSTAT_AHBS_HSIZE( _val ) \
0121   ( ( ( _val ) << AHBSTAT_AHBS_HSIZE_SHIFT ) & \
0122     AHBSTAT_AHBS_HSIZE_MASK )
0123 
0124 /** @} */
0125 
0126 /**
0127  * @defgroup RTEMSDeviceGRLIBAHBSTATAHBFAR \
0128  *   AHB Failing address register (AHBFAR)
0129  *
0130  * @brief This group contains register bit definitions.
0131  *
0132  * @{
0133  */
0134 
0135 #define AHBSTAT_AHBFAR_HADDR_SHIFT 0
0136 #define AHBSTAT_AHBFAR_HADDR_MASK 0xffffffffU
0137 #define AHBSTAT_AHBFAR_HADDR_GET( _reg ) \
0138   ( ( ( _reg ) & AHBSTAT_AHBFAR_HADDR_MASK ) >> \
0139     AHBSTAT_AHBFAR_HADDR_SHIFT )
0140 #define AHBSTAT_AHBFAR_HADDR_SET( _reg, _val ) \
0141   ( ( ( _reg ) & ~AHBSTAT_AHBFAR_HADDR_MASK ) | \
0142     ( ( ( _val ) << AHBSTAT_AHBFAR_HADDR_SHIFT ) & \
0143       AHBSTAT_AHBFAR_HADDR_MASK ) )
0144 #define AHBSTAT_AHBFAR_HADDR( _val ) \
0145   ( ( ( _val ) << AHBSTAT_AHBFAR_HADDR_SHIFT ) & \
0146     AHBSTAT_AHBFAR_HADDR_MASK )
0147 
0148 /** @} */
0149 
0150 /**
0151  * @brief This structure defines the AHBSTAT register block memory map.
0152  */
0153 typedef struct ahbstat {
0154   /**
0155    * @brief See @ref RTEMSDeviceGRLIBAHBSTATAHBS.
0156    */
0157   uint32_t ahbs;
0158 
0159   /**
0160    * @brief See @ref RTEMSDeviceGRLIBAHBSTATAHBFAR.
0161    */
0162   uint32_t ahbfar;
0163 } ahbstat;
0164 
0165 /** @} */
0166 
0167 #ifdef __cplusplus
0168 }
0169 #endif
0170 
0171 #endif /* _GRLIB_AHBSTAT_REGS_H */