| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2006-2012, 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: bchp_avs.h $ |
|---|
| 11 | * $brcm_Revision: Hydra_Software_Devel/4 $ |
|---|
| 12 | * $brcm_Date: 2/17/12 6:12p $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: |
|---|
| 15 | * |
|---|
| 16 | * Revision History: |
|---|
| 17 | * |
|---|
| 18 | * $brcm_Log: /magnum/basemodules/chp/7425/bchp_avs.h $ |
|---|
| 19 | * |
|---|
| 20 | * Hydra_Software_Devel/4 2/17/12 6:12p rjlewis |
|---|
| 21 | * SW7346-117: Moved lock/unlock to priv include file. |
|---|
| 22 | * |
|---|
| 23 | * Hydra_Software_Devel/3 2/6/12 1:38p rjlewis |
|---|
| 24 | * SW7425-2218: Added support for lock and unlock |
|---|
| 25 | * |
|---|
| 26 | * Hydra_Software_Devel/2 8/15/11 1:37p rjlewis |
|---|
| 27 | * SW7346-117: Added support for power management. |
|---|
| 28 | * |
|---|
| 29 | * Hydra_Software_Devel/1 8/4/11 7:23p rjlewis |
|---|
| 30 | * SW7346-117: Adding support for AVS hardware. |
|---|
| 31 | * |
|---|
| 32 | * |
|---|
| 33 | ***************************************************************************/ |
|---|
| 34 | #ifndef BCHP_AVS_H__ |
|---|
| 35 | #define BCHP_AVS_H__ |
|---|
| 36 | |
|---|
| 37 | #include "bstd.h" |
|---|
| 38 | #include "bchp.h" |
|---|
| 39 | |
|---|
| 40 | #ifdef __cplusplus |
|---|
| 41 | extern "C" { |
|---|
| 42 | #endif |
|---|
| 43 | |
|---|
| 44 | /*************************************************************************** |
|---|
| 45 | Summary: |
|---|
| 46 | The handle for AVS features. |
|---|
| 47 | |
|---|
| 48 | Description: |
|---|
| 49 | An opaque handle for AVS features. |
|---|
| 50 | This is returned on a successful Open call and is passed into the |
|---|
| 51 | Monitor and Close calls as input parameter. |
|---|
| 52 | |
|---|
| 53 | See Also: |
|---|
| 54 | BCHP_P_AvsOpen(), BCHP_P_AvsClose(), BCHP_P_AvsMonitorPvt. |
|---|
| 55 | |
|---|
| 56 | ****************************************************************************/ |
|---|
| 57 | typedef struct BCHP_P_AvsContext *BCHP_P_AvsHandle; |
|---|
| 58 | |
|---|
| 59 | |
|---|
| 60 | /*************************************************************************** |
|---|
| 61 | Summary: |
|---|
| 62 | Open a chip handle for AVS processing. |
|---|
| 63 | |
|---|
| 64 | Description: |
|---|
| 65 | This function opens a chip handle for AVS processing. |
|---|
| 66 | |
|---|
| 67 | Input: |
|---|
| 68 | hRegister - A valid chip register handle previous open using BREG_Open. |
|---|
| 69 | |
|---|
| 70 | Output: |
|---|
| 71 | phHandle - Upon successful completion of open this pointer is non NULL |
|---|
| 72 | and contains valid information about this chip. This handle is used |
|---|
| 73 | on subsequences BCHP_??? API. *phHandle is NULL if failure. |
|---|
| 74 | |
|---|
| 75 | See Also: |
|---|
| 76 | BCHP_P_AvsClose, BCHP_P_AvsMonitorPvt |
|---|
| 77 | |
|---|
| 78 | **************************************************************************/ |
|---|
| 79 | BERR_Code BCHP_P_AvsOpen ( |
|---|
| 80 | BCHP_P_AvsHandle *phHandle, /* [out] returns new handle on success */ |
|---|
| 81 | BCHP_Handle hChip); /* [in] handle for chip data */ |
|---|
| 82 | |
|---|
| 83 | /*************************************************************************** |
|---|
| 84 | Summary: |
|---|
| 85 | Close a AVS chip handle. |
|---|
| 86 | |
|---|
| 87 | Description: |
|---|
| 88 | This function closes a chip handle for AVS processing. |
|---|
| 89 | |
|---|
| 90 | Input: |
|---|
| 91 | hHandle - The handle supplied by a successful BCHP_AvsOpen call. |
|---|
| 92 | |
|---|
| 93 | See Also: |
|---|
| 94 | BCHP_P_AvsOpen |
|---|
| 95 | |
|---|
| 96 | **************************************************************************/ |
|---|
| 97 | BERR_Code BCHP_P_AvsClose ( |
|---|
| 98 | BCHP_P_AvsHandle hHandle ); /* [in] handle supplied from open */ |
|---|
| 99 | |
|---|
| 100 | /*************************************************************************** |
|---|
| 101 | Summary: |
|---|
| 102 | Process AVS data. |
|---|
| 103 | |
|---|
| 104 | Description: |
|---|
| 105 | This function is the periodic processing function for the AVS. |
|---|
| 106 | This should be called on a timely basis (every second) to ensure processing gets done. |
|---|
| 107 | |
|---|
| 108 | Input: |
|---|
| 109 | hHandle - The handle supplied by a successful BCHP_AvsOpen call. |
|---|
| 110 | |
|---|
| 111 | See Also: |
|---|
| 112 | BCHP_P_AvsOpen |
|---|
| 113 | |
|---|
| 114 | **************************************************************************/ |
|---|
| 115 | BERR_Code BCHP_P_AvsMonitorPvt ( |
|---|
| 116 | BCHP_P_AvsHandle hHandle); /* [in] handle supplied from open */ |
|---|
| 117 | |
|---|
| 118 | /*************************************************************************** |
|---|
| 119 | Summary: |
|---|
| 120 | Enter/exit stand-by mode. |
|---|
| 121 | |
|---|
| 122 | Description: |
|---|
| 123 | This can be used to have AVS hardware enter stand-by (low power) mode. |
|---|
| 124 | Once entered, calls to BCHP_P_AvsMonitorPvt can be used but will be non-functional. |
|---|
| 125 | |
|---|
| 126 | Input: |
|---|
| 127 | hHandle - The handle supplied by a successful BCHP_P_AvsOpen call. |
|---|
| 128 | activate - is set to true to enter stand-by mode, false returns from stand-by. |
|---|
| 129 | |
|---|
| 130 | See Also: |
|---|
| 131 | BCHP_P_AvsOpen, BCHP_P_AvsMonitorPvt |
|---|
| 132 | |
|---|
| 133 | **************************************************************************/ |
|---|
| 134 | BERR_Code BCHP_P_AvsStandbyMode( |
|---|
| 135 | BCHP_P_AvsHandle hHandle, /* [in] handle supplied from open */ |
|---|
| 136 | bool activate); /* [in] true to enter low power mode */ |
|---|
| 137 | |
|---|
| 138 | #ifdef __cplusplus |
|---|
| 139 | } |
|---|
| 140 | #endif |
|---|
| 141 | |
|---|
| 142 | #endif /* BCHP_AVS_H__ */ |
|---|
| 143 | |
|---|