1 /**************************************************************************** 2 **+-----------------------------------------------------------------------+** 3 **| |** 4 **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** 5 **| All rights reserved. |** 6 **| |** 7 **| Redistribution and use in source and binary forms, with or without |** 8 **| modification, are permitted provided that the following conditions |** 9 **| are met: |** 10 **| |** 11 **| * Redistributions of source code must retain the above copyright |** 12 **| notice, this list of conditions and the following disclaimer. |** 13 **| * Redistributions in binary form must reproduce the above copyright |** 14 **| notice, this list of conditions and the following disclaimer in |** 15 **| the documentation and/or other materials provided with the |** 16 **| distribution. |** 17 **| * Neither the name Texas Instruments nor the names of its |** 18 **| contributors may be used to endorse or promote products derived |** 19 **| from this software without specific prior written permission. |** 20 **| |** 21 **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** 22 **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** 23 **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** 24 **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** 25 **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** 26 **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** 27 **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** 28 **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** 29 **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** 30 **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |** 31 **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |** 32 **| |** 33 **+-----------------------------------------------------------------------+** 34 ****************************************************************************/ 35 36 /**************************************************************************** 37 * 38 * MODULE: shmDebug.c 39 * PURPOSE: Handle Debug requests 40 * 41 ****************************************************************************/ 42 #include "whalCommon.h" 43 #include "whalBus_Api.h" 44 #include "shmBus.h" 45 #include "TNETWIF.h" 46 47 48 #ifdef USE_SYNC_API 49 50 /**************************************************************************** 51 * shmDebug_registerDump() 52 **************************************************************************** 53 * DESCRIPTION: 54 * 55 * INPUTS: 56 * 57 * OUTPUT: 58 * 59 * RETURNS: void 60 * 61 * NOTES: 62 ****************************************************************************/ 63 void shmDebug_registerDump(TI_HANDLE hWhalBus) 64 { 65 shmDebug_macRegisterDump(hWhalBus); 66 shmDebug_phyRegisterDump(hWhalBus); 67 } 68 69 void shmDebug_phyRegisterDump(TI_HANDLE hWhalBus) 70 { 71 UINT32 regIndex; 72 int regInterval; 73 UINT32 RegValue; 74 UINT32 phyRegMap[56] = { 75 0x0800, 0x0807, 0x1000, 0x100c, 0x1010, 0x1019, 0x1020, 0x1032, 76 0x1040, 0x104c, 0x1050, 0x1077, 0x1201, 0x1334, 0x1400, 0x143f, 77 0x1500, 0x153F, 0x1800, 0x1802, 0x1c00, 0x1cff, 0x1e00, 0x1eff, 78 0x2000, 0x20ff, 0x2840, 0x28b3, 0x2a00, 0x2a02, 0x2c01, 0x2c02, 79 0x2c10, 0x2c6f, 0x2d00, 0x2f3f, 0x3000, 0x30dd, 0x3100, 0x311f, 80 0x3200, 0x321f, 0x3030, 0x303f, 0x4800, 0x4bb8, 0x4bc0, 0x4bd7, 81 0x4be1, 0x4bed, 0x4bf0, 0x4d7f, 0x4e00, 0x4fe0, 0x4ff0, 0x4fff 82 }; 83 84 WLAN_OS_REPORT(("shmDebug_registerDump : Dumping PHY registers \n")); 85 for (regInterval = 0; regInterval < 56; regInterval += 2) 86 { 87 WLAN_OS_REPORT(("shmDebug_registerDump : Dumping PHY registers from 0x%x to 0x%x\n", 88 phyRegMap[regInterval], phyRegMap[regInterval+1])); 89 for (regIndex = phyRegMap[regInterval]; regIndex <= phyRegMap[regInterval+1]; regIndex++) 90 { 91 #if defined(TNETW1150) 92 RegValue = whalBus_PhyRegRead(hWhalBus, regIndex+0x3c0000); 93 #else 94 RegValue = whalBus_PhyRegRead(hWhalBus, regIndex); 95 #endif 96 WLAN_OS_REPORT(("Phy addr = 0x%x, Phy data = 0x%x\n", regIndex, RegValue)); 97 } 98 } 99 100 WLAN_OS_REPORT(("shmDebug_registerDump : FINISHED Dumping PHY registers \n")); 101 } 102 103 #if defined (TNETW1150) 104 105 void shmDebug_macRegisterDump(TI_HANDLE hWhalBus) 106 { 107 WLAN_OS_REPORT(("shmDebug_macRegisterDump : Not implemented in TNETW1150 \n")); 108 } 109 110 #else 111 112 #define START_REG_ADDR 0x0 113 #define LAST_REG_ADDR 0xa80 114 115 void shmDebug_macRegisterDump(TI_HANDLE hWhalBus) 116 { 117 whalBus_T *pWhalBus = (whalBus_T *)hWhalBus; 118 119 UINT32 regIndex; 120 UINT32 RegValue; 121 122 123 WLAN_OS_REPORT(("shmDebug_registerDump : Dumping MAC registers \n")); 124 125 for (regIndex = START_REG_ADDR; regIndex < LAST_REG_ADDR; regIndex += 4) 126 { 127 RegValue = whalBus_MacRegRead(hWhalBus, regIndex); 128 WLAN_OS_REPORT(("Mac addr = 0x%x, Mac data = 0x%x\n", regIndex, RegValue)); 129 } 130 } 131 132 #endif 133 134 int shmDebug_PrintRxRegs(TI_HANDLE hWhalBus) 135 { 136 whalBus_T *pWhalBus = (whalBus_T *)hWhalBus; 137 138 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 139 ("shmDebug_PrintRxRegs ----MAC--------------\n")); 140 141 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 142 ("RX_FRM_CNT (0x%08X) = 0x%08X, 0x%08X\n", RX_FRM_CNT, 143 whalBus_MacRegRead(hWhalBus, RX_FRM_CNT), 144 whalBus_MacRegRead(hWhalBus, RX_FRM_CNT))); 145 146 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 147 ("CONS_FCS_ERR_CNT(0x%08X) = 0x%08X, 0x%08X\n", CONS_FCS_ERR_CNT, 148 whalBus_MacRegRead(hWhalBus, CONS_FCS_ERR_CNT), 149 whalBus_MacRegRead(hWhalBus, CONS_FCS_ERR_CNT))); 150 151 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 152 ("FCS_ERR_CNT (0x%08X) = 0x%08X, 0x%08X\n", FCS_ERR_CNT, 153 whalBus_MacRegRead(hWhalBus, FCS_ERR_CNT), 154 whalBus_MacRegRead(hWhalBus, FCS_ERR_CNT))); 155 156 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 157 ("PLCP_ERR_CNT (0x%08X) = 0x%08X, 0x%08X\n", PLCP_ERR_CNT, 158 whalBus_MacRegRead(hWhalBus, PLCP_ERR_CNT), 159 whalBus_MacRegRead(hWhalBus, PLCP_ERR_CNT))); 160 161 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 162 ("RX_FRM_PTR (0x%08X) = 0x%08X, 0x%08X\n", RX_FRM_PTR, 163 whalBus_MacRegRead(hWhalBus, RX_FRM_PTR), 164 whalBus_MacRegRead(hWhalBus, RX_FRM_PTR))); 165 166 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 167 ("RX_FRM_CTL (0x%08X) = 0x%08X, 0x%08X\n", RX_FRM_CTL, 168 whalBus_MacRegRead(hWhalBus, RX_FRM_CTL), 169 whalBus_MacRegRead(hWhalBus, RX_FRM_CTL))); 170 171 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 172 ("RX_SEQ_CTL (0x%08X) = 0x%08X, 0x%08X\n", RX_SEQ_CTL, 173 whalBus_MacRegRead(hWhalBus, RX_SEQ_CTL), 174 whalBus_MacRegRead(hWhalBus, RX_SEQ_CTL))); 175 176 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 177 ("RX_STATUS (0x%08X) = 0x%08X, 0x%08X\n", RX_STATUS, 178 whalBus_MacRegRead(hWhalBus, RX_STATUS), 179 whalBus_MacRegRead(hWhalBus, RX_STATUS))); 180 181 #if defined (TNETW1150) 182 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 183 ("RX_HEAD_PTR (0x%08X) = 0x%08X, 0x%08X\n", RX_HEAD_PTR, 184 whalBus_MacRegRead(hWhalBus, RX_HEAD_PTR), 185 whalBus_MacRegRead(hWhalBus, RX_HEAD_PTR))); 186 187 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 188 ("RX_TAIL_PTR (0x%08X) = 0x%08X, 0x%08X\n", RX_TAIL_PTR, 189 whalBus_MacRegRead(hWhalBus, RX_TAIL_PTR), 190 whalBus_MacRegRead(hWhalBus, RX_TAIL_PTR))); 191 192 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 193 ("RX_CURR_PTR (0x%08X) = 0x%08X, 0x%08X\n", RX_CURR_PTR, 194 whalBus_MacRegRead(hWhalBus, RX_CURR_PTR), 195 whalBus_MacRegRead(hWhalBus, RX_CURR_PTR))); 196 #endif 197 198 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 199 ("shmDebug_PrintRxRegs ----PHY--------------\n")); 200 201 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 202 ("PHY_11A_HDR_ERR (0x%08X) = 0x%08X, 0x%08X\n", 0x3c400a, 203 whalBus_PhyRegRead(hWhalBus, 0x3c400a), 204 whalBus_PhyRegRead(hWhalBus, 0x3c400a))); 205 206 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 207 ("PHY_FSM_STATUS (0x%08X) = 0x%08X, 0x%08X\n", 0x3c4017, 208 whalBus_PhyRegRead(hWhalBus, 0x3c4017), 209 whalBus_PhyRegRead(hWhalBus, 0x3c4017))); 210 211 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 212 ("PHY_BAD_PKT_CNT (0x%08X) = 0x%08X, 0x%08X\n", 0x3c2010, 213 whalBus_PhyRegRead(hWhalBus, 0x3c2010), 214 whalBus_PhyRegRead(hWhalBus, 0x3c2010))); 215 216 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 217 ("PHY_RXT_CFG (0x%08X) = 0x%08X, 0x%08X\n", 0x3c2002, 218 whalBus_PhyRegRead(hWhalBus, 0x3c2002), 219 whalBus_PhyRegRead(hWhalBus, 0x3c2002))); 220 221 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 222 ("PHY_LS_RAM_OVR (0x%08X) = 0x%08X, 0x%08X\n", 0x3c2020, 223 whalBus_PhyRegRead(hWhalBus, 0x3c2020), 224 whalBus_PhyRegRead(hWhalBus, 0x3c2020))); 225 226 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 227 ("PHY_LS_FFT_ERR (0x%08X) = 0x%08X, 0x%08X\n", 0x3c2027, 228 whalBus_PhyRegRead(hWhalBus, 0x3c2027), 229 whalBus_PhyRegRead(hWhalBus, 0x3c2027))); 230 231 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 232 ("PHY_DATA_STATE (0x%08X) = 0x%08X, 0x%08X\n", 0x3c201f, 233 whalBus_PhyRegRead(hWhalBus, 0x3c201f), 234 whalBus_PhyRegRead(hWhalBus, 0x3c201f))); 235 236 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 237 ("PHY_SEQ_CFG (0x%08X) = 0x%08X, 0x%08X\n", 0x3c301a, 238 whalBus_PhyRegRead(hWhalBus, 0x3c301a), 239 whalBus_PhyRegRead(hWhalBus, 0x3c301a))); 240 241 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 242 ("PHY_SYM_NUM (0x%08X) = 0x%08X, 0x%08X\n", 0x3c2805, 243 whalBus_PhyRegRead(hWhalBus, 0x3c2805), 244 whalBus_PhyRegRead(hWhalBus, 0x3c2805))); 245 246 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 247 ("PHY_RUNBUSY (0x%08X) = 0x%08X, 0x%08X\n", 0x3c2800, 248 whalBus_PhyRegRead(hWhalBus, 0x3c2800), 249 whalBus_PhyRegRead(hWhalBus, 0x3c2800))); 250 251 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 252 ("PHY_PTH_ACC_0 (0x%08X) = 0x%08X, 0x%08X\n", 0x3c2f00, 253 whalBus_PhyRegRead(hWhalBus, 0x3c2f00), 254 whalBus_PhyRegRead(hWhalBus, 0x3c2f00))); 255 256 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 257 ("PHY_PTH_ACC_1 (0x%08X) = 0x%08X, 0x%08X\n", 0x3c2f01, 258 whalBus_PhyRegRead(hWhalBus, 0x3c2f01), 259 whalBus_PhyRegRead(hWhalBus, 0x3c2f01))); 260 261 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 262 ("PHY_PTH_ACC_2 (0x%08X) = 0x%08X, 0x%08X\n", 0x3c2f02, 263 whalBus_PhyRegRead(hWhalBus, 0x3c2f02), 264 whalBus_PhyRegRead(hWhalBus, 0x3c2f02))); 265 266 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 267 ("PHY_PTH_ACC_3 (0x%08X) = 0x%08X, 0x%08X\n", 0x3c2f03, 268 whalBus_PhyRegRead(hWhalBus, 0x3c2f03), 269 whalBus_PhyRegRead(hWhalBus, 0x3c2f03))); 270 271 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 272 ("PHY_PTH_ACC_4 (0x%08X) = 0x%08X, 0x%08X\n", 0x3c2f04, 273 whalBus_PhyRegRead(hWhalBus, 0x3c2f04), 274 whalBus_PhyRegRead(hWhalBus, 0x3c2f04))); 275 276 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 277 ("PHY_PLCP_SIGNAL (0x%08X) = 0x%08X, 0x%08X\n", 0x3c4002, 278 whalBus_PhyRegRead(hWhalBus, 0x3c4002), 279 whalBus_PhyRegRead(hWhalBus, 0x3c4002))); 280 281 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 282 ("PHY_PLCP_LENGTH (0x%08X) = 0x%08X, 0x%08X\n", 0x3c4003, 283 whalBus_PhyRegRead(hWhalBus, 0x3c4003), 284 whalBus_PhyRegRead(hWhalBus, 0x3c4003))); 285 286 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 287 ("PHY_11B_HDR (0x%08X) = 0x%08X, 0x%08X\n", 0x3c400b, 288 whalBus_PhyRegRead(hWhalBus, 0x3c400b), 289 whalBus_PhyRegRead(hWhalBus, 0x3c400b))); 290 291 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 292 ("PHY_TRANS_LENGTH(0x%08X) = 0x%08X, 0x%08X\n", 0x3c4018, 293 whalBus_PhyRegRead(hWhalBus, 0x3c4018), 294 whalBus_PhyRegRead(hWhalBus, 0x3c4018))); 295 296 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 297 ("PHY_FFT_START (0x%08X) = 0x%08X, 0x%08X\n", 0x3c1802, 298 whalBus_PhyRegRead(hWhalBus, 0x3c1802), 299 whalBus_PhyRegRead(hWhalBus, 0x3c1802))); 300 301 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 302 ("PHY_OUT_RAM_IACC(0x%08X) = 0x%08X, 0x%08X\n", 0x3c1E00, 303 whalBus_PhyRegRead(hWhalBus, 0x3c1E00), 304 whalBus_PhyRegRead(hWhalBus, 0x3c1E00))); 305 306 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 307 ("PHY_RLS_SLOPE (0x%08X) = 0x%08X, 0x%08X\n", 0x3c2807, 308 whalBus_PhyRegRead(hWhalBus, 0x3c2807), 309 whalBus_PhyRegRead(hWhalBus, 0x3c2807))); 310 311 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 312 ("PHY_RLS_SLOPE_SH(0x%08X) = 0x%08X, 0x%08X\n", 0x3c2808, 313 whalBus_PhyRegRead(hWhalBus, 0x3c2808), 314 whalBus_PhyRegRead(hWhalBus, 0x3c2808))); 315 316 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 317 ("PHY_RLS_INTERCEP(0x%08X) = 0x%08X, 0x%08X\n", 0x3c2809, 318 whalBus_PhyRegRead(hWhalBus, 0x3c2809), 319 whalBus_PhyRegRead(hWhalBus, 0x3c2809))); 320 321 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 322 ("PHY_CHANRESP_ICO(0x%08X) = 0x%08X, 0x%08X\n", 0x3c2840, 323 whalBus_PhyRegRead(hWhalBus, 0x3c2840), 324 whalBus_PhyRegRead(hWhalBus, 0x3c2840))); 325 326 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 327 ("PHY_CHANRESP_ICO(0x%08X) = 0x%08X, 0x%08X\n", 0x3c2880, 328 whalBus_PhyRegRead(hWhalBus, 0x3c2880), 329 whalBus_PhyRegRead(hWhalBus, 0x3c2880))); 330 331 return OK; 332 } 333 334 int shmDebug_PrintTxRegs(TI_HANDLE hWhalBus) 335 { 336 whalBus_T *pWhalBus = (whalBus_T *)hWhalBus; 337 338 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 339 ("shmDebug_PrintTxRegs ----MAC--------------\n")); 340 341 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 342 ("TX_STATUS (0x%08X) = 0x%08X, 0x%08X\n", TX_STATUS, 343 whalBus_MacRegRead(hWhalBus, TX_STATUS), 344 whalBus_MacRegRead(hWhalBus, TX_STATUS))); 345 346 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 347 ("TX_STATE (0x%08X) = 0x%08X, 0x%08X\n", TX_STATE, 348 whalBus_MacRegRead(hWhalBus, TX_STATE), 349 whalBus_MacRegRead(hWhalBus, TX_STATE))); 350 351 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 352 ("NEXT_SEQ_NUM (0x%08X) = 0x%08X, 0x%08X\n", NEXT_SEQ_NUM, 353 whalBus_MacRegRead(hWhalBus, NEXT_SEQ_NUM), 354 whalBus_MacRegRead(hWhalBus, NEXT_SEQ_NUM))); 355 356 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 357 ("BCN_SEQ_NUM (0x%08X) = 0x%08X, 0x%08X\n", BCN_SEQ_NUM, 358 whalBus_MacRegRead(hWhalBus, BCN_SEQ_NUM), 359 whalBus_MacRegRead(hWhalBus, BCN_SEQ_NUM))); 360 361 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 362 ("For Ping/Pong/Pang registers use print register list in the \n")); 363 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 364 ("Addresses: 0x%08X/0x%08X/0x%08X\n", TX_PING0, TX_PONG0, TX_PANG0)); 365 366 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 367 ("shmDebug_PrintTxRegs ----PHY--------------\n")); 368 369 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 370 ("PHY_TX_STATUS (0x%08X) = 0x%08X, 0x%08X\n", 0x3c1002, 371 whalBus_PhyRegRead(hWhalBus, 0x3c1002), 372 whalBus_PhyRegRead(hWhalBus, 0x3c1002))); 373 374 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 375 ("PHY_TX_MODE (0x%08X) = 0x%08X, 0x%08X\n", 0x3c1008, 376 whalBus_PhyRegRead(hWhalBus, 0x3c1008), 377 whalBus_PhyRegRead(hWhalBus, 0x3c1008))); 378 379 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 380 ("PHY_TX_CTRL (0x%08X) = 0x%08X, 0x%08X\n", 0x3c1001, 381 whalBus_PhyRegRead(hWhalBus, 0x3c1001), 382 whalBus_PhyRegRead(hWhalBus, 0x3c1001))); 383 384 return OK; 385 } 386 387 int shmDebug_PrintScrPadRegs(TI_HANDLE hWhalBus) 388 { 389 whalBus_T *pWhalBus = (whalBus_T *)hWhalBus; 390 391 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 392 ("shmDebug_PrintScrPadRegs ---------------------\n")); 393 394 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 395 ("SCR_PAD0 (0x%08X) = 0x%08X, 0x%08X\n", SCR_PAD0, 396 whalBus_MacRegRead(hWhalBus, SCR_PAD0), 397 whalBus_MacRegRead(hWhalBus, SCR_PAD0))); 398 399 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 400 ("SCR_PAD1 (0x%08X) = 0x%08X, 0x%08X\n", SCR_PAD1, 401 whalBus_MacRegRead(hWhalBus, SCR_PAD1), 402 whalBus_MacRegRead(hWhalBus, SCR_PAD1))); 403 404 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 405 ("SCR_PAD2 (0x%08X) = 0x%08X, 0x%08X\n", SCR_PAD2, 406 whalBus_MacRegRead(hWhalBus, SCR_PAD2), 407 whalBus_MacRegRead(hWhalBus, SCR_PAD2))); 408 409 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 410 ("SCR_PAD3 (0x%08X) = 0x%08X, 0x%08X\n", SCR_PAD3, 411 whalBus_MacRegRead(hWhalBus, SCR_PAD3), 412 whalBus_MacRegRead(hWhalBus, SCR_PAD3))); 413 414 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 415 ("SCR_PAD4 (0x%08X) = 0x%08X, 0x%08X\n", SCR_PAD4, 416 whalBus_MacRegRead(hWhalBus, SCR_PAD4), 417 whalBus_MacRegRead(hWhalBus, SCR_PAD4))); 418 419 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 420 ("SCR_PAD5 (0x%08X) = 0x%08X, 0x%08X\n", SCR_PAD5, 421 whalBus_MacRegRead(hWhalBus, SCR_PAD5), 422 whalBus_MacRegRead(hWhalBus, SCR_PAD5))); 423 424 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 425 ("SCR_PAD6 (0x%08X) = 0x%08X, 0x%08X\n", SCR_PAD6, 426 whalBus_MacRegRead(hWhalBus, SCR_PAD6), 427 whalBus_MacRegRead(hWhalBus, SCR_PAD6))); 428 429 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 430 ("SCR_PAD7 (0x%08X) = 0x%08X, 0x%08X\n", SCR_PAD7, 431 whalBus_MacRegRead(hWhalBus, SCR_PAD7), 432 whalBus_MacRegRead(hWhalBus, SCR_PAD7))); 433 434 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 435 ("SCR_PAD8 (0x%08X) = 0x%08X, 0x%08X\n", SCR_PAD8, 436 whalBus_MacRegRead(hWhalBus, SCR_PAD8), 437 whalBus_MacRegRead(hWhalBus, SCR_PAD8))); 438 439 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 440 ("SCR_PAD9 (0x%08X) = 0x%08X, 0x%08X\n", SCR_PAD9, 441 whalBus_MacRegRead(hWhalBus, SCR_PAD9), 442 whalBus_MacRegRead(hWhalBus, SCR_PAD9))); 443 444 return OK; 445 } 446 447 int shmDebug_PrintListRegs(TI_HANDLE hWhalBus, UINT32 RegAddr) 448 { 449 whalBus_T *pWhalBus = (whalBus_T *)hWhalBus; 450 451 int i; 452 453 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 454 ("shmDebug_PrintListRegs ---------------------\n")); 455 456 for (i=0; i<8; i++, RegAddr+=16) 457 { 458 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_CTRL_MODULE_LOG, 459 ("REGS (Base=0x%08X) = 0x%08X, 0x%08X, 0x%08X, 0x%08X\n", RegAddr, 460 whalBus_MacRegRead(hWhalBus, RegAddr+0), 461 whalBus_MacRegRead(hWhalBus, RegAddr+4), 462 whalBus_MacRegRead(hWhalBus, RegAddr+8), 463 whalBus_MacRegRead(hWhalBus, RegAddr+12))); 464 } 465 466 return OK; 467 } 468 469 void shmDebug_MemPrint(TI_HANDLE hWhalBus, UINT32 MemAddr) 470 { 471 whalBus_T *pWhalBus = (whalBus_T *)hWhalBus; 472 473 UINT8 HostBuf[256]; 474 UINT8 *pBuf; 475 int i; 476 477 whalBus_MemCopyFrom(hWhalBus, (UINT8*)MemAddr ,(char *)(&HostBuf[0]), 256); 478 479 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_HW_CTRL_MODULE_LOG, 480 ("shmDebug_MemPrint ========================================\n")); 481 482 for (i=0, pBuf=HostBuf; i<256; i+=16, pBuf+=16) 483 { 484 WLAN_REPORT_REPLY(pWhalBus->hReport, HAL_HW_CTRL_MODULE_LOG, 485 ("PrintBuf: %08x: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", 486 MemAddr+i, 487 pBuf[0], pBuf[1], pBuf[2], pBuf[3], pBuf[4], pBuf[5], pBuf[6], pBuf[7], 488 pBuf[8], pBuf[9], pBuf[10], pBuf[11], pBuf[12], pBuf[13], pBuf[14], pBuf[15])); 489 } 490 } 491 492 #endif /* USE_SYNC_API */ 493 494