source: svn/trunk/newcon3bcm2_21bu/magnum/basemodules/reg/breg_virt.h @ 29

Last change on this file since 29 was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 3.9 KB
Line 
1/***************************************************************************
2 *         Copyright (c) 2003, Broadcom Corporation
3 *         All Rights Reserved
4 *         Confidential Property of Broadcom Corporation
5 *
6 *      THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *      AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *      EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: breg_virt.h $
11 * $brcm_Revision: Hydra_Software_Devel/1 $
12 * $brcm_Date: 5/21/04 8:54p $
13 *
14 * Module Description:
15 *
16 * Revision History:
17 *
18 * $brcm_Log: /magnum/basemodules/reg/breg_virt.h $
19 *
20 * Hydra_Software_Devel/1   5/21/04 8:54p vsilyaev
21 * PR 11175: Merged into the integration branch
22 *
23 * Hydra_Software_Devel/BCM7411/2   5/17/04 6:55p vsilyaev
24 * Fixed #if/#endif order
25 *
26 * Hydra_Software_Devel/BCM7411/1   5/14/04 7:16p vsilyaev
27 * Virtual register interface, supports all possible buses.
28 *
29 ***************************************************************************/
30
31/*= Module Overview ********************************************************
32This module supplies the function required to access any type of registers.
33Before any registers can be accessed an appropriate register handle should
34be created (normally done at system init time).  This register handle is
35then given to any modules that require access to the corresponding set of registers.
36***************************************************************************/
37
38#ifndef BREG_VIRT_H
39#define BREG_VIRT_H
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45
46/*
47Summary:
48This is an opaque handle that is used for memory mapped register functions.
49*/
50typedef struct BREG_Virt_Impl *BREG_Virt_Handle;
51
52/*
53Summary:
54This function writes 32 bits to a register.
55
56Description:
57Although this fuction will never return an error it will assert if the
58RegHandle is invalid.
59*/
60void BREG_Virt_Write32(
61                              BREG_Virt_Handle RegHandle, /* Register handle created by BREG_CreateRegHandle() */
62                                  uint32_t reg, /* Register offset to write */
63                                  uint32_t data /* Data value to write to register */
64                                  );
65
66/*
67Summary:
68This function writes 16 bits to a register.
69
70Description:
71Although this fuction will never return an error it will assert if the
72RegHandle is invalid
73*/
74void BREG_Virt_Write16(
75                              BREG_Virt_Handle RegHandle, /* Register handle created by BREG_CreateRegHandle() */
76                                  uint32_t reg, /* Register offset to write */
77                                  uint16_t data /* Data value to write to register */
78                                  );
79
80/*
81Summary:
82This function writes 8 bits to a register.
83
84Description:
85Although this fuction will never return an error it will assert if the
86RegHandle is invalid.
87*/
88void BREG_Virt_Write8(
89                              BREG_Virt_Handle RegHandle, /* Register handle created by BREG_CreateRegHandle() */
90                                  uint32_t reg, /* Register offset to write */
91                                 uint8_t data /* Data value to write to register */
92                                 );
93
94/*
95Summary:
96This function reads 32 bits from a register.
97
98Description:
99Although this fuction cannot return an error it will assert if the
100RegHandle is invalid.
101*/
102uint32_t BREG_Virt_Read32(
103                             BREG_Virt_Handle RegHandle, /* Register handle created by BREG_CreateRegHandle() */
104                                 uint32_t reg /* Register offset to read */
105                                 );
106
107/*
108Summary:
109This function reads 16 bits from a register.
110
111Description:
112Although this fuction cannot return an error it will assert if the
113RegHandle is invalid.
114*/
115uint16_t BREG_Virt_Read16(
116                             BREG_Virt_Handle RegHandle, /* Register handle created by BREG_CreateRegHandle() */
117                                 uint16_t reg /* Register offset to read */
118                                 );
119
120/*
121Summary:
122This function reads 8 bits from a register.
123
124Description:
125Although this fuction cannot return an error it will assert if the
126RegHandle is invalid.
127*/
128uint8_t BREG_Virt_Read8(
129                             BREG_Virt_Handle RegHandle, /* Register handle created by BREG_CreateRegHandle() */
130                                 uint8_t reg /* Register offset to read */
131                                 );
132
133
134#ifdef __cplusplus
135}
136#endif
137 
138#endif
139/* End of File */
Note: See TracBrowser for help on using the repository browser.