2 <:copyright-BRCM:2013:DUAL/GPL:standard
4 Copyright (c) 2013 Broadcom
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License, version 2, as published by
9 the Free Software Foundation (the "GPL").
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
17 A copy of the GPL is available at http://www.broadcom.com/licenses/GPLv2.php, or by
18 writing to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.
31 #ifdef PMC_LITTLE_ENDIAN
49 uint32_t devAddr
:16; // [15:00] bus in upper nibble (only values of 0-7 are allowed), device address in lower 12 bits (4096 devices = 0..4095)
50 uint32_t zoneIdx
:10; // [25:16] maximum 1023 registers/zone (0..1022)
51 uint32_t island
:4; // [27:26] maximum 15 power islands (0..15) (island 15 = ALL islands!
52 uint32_t reserved
:2; // [31:28]
59 #ifdef PMC_LITTLE_ENDIAN
75 // Ping, GetNextLogEntry, GetRMON and Sigma
82 } TCommandGenericParams
;
84 // PowerZoneOnOff, SetRunState, SetPowerState
86 #if defined(PMC_LITTLE_ENDIAN) && defined(PMC_CPU_BIG_ENDIAN)
98 #if defined(PMC_LITTLE_ENDIAN) && defined(PMC_CPU_BIG_ENDIAN)
108 } TCommandPowerDevice
;
112 #if defined(PMC_LITTLE_ENDIAN) && defined(PMC_CPU_BIG_ENDIAN)
120 } TCommandPowerIsland
;
122 // SetClockLowGear, SetClockHighGear
124 #if defined(PMC_LITTLE_ENDIAN) && defined(PMC_CPU_BIG_ENDIAN)
136 #if defined(PMC_LITTLE_ENDIAN) && defined(PMC_CPU_BIG_ENDIAN)
144 } TCommandSetClockGear
;
147 #if defined(PMC_LITTLE_ENDIAN) && defined(PMC_CPU_BIG_ENDIAN)
153 uint8_t high_watermark
;
154 uint8_t low_watermark
;
160 uint8_t low_watermark
;
161 uint8_t high_watermark
;
167 uint32_t phy_src_addr
;
168 uint32_t dest_addr
; // lower 8 bits **may** be log2 window size
172 #if defined(PMC_IMPL_3_X) || IS_BCMCHIP(63158)
176 uint16_t margin_mv_slow
;
183 uint16_t margin_mv_fast
;
188 uint32_t margin_mv_slow
;
189 uint32_t margin_mv_fast
;
202 TCommandNoParams cmdNoParams
;
203 TCommandGenericParams cmdGenericParams
;
204 TCommandStateOnly cmdStateOnlyParam
;
205 TCommandPowerDevice cmdPowerDevice
;
206 TCommandPowerIsland cmdPowerIsland
;
207 TCommandSetClockN cmdSetClockN
;
208 TCommandSetClockGear cmdSetClockGear
;
209 TCommandAllocDQM cmdAllocDqm
;
210 TCommandJumpApp cmdJumpApp
;
211 TCommandCloseAVS cmdCloseAVS
;
212 TCommandResponse cmdResponse
;
216 // special values to select all devices/zones
217 #define ALL_DEVICES 0x3ff
218 #define ALL_ZONES 0x3ff
220 // used in validate caller to prevent/allow restrictions on island, device and/or zone
221 #define ANY_ISLAND 998
222 #define ANY_DEVICE 1024
223 #define ANY_ZONE 1024
224 #define NO_ISLAND 999
225 #define NO_DEVICE 1025
240 INVALID_QUEUE_NUMBER
,
244 INSUFFIENT_QSM_MEMORY_AVAILABLE
,
245 INVALID_BOOT_COMMAND
,
253 // low-level commands
269 // general-purpose high-level commands
275 cmdGetAvsDisableState
,
277 // specific-purpose high-level commands
285 cmdRegisterCmdHandler
,
286 cmdFindUnusedCommand
,
297 cmdSetTemperatureThresholds
,
298 cmdResetTemperatureWarning
,
302 extern void ProcessCommand(TCommand
* cmd
, TCommand
* response
);
303 extern int SendCommand(int cmdID
, int devAddr
, int zone
, int island
, uint32_t word2
,
304 uint32_t word3
, TCommand
*rsp
);
307 #endif // PMCCOMMAND_H