4 Copyright 2003 Broadcom Corp. All Rights Reserved.
6 This program is free software; you can distribute it and/or modify it
7 under the terms of the GNU General Public License (Version 2) as
8 published by the Free Software Foundation.
10 This program is distributed in the hope it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
21 /**************************************************************************
22 * File Name : boardparms.c
24 * Description: This file contains the implementation for the BCM63xx board
25 * parameter access functions.
27 * Updates : 07/14/2003 Created.
28 ***************************************************************************/
31 #include "boardparms.h"
35 /* Default psi size in K bytes */
36 #define BP_PSI_DEFAULT_SIZE 24
40 typedef struct boardparameters
42 char szBoardId[BP_BOARD_ID_LEN]; /* board id string */
43 ETHERNET_MAC_INFO EnetMacInfos[BP_MAX_ENET_MACS];
44 VOIP_DSP_INFO VoIPDspInfo[BP_MAX_VOIP_DSP];
45 unsigned short usSdramSize; /* SDRAM size and type */
46 unsigned short usPsiSize; /* persistent storage in K bytes */
47 unsigned short usGpioRj11InnerPair; /* GPIO pin or not defined */
48 unsigned short usGpioRj11OuterPair; /* GPIO pin or not defined */
49 unsigned short usGpioPressAndHoldReset; /* GPIO pin or not defined */
50 unsigned short usGpioPcmciaReset; /* GPIO pin or not defined */
51 unsigned short usGpioUartRts; /* GPIO pin or not defined */
52 unsigned short usGpioUartCts; /* GPIO pin or not defined */
53 unsigned short usGpioLedAdsl; /* GPIO pin or not defined */
54 unsigned short usGpioLedAdslFail; /* GPIO pin or not defined */
55 unsigned short usGpioLedWireless; /* GPIO pin or not defined */
56 unsigned short usGpioLedUsb; /* GPIO pin or not defined */
57 unsigned short usGpioLedHpna; /* GPIO pin or not defined */
58 unsigned short usGpioLedWanData; /* GPIO pin or not defined */
59 unsigned short usGpioLedPpp; /* GPIO pin or not defined */
60 unsigned short usGpioLedPppFail; /* GPIO pin or not defined */
61 unsigned short usGpioLedBlPowerOn; /* GPIO pin or not defined */
62 unsigned short usGpioLedBlAlarm; /* GPIO pin or not defined */
63 unsigned short usGpioLedBlResetCfg; /* GPIO pin or not defined */
64 unsigned short usGpioLedBlStop; /* GPIO pin or not defined */
65 unsigned short usExtIntrWireless; /* ext intr or not defined */
66 unsigned short usExtIntrAdslDyingGasp; /* ext intr or not defined */
67 unsigned short usExtIntrHpna; /* ext intr or not defined */
68 unsigned short usCsHpna; /* chip select not defined */
69 unsigned short usAntInUseWireless; /* antenna in use or not defined */
70 unsigned short usGpioSesBtnWireless; /* GPIO pin or not defined */
71 unsigned short usExtIntrSesBtnWireless; /* ext intr or not defined */
72 unsigned short usGpioLedSesWireless; /* GPIO pin or not defined */
73 } BOARD_PARAMETERS, *PBOARD_PARAMETERS;
76 #if defined(_BCM96338_) || defined(CONFIG_BCM96338)
77 static BOARD_PARAMETERS g_bcm96338sv =
79 "96338SV", /* szBoardId */
80 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
81 0x01, /* ucPhyAddress */
82 BP_NOT_DEFINED, /* usGpioPhySpiSck */
83 BP_NOT_DEFINED, /* usGpioPhySpiSs */
84 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
85 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
86 BP_NOT_DEFINED, /* usGpioPhyReset */
87 0x01, /* numSwitchPorts */
88 BP_ENET_CONFIG_MDIO, /* usConfigType */
89 BP_NOT_DEFINED}, /* usReverseMii */
90 {BP_ENET_NO_PHY}}, /* ucPhyType */
91 {{BP_VOIP_NO_DSP}, /* ucDspType */
92 {BP_VOIP_NO_DSP}}, /* ucDspType */
93 BP_MEMORY_16MB_1_CHIP, /* usSdramSize */
94 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
95 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
96 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
97 BP_NOT_DEFINED, /* usGpioPressAndHoldReset */
98 BP_NOT_DEFINED, /* usGpioPcmciaReset */
99 BP_NOT_DEFINED, /* usGpioUartRts */
100 BP_NOT_DEFINED, /* usGpioUartCts */
101 BP_NOT_DEFINED, /* usGpioLedAdsl */
102 BP_NOT_DEFINED, /* usGpioLedAdslFail */
103 BP_NOT_DEFINED, /* usGpioLedWireless */
104 BP_NOT_DEFINED, /* usGpioLedUsb */
105 BP_NOT_DEFINED, /* usGpioLedHpna */
106 BP_NOT_DEFINED, /* usGpioLedWanData */
107 BP_NOT_DEFINED, /* usGpioLedPpp */
108 BP_NOT_DEFINED, /* usGpioLedPppFail */
109 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
110 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
111 BP_NOT_DEFINED, /* usGpioLedBlResetCfg */
112 BP_NOT_DEFINED, /* usGpioLedBlStop */
113 BP_NOT_DEFINED, /* usExtIntrWireless */
114 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
115 BP_NOT_DEFINED, /* usExtIntrHpna */
116 BP_NOT_DEFINED, /* usCsHpna */
117 BP_NOT_DEFINED, /* usAntInUseWireless */
118 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
119 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
120 BP_NOT_DEFINED /* usGpioLedSesWireless */
122 static BOARD_PARAMETERS g_bcm96338l2m8m =
124 "96338L-2M-8M", /* szBoardId */
125 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
126 0x01, /* ucPhyAddress */
127 BP_NOT_DEFINED, /* usGpioPhySpiSck */
128 BP_NOT_DEFINED, /* usGpioPhySpiSs */
129 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
130 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
131 BP_NOT_DEFINED, /* usGpioPhyReset */
132 0x01, /* numSwitchPorts */
133 BP_ENET_CONFIG_MDIO, /* usConfigType */
134 BP_NOT_DEFINED}, /* usReverseMii */
135 {BP_ENET_NO_PHY}}, /* ucPhyType */
136 {{BP_VOIP_NO_DSP}, /* ucDspType */
137 {BP_VOIP_NO_DSP}}, /* ucDspType */
138 BP_MEMORY_8MB_1_CHIP, /* usSdramSize */
139 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
140 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
141 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
142 BP_NOT_DEFINED, /* usGpioPressAndHoldReset */
143 BP_NOT_DEFINED, /* usGpioPcmciaReset */
144 BP_NOT_DEFINED, /* usGpioUartRts */
145 BP_NOT_DEFINED, /* usGpioUartCts */
146 BP_NOT_DEFINED, /* usGpioLedAdsl */
147 BP_GPIO_2_AL, /* usGpioLedAdslFail */
148 BP_NOT_DEFINED, /* usGpioLedWireless */
149 BP_NOT_DEFINED, /* usGpioLedUsb */
150 BP_NOT_DEFINED, /* usGpioLedHpna */
151 BP_GPIO_3_AL, /* usGpioLedWanData */
152 BP_GPIO_3_AL, /* usGpioLedPpp */
153 BP_GPIO_4_AL, /* usGpioLedPppFail */
154 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
155 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
156 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
157 BP_GPIO_1_AL, /* usGpioLedBlStop */
158 BP_NOT_DEFINED, /* usExtIntrWireless */
159 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
160 BP_NOT_DEFINED, /* usExtIntrHpna */
161 BP_NOT_DEFINED, /* usCsHpna */
162 BP_NOT_DEFINED, /* usAntInUseWireless */
163 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
164 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
165 BP_NOT_DEFINED /* usGpioLedSesWireless */
167 static BOARD_PARAMETERS g_bcm96338gw =
169 "96338W", /* szBoardId */
170 {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
171 0x0, /* ucPhyAddress */
172 BP_NOT_DEFINED, /* usGpioPhySpiSck */
173 BP_NOT_DEFINED, /* usGpioPhySpiSs */
174 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
175 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
176 BP_NOT_DEFINED, /* usGpioPhyReset */
177 0x04, /* numSwitchPorts */
178 BP_ENET_CONFIG_MDIO_PSEUDO_PHY, /* usConfigType */
179 BP_ENET_REVERSE_MII}, /* usReverseMii */
180 {BP_ENET_NO_PHY}}, /* ucPhyType */
181 {{BP_VOIP_NO_DSP}, /* ucDspType */
182 {BP_VOIP_NO_DSP}}, /* ucDspType */
183 BP_MEMORY_8MB_1_CHIP, /* usSdramSize */
184 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
185 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
186 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
187 BP_NOT_DEFINED, /* usGpioPressAndHoldReset */
188 BP_NOT_DEFINED, /* usGpioPcmciaReset */
189 BP_NOT_DEFINED, /* usGpioUartRts */
190 BP_NOT_DEFINED, /* usGpioUartCts */
191 BP_NOT_DEFINED, /* usGpioLedAdsl */
192 BP_GPIO_2_AL, /* usGpioLedAdslFail */
193 BP_NOT_DEFINED, /* usGpioLedWireless */
194 BP_NOT_DEFINED, /* usGpioLedUsb */
195 BP_NOT_DEFINED, /* usGpioLedHpna */
196 BP_GPIO_4_AL, /* usGpioLedWanData */
197 BP_GPIO_4_AL, /* usGpioLedPpp */
198 BP_GPIO_3_AL, /* usGpioLedPppFail */
199 BP_GPIO_1_AL, /* usGpioLedBlPowerOn */
200 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
201 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
202 BP_GPIO_0_AL, /* usGpioLedBlStop */
203 BP_NOT_DEFINED, /* usExtIntrWireless */
204 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
205 BP_NOT_DEFINED, /* usExtIntrHpna */
206 BP_NOT_DEFINED, /* usCsHpna */
207 BP_NOT_DEFINED, /* usAntInUseWireless */
208 BP_GPIO_5_AL, /* usGpioSesBtnWireless */
209 BP_EXT_INTR_0, /* usExtIntrSesBtnWireless */
210 BP_NOT_DEFINED /* usGpioLedSesWireless */
212 static PBOARD_PARAMETERS g_BoardParms[] =
213 {&g_bcm96338sv, &g_bcm96338l2m8m, &g_bcm96338gw, 0};
216 #if defined(_BCM96345_) || defined(CONFIG_BCM96345)
217 static BOARD_PARAMETERS g_bcm96345r =
219 "96345R", /* szBoardId */
220 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
221 0x01, /* ucPhyAddress */
222 BP_NOT_DEFINED, /* usGpioPhySpiSck */
223 BP_NOT_DEFINED, /* usGpioPhySpiSs */
224 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
225 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
226 BP_NOT_DEFINED, /* usGpioPhyReset */
227 0x01, /* numSwitchPorts */
228 BP_ENET_CONFIG_MDIO, /* usConfigType */
229 BP_NOT_DEFINED}, /* usReverseMii */
230 {BP_ENET_NO_PHY}}, /* ucPhyType */
231 {{BP_VOIP_NO_DSP}, /* ucDspType */
232 {BP_VOIP_NO_DSP}}, /* ucDspType */
233 BP_MEMORY_8MB_1_CHIP, /* usSdramSize */
234 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
235 BP_GPIO_11_AH, /* usGpioRj11InnerPair */
236 BP_GPIO_12_AH, /* usGpioRj11OuterPair */
237 BP_GPIO_13_AH, /* usGpioPressAndHoldReset */
238 BP_NOT_DEFINED, /* usGpioPcmciaReset */
239 BP_NOT_DEFINED, /* usGpioUartRts */
240 BP_NOT_DEFINED, /* usGpioUartCts */
241 BP_GPIO_8_AH, /* usGpioLedAdsl */
242 BP_NOT_DEFINED, /* usGpioLedAdslFail */
243 BP_NOT_DEFINED, /* usGpioLedWireless */
244 BP_NOT_DEFINED, /* usGpioLedUsb */
245 BP_NOT_DEFINED, /* usGpioLedHpna */
246 BP_GPIO_8_AH, /* usGpioLedWanData */
247 BP_GPIO_9_AH, /* usGpioLedPpp */
248 BP_NOT_DEFINED, /* usGpioLedPppFail */
249 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
250 BP_GPIO_10_AH, /* usGpioLedBlAlarm */
251 BP_GPIO_9_AH, /* usGpioLedBlResetCfg */
252 BP_GPIO_8_AH, /* usGpioLedBlStop */
253 BP_NOT_DEFINED, /* usExtIntrWireless */
254 BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */
255 BP_NOT_DEFINED, /* usExtIntrHpna */
256 BP_NOT_DEFINED, /* usCsHpna */
257 BP_NOT_DEFINED, /* usAntInUseWireless */
258 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
259 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
260 BP_NOT_DEFINED /* usGpioLedSesWireless */
263 static BOARD_PARAMETERS g_bcm96345gw2 =
265 /* A hardware jumper determines whether GPIO 13 is used for Press and Hold
268 "96345GW2", /* szBoardId */
269 {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
270 0x00, /* ucPhyAddress */
271 BP_GPIO_0_AH, /* usGpioPhySpiSck */
272 BP_GPIO_4_AH, /* usGpioPhySpiSs */
273 BP_GPIO_12_AH, /* usGpioPhySpiMosi */
274 BP_GPIO_11_AH, /* usGpioPhySpiMiso */
275 BP_NOT_DEFINED, /* usGpioPhyReset */
276 0x04, /* numSwitchPorts */
277 BP_ENET_CONFIG_GPIO, /* usConfigType */
278 BP_ENET_REVERSE_MII}, /* usReverseMii */
279 {BP_ENET_NO_PHY}}, /* ucPhyType */
280 {{BP_VOIP_DSP, /* ucDspType */
281 0x00, /* ucDspAddress */
282 BP_EXT_INTR_1, /* usExtIntrVoip */
283 BP_GPIO_6_AH, /* usGpioVoipReset */
284 BP_GPIO_15_AH, /* usGpioVoipIntr */
285 BP_NOT_DEFINED, /* usGpioLedVoip */
286 BP_CS_2}, /* usCsVoip */
287 {BP_VOIP_NO_DSP}}, /* ucDspType */
288 BP_MEMORY_16MB_1_CHIP, /* usSdramSize */
289 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
290 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
291 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
292 BP_GPIO_13_AH, /* usGpioPressAndHoldReset */
293 BP_GPIO_2_AH, /* usGpioPcmciaReset */
294 BP_GPIO_13_AH, /* usGpioUartRts */
295 BP_GPIO_9_AH, /* usGpioUartCts */
296 BP_GPIO_8_AH, /* usGpioLedAdsl */
297 BP_NOT_DEFINED, /* usGpioLedAdslFail */
298 BP_NOT_DEFINED, /* usGpioLedWireless */
299 BP_GPIO_7_AH, /* usGpioLedUsb */
300 BP_NOT_DEFINED, /* usGpioLedHpna */
301 BP_GPIO_8_AH, /* usGpioLedWanData */
302 BP_NOT_DEFINED, /* usGpioLedPpp */
303 BP_NOT_DEFINED, /* usGpioLedPppFail */
304 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
305 BP_GPIO_10_AH, /* usGpioLedBlAlarm */
306 BP_GPIO_7_AH, /* usGpioLedBlResetCfg */
307 BP_GPIO_8_AH, /* usGpioLedBlStop */
308 BP_EXT_INTR_2, /* usExtIntrWireless */
309 BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */
310 BP_NOT_DEFINED, /* usExtIntrHpna */
311 BP_NOT_DEFINED, /* usCsHpna */
312 BP_WLAN_ANT_MAIN, /* usAntInUseWireless */
313 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
314 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
315 BP_NOT_DEFINED /* usGpioLedSesWireless */
318 static BOARD_PARAMETERS g_bcm96345gw =
320 "96345GW", /* szBoardId */
321 {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
322 0x00, /* ucPhyAddress */
323 BP_NOT_DEFINED, /* usGpioPhySpiSck */
324 BP_NOT_DEFINED, /* usGpioPhySpiSs */
325 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
326 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
327 BP_NOT_DEFINED, /* usGpioPhyReset */
328 0x04, /* numSwitchPorts */
329 BP_ENET_CONFIG_MDIO, /* usConfigType */
330 BP_ENET_NO_REVERSE_MII}, /* usReverseMii */
331 {BP_ENET_NO_PHY}}, /* ucPhyType */
332 {{BP_VOIP_DSP, /* ucDspType */
333 0x00, /* ucDspAddress */
334 BP_EXT_INTR_1, /* usExtIntrVoip */
335 BP_GPIO_6_AH, /* usGpioVoipReset */
336 BP_GPIO_15_AH, /* usGpioVoipIntr */
337 BP_NOT_DEFINED, /* usGpioLedVoip */
338 BP_CS_2}, /* usCsVoip */
339 {BP_VOIP_NO_DSP}}, /* ucDspType */
340 BP_MEMORY_16MB_1_CHIP, /* usSdramSize */
341 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
342 BP_GPIO_11_AH, /* usGpioRj11InnerPair */
343 BP_GPIO_1_AH, /* usGpioRj11OuterPair */
344 BP_GPIO_13_AH, /* usGpioPressAndHoldReset */
345 BP_GPIO_2_AH, /* usGpioPcmciaReset */
346 BP_NOT_DEFINED, /* usGpioUartRts */
347 BP_NOT_DEFINED, /* usGpioUartCts */
348 BP_GPIO_8_AH, /* usGpioLedAdsl */
349 BP_NOT_DEFINED, /* usGpioLedAdslFail */
350 BP_GPIO_10_AH, /* usGpioLedWireless */
351 BP_NOT_DEFINED, /* usGpioLedUsb */
352 BP_NOT_DEFINED, /* usGpioLedHpna */
353 BP_GPIO_9_AH, /* usGpioLedWanData */
354 BP_GPIO_9_AH, /* usGpioLedPpp */
355 BP_NOT_DEFINED, /* usGpioLedPppFail */
356 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
357 BP_GPIO_9_AH, /* usGpioLedBlAlarm */
358 BP_GPIO_10_AH, /* usGpioLedBlResetCfg */
359 BP_GPIO_8_AH, /* usGpioLedBlStop */
360 BP_EXT_INTR_2, /* usExtIntrWireless */
361 BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */
362 BP_EXT_INTR_3, /* usExtIntrHpna */
363 BP_CS_1, /* usCsHpna */
364 BP_WLAN_ANT_MAIN, /* usAntInUseWireless */
365 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
366 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
367 BP_NOT_DEFINED /* usGpioLedSesWireless */
370 static BOARD_PARAMETERS g_bcm96335r =
372 "96335R", /* szBoardId */
373 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
374 0x01, /* ucPhyAddress */
375 BP_NOT_DEFINED, /* usGpioPhySpiSck */
376 BP_NOT_DEFINED, /* usGpioPhySpiSs */
377 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
378 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
379 BP_NOT_DEFINED, /* usGpioPhyReset */
380 0x01, /* numSwitchPorts */
381 BP_ENET_CONFIG_MDIO, /* usConfigType */
382 BP_NOT_DEFINED}, /* usReverseMii */
383 {BP_ENET_NO_PHY}}, /* ucPhyType */
384 {{BP_VOIP_NO_DSP}, /* ucDspType */
385 {BP_VOIP_NO_DSP}}, /* ucDspType */
386 BP_MEMORY_8MB_1_CHIP, /* usSdramSize */
387 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
388 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
389 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
390 BP_GPIO_14_AH, /* usGpioPressAndHoldReset */
391 BP_NOT_DEFINED, /* usGpioPcmciaReset */
392 BP_NOT_DEFINED, /* usGpioUartRts */
393 BP_NOT_DEFINED, /* usGpioUartCts */
394 BP_GPIO_9_AH, /* usGpioLedAdsl */
395 BP_NOT_DEFINED, /* usGpioLedAdslFail */
396 BP_NOT_DEFINED, /* usGpioLedWireless */
397 BP_NOT_DEFINED, /* usGpioLedUsb */
398 BP_NOT_DEFINED, /* usGpioLedHpna */
399 BP_GPIO_9_AH, /* usGpioLedWanData */
400 BP_GPIO_8_AH, /* usGpioLedPpp */
401 BP_NOT_DEFINED, /* usGpioLedPppFail */
402 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
403 BP_GPIO_10_AH, /* usGpioLedBlAlarm */
404 BP_GPIO_8_AH, /* usGpioLedBlResetCfg */
405 BP_GPIO_9_AH, /* usGpioLedBlStop */
406 BP_NOT_DEFINED, /* usExtIntrWireless */
407 BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */
408 BP_NOT_DEFINED, /* usExtIntrHpna */
409 BP_NOT_DEFINED, /* usCsHpna */
410 BP_NOT_DEFINED, /* usAntInUseWireless */
411 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
412 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
413 BP_NOT_DEFINED /* usGpioLedSesWireless */
416 static BOARD_PARAMETERS g_bcm96345r0 =
418 "96345R0", /* szBoardId */
419 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
420 0x01, /* ucPhyAddress */
421 BP_NOT_DEFINED, /* usGpioPhySpiSck */
422 BP_NOT_DEFINED, /* usGpioPhySpiSs */
423 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
424 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
425 BP_NOT_DEFINED, /* usGpioPhyReset */
426 0x01, /* numSwitchPorts */
427 BP_ENET_CONFIG_MDIO, /* usConfigType */
428 BP_NOT_DEFINED}, /* usReverseMii */
429 {BP_ENET_NO_PHY}}, /* ucPhyType */
430 {{BP_VOIP_NO_DSP}, /* ucDspType */
431 {BP_VOIP_NO_DSP}}, /* ucDspType */
432 BP_MEMORY_8MB_1_CHIP, /* usSdramSize */
433 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
434 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
435 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
436 BP_NOT_DEFINED, /* usGpioPressAndHoldReset */
437 BP_NOT_DEFINED, /* usGpioPcmciaReset */
438 BP_NOT_DEFINED, /* usGpioUartRts */
439 BP_NOT_DEFINED, /* usGpioUartCts */
440 BP_GPIO_8_AH, /* usGpioLedAdsl */
441 BP_NOT_DEFINED, /* usGpioLedAdslFail */
442 BP_NOT_DEFINED, /* usGpioLedWireless */
443 BP_NOT_DEFINED, /* usGpioLedUsb */
444 BP_NOT_DEFINED, /* usGpioLedHpna */
445 BP_GPIO_9_AH, /* usGpioLedWanData */
446 BP_GPIO_9_AH, /* usGpioLedPpp */
447 BP_NOT_DEFINED, /* usGpioLedPppFail */
448 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
449 BP_GPIO_9_AH, /* usGpioLedBlAlarm */
450 BP_GPIO_8_AH, /* usGpioLedBlResetCfg */
451 BP_GPIO_8_AH, /* usGpioLedBlStop */
452 BP_NOT_DEFINED, /* usExtIntrWireless */
453 BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */
454 BP_NOT_DEFINED, /* usExtIntrHpna */
455 BP_NOT_DEFINED, /* usCsHpna */
456 BP_NOT_DEFINED, /* usAntInUseWireless */
457 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
458 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
459 BP_NOT_DEFINED /* usGpioLedSesWireless */
462 static BOARD_PARAMETERS g_bcm96345rs =
464 "96345RS", /* szBoardId */
465 {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
466 0x00, /* ucPhyAddress */
467 BP_NOT_DEFINED, /* usGpioPhySpiSck */
468 BP_NOT_DEFINED, /* usGpioPhySpiSs */
469 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
470 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
471 BP_NOT_DEFINED, /* usGpioPhyReset */
472 0x01, /* numSwitchPorts */
473 BP_ENET_CONFIG_MDIO, /* usConfigType */
474 BP_ENET_NO_REVERSE_MII}, /* usReverseMii */
475 {BP_ENET_NO_PHY}}, /* ucPhyType */
476 {{BP_VOIP_NO_DSP}, /* ucDspType */
477 {BP_VOIP_NO_DSP}}, /* ucDspType */
478 BP_MEMORY_8MB_1_CHIP, /* usSdramSize */
479 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
480 BP_GPIO_11_AH, /* usGpioRj11InnerPair */
481 BP_GPIO_12_AH, /* usGpioRj11OuterPair */
482 BP_GPIO_13_AH, /* usGpioPressAndHoldReset */
483 BP_NOT_DEFINED, /* usGpioPcmciaReset */
484 BP_NOT_DEFINED, /* usGpioUartRts */
485 BP_NOT_DEFINED, /* usGpioUartCts */
486 BP_GPIO_8_AH, /* usGpioLedAdsl */
487 BP_NOT_DEFINED, /* usGpioLedAdslFail */
488 BP_NOT_DEFINED, /* usGpioLedWireless */
489 BP_NOT_DEFINED, /* usGpioLedUsb */
490 BP_NOT_DEFINED, /* usGpioLedHpna */
491 BP_GPIO_8_AH, /* usGpioLedWanData */
492 BP_GPIO_9_AH, /* usGpioLedPpp */
493 BP_NOT_DEFINED, /* usGpioLedPppFail */
494 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
495 BP_GPIO_10_AH, /* usGpioLedBlAlarm */
496 BP_GPIO_9_AH, /* usGpioLedBlResetCfg */
497 BP_GPIO_8_AH, /* usGpioLedBlStop */
498 BP_NOT_DEFINED, /* usExtIntrWireless */
499 BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */
500 BP_NOT_DEFINED, /* usExtIntrHpna */
501 BP_NOT_DEFINED, /* usCsHpna */
502 BP_NOT_DEFINED, /* usAntInUseWireless */
503 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
504 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
505 BP_NOT_DEFINED /* usGpioLedSesWireless */
508 static PBOARD_PARAMETERS g_BoardParms[] =
509 {&g_bcm96345r, &g_bcm96345gw2, &g_bcm96345gw, &g_bcm96335r, &g_bcm96345r0,
513 #if defined(_BCM96348_) || defined(CONFIG_BCM96348)
515 static BOARD_PARAMETERS g_bcm96348r =
517 "96348R-A", /* szBoardId */
518 {{BP_ENET_NO_PHY}, /* ucPhyType */
519 {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
520 0x00, /* ucPhyAddress */
521 BP_NOT_DEFINED, /* usGpioPhySpiSck */
522 BP_NOT_DEFINED, /* usGpioPhySpiSs */
523 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
524 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
525 BP_NOT_DEFINED, /* usGpioPhyReset */
526 0x04, /* numSwitchPorts */
527 BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */
528 BP_ENET_REVERSE_MII}}, /* usReverseMii */
529 {{BP_VOIP_NO_DSP}, /* ucDspType */
530 {BP_VOIP_NO_DSP}}, /* ucDspType */
531 BP_MEMORY_8MB_1_CHIP, /* usSdramSize */
532 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
533 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
534 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
535 BP_GPIO_33_AL, /* usGpioPressAndHoldReset */
536 BP_NOT_DEFINED, /* usGpioPcmciaReset */
537 BP_NOT_DEFINED, /* usGpioUartRts */
538 BP_NOT_DEFINED, /* usGpioUartCts */
539 BP_NOT_DEFINED, /* usGpioLedAdsl */
540 BP_GPIO_2_AL, /* usGpioLedAdslFail */
541 BP_NOT_DEFINED, /* usGpioLedWireless */
542 BP_GPIO_0_AL, /* usGpioLedUsb */
543 BP_NOT_DEFINED, /* usGpioLedHpna */
544 BP_GPIO_3_AL, /* usGpioLedWanData */
545 BP_GPIO_3_AL, /* usGpioLedPpp */
546 BP_GPIO_4_AL, /* usGpioLedPppFail */
547 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
548 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
549 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
550 BP_GPIO_1_AL, /* usGpioLedBlStop */
551 BP_NOT_DEFINED, /* usExtIntrWireless */
552 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
553 BP_NOT_DEFINED, /* usExtIntrHpna */
554 BP_NOT_DEFINED, /* usCsHpna */
555 BP_NOT_DEFINED, /* usAntInUseWireless */
556 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
557 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
558 BP_NOT_DEFINED /* usGpioLedSesWireless */
561 static BOARD_PARAMETERS g_bcm96348r_b =
563 "96348R-B", /* szBoardId */
564 {{BP_ENET_NO_PHY}, /* ucPhyType */
565 {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
566 0x00, /* ucPhyAddress */
567 BP_NOT_DEFINED, /* usGpioPhySpiSck */
568 BP_NOT_DEFINED, /* usGpioPhySpiSs */
569 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
570 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
571 BP_NOT_DEFINED, /* usGpioPhyReset */
572 0x04, /* numSwitchPorts */
573 BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */
574 BP_ENET_REVERSE_MII}}, /* usReverseMii */
575 {{BP_VOIP_NO_DSP}, /* ucDspType */
576 {BP_VOIP_NO_DSP}}, /* ucDspType */
577 BP_MEMORY_8MB_1_CHIP, /* usSdramSize */
578 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
579 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
580 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
581 BP_GPIO_33_AL, /* usGpioPressAndHoldReset */
582 BP_NOT_DEFINED, /* usGpioPcmciaReset */
583 BP_NOT_DEFINED, /* usGpioUartRts */
584 BP_NOT_DEFINED, /* usGpioUartCts */
585 BP_NOT_DEFINED, /* usGpioLedAdsl */
586 BP_GPIO_2_AL, /* usGpioLedAdslFail */
587 BP_NOT_DEFINED, /* usGpioLedWireless */
588 BP_GPIO_0_AL, /* usGpioLedUsb */
589 BP_NOT_DEFINED, /* usGpioLedHpna */
590 BP_GPIO_3_AL, /* usGpioLedWanData */
591 BP_GPIO_3_AL, /* usGpioLedPpp */
592 BP_GPIO_4_AL, /* usGpioLedPppFail */
593 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
594 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
595 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
596 BP_GPIO_1_AL, /* usGpioLedBlStop */
597 BP_NOT_DEFINED, /* usExtIntrWireless */
598 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
599 BP_NOT_DEFINED, /* usExtIntrHpna */
600 BP_NOT_DEFINED, /* usCsHpna */
601 BP_NOT_DEFINED, /* usAntInUseWireless */
602 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
603 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
604 BP_NOT_DEFINED /* usGpioLedSesWireless */
607 static BOARD_PARAMETERS g_bcm96348lv =
609 "96348LV", /* szBoardId */
610 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
611 0x01, /* ucPhyAddress */
612 BP_NOT_DEFINED, /* usGpioPhySpiSck */
613 BP_NOT_DEFINED, /* usGpioPhySpiSs */
614 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
615 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
616 BP_NOT_DEFINED, /* usGpioPhyReset */
617 0x01, /* numSwitchPorts */
618 BP_ENET_CONFIG_MDIO, /* usConfigType */
619 BP_NOT_DEFINED}, /* usReverseMii */
620 {BP_ENET_EXTERNAL_PHY, /* ucPhyType */
621 0x02, /* ucPhyAddress */
622 BP_NOT_DEFINED, /* usGpioPhySpiSck */
623 BP_NOT_DEFINED, /* usGpioPhySpiSs */
624 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
625 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
626 BP_GPIO_5_AL, /* usGpioPhyReset */
627 0x01, /* numSwitchPorts */
628 BP_ENET_CONFIG_MDIO, /* usConfigType */
629 BP_NOT_DEFINED}}, /* usReverseMii */
630 {{BP_VOIP_NO_DSP}, /* ucDspType */
631 {BP_VOIP_NO_DSP}}, /* ucDspType */
632 BP_MEMORY_16MB_2_CHIP, /* usSdramSize */
633 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
634 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
635 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
636 BP_GPIO_7_AH, /* usGpioPressAndHoldReset */
637 BP_NOT_DEFINED, /* usGpioPcmciaReset */
638 BP_NOT_DEFINED, /* usGpioUartRts */
639 BP_NOT_DEFINED, /* usGpioUartCts */
640 BP_NOT_DEFINED, /* usGpioLedAdsl */
641 BP_GPIO_2_AL, /* usGpioLedAdslFail */
642 BP_NOT_DEFINED, /* usGpioLedWireless */
643 BP_NOT_DEFINED, /* usGpioLedUsb */
644 BP_NOT_DEFINED, /* usGpioLedHpna */
645 BP_GPIO_3_AL, /* usGpioLedWanData */
646 BP_GPIO_3_AL, /* usGpioLedPpp */
647 BP_GPIO_4_AL, /* usGpioLedPppFail */
648 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
649 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
650 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
651 BP_GPIO_1_AL, /* usGpioLedBlStop */
652 BP_NOT_DEFINED, /* usExtIntrWireless */
653 BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */
654 BP_NOT_DEFINED, /* usExtIntrHpna */
655 BP_NOT_DEFINED, /* usCsHpna */
656 BP_NOT_DEFINED, /* usAntInUseWireless */
657 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
658 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
659 BP_NOT_DEFINED /* usGpioLedSesWireless */
662 static BOARD_PARAMETERS g_bcm96348gw =
664 "96348GW-A", /* szBoardId */
665 {{BP_ENET_NO_PHY}, /* ucPhyType */
666 {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
667 0x00, /* ucPhyAddress */
668 BP_NOT_DEFINED, /* usGpioPhySpiSck */
669 BP_NOT_DEFINED, /* usGpioPhySpiSs */
670 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
671 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
672 BP_NOT_DEFINED, /* usGpioPhyReset */
673 0x04, /* numSwitchPorts */
674 BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */
675 BP_ENET_REVERSE_MII}}, /* usReverseMii */
676 {{BP_VOIP_NO_DSP}, /* ucDspType */
677 {BP_VOIP_NO_DSP}}, /* ucDspType */
678 BP_MEMORY_16MB_2_CHIP, /* usSdramSize */
679 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
680 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
681 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
682 BP_GPIO_33_AL, /* usGpioPressAndHoldReset */
683 BP_NOT_DEFINED, /* usGpioPcmciaReset */
684 BP_NOT_DEFINED, /* usGpioUartRts */
685 BP_NOT_DEFINED, /* usGpioUartCts */
686 BP_NOT_DEFINED, /* usGpioLedAdsl */
687 BP_GPIO_2_AL, /* usGpioLedAdslFail */
688 BP_NOT_DEFINED, /* usGpioLedWireless */
689 BP_GPIO_0_AL, /* usGpioLedUsb */
690 BP_NOT_DEFINED, /* usGpioLedHpna */
691 BP_GPIO_3_AL, /* usGpioLedWanData */
692 BP_GPIO_3_AL, /* usGpioLedPpp */
693 BP_GPIO_4_AL, /* usGpioLedPppFail */
694 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
695 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
696 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
697 BP_GPIO_1_AL, /* usGpioLedBlStop */
698 BP_NOT_DEFINED, /* usExtIntrWireless */
699 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
700 BP_NOT_DEFINED, /* usExtIntrHpna */
701 BP_NOT_DEFINED, /* usCsHpna */
702 BP_WLAN_ANT_MAIN, /* usAntInUseWireless */
703 BP_GPIO_35_AH, /* usGpioSesBtnWireless */
704 BP_EXT_INTR_3, /* usExtIntrSesBtnWireless */
705 BP_NOT_DEFINED /* BP_GPIO_0_AL */ /* usGpioLedSesWireless */
708 static BOARD_PARAMETERS g_bcm96348gw_b =
710 "96348GW-B", /* szBoardId */
711 {{BP_ENET_NO_PHY}, /* ucPhyType */
712 {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
713 0x00, /* ucPhyAddress */
714 BP_NOT_DEFINED, /* usGpioPhySpiSck */
715 BP_NOT_DEFINED, /* usGpioPhySpiSs */
716 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
717 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
718 BP_NOT_DEFINED, /* usGpioPhyReset */
719 0x04, /* numSwitchPorts */
720 BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */
721 BP_ENET_REVERSE_MII}}, /* usReverseMii */
722 {{BP_VOIP_NO_DSP}, /* ucDspType */
723 {BP_VOIP_NO_DSP}}, /* ucDspType */
724 BP_MEMORY_16MB_2_CHIP, /* usSdramSize */
725 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
726 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
727 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
728 BP_GPIO_33_AL, /* usGpioPressAndHoldReset */
729 BP_NOT_DEFINED, /* usGpioPcmciaReset */
730 BP_NOT_DEFINED, /* usGpioUartRts */
731 BP_NOT_DEFINED, /* usGpioUartCts */
732 BP_NOT_DEFINED, /* usGpioLedAdsl */
733 BP_GPIO_2_AL, /* usGpioLedAdslFail */
734 BP_NOT_DEFINED, /* usGpioLedWireless */
735 BP_GPIO_0_AL, /* usGpioLedUsb */
736 BP_NOT_DEFINED, /* usGpioLedHpna */
737 BP_GPIO_3_AL, /* usGpioLedWanData */
738 BP_GPIO_3_AL, /* usGpioLedPpp */
739 BP_GPIO_4_AL, /* usGpioLedPppFail */
740 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
741 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
742 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
743 BP_GPIO_1_AL, /* usGpioLedBlStop */
744 BP_NOT_DEFINED, /* usExtIntrWireless */
745 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
746 BP_NOT_DEFINED, /* usExtIntrHpna */
747 BP_NOT_DEFINED, /* usCsHpna */
748 BP_WLAN_ANT_MAIN, /* usAntInUseWireless */
749 BP_GPIO_35_AH, /* usGpioSesBtnWireless */
750 BP_EXT_INTR_3, /* usExtIntrSesBtnWireless */
751 BP_NOT_DEFINED /* BP_GPIO_0_AL */ /* usGpioLedSesWireless */
754 static BOARD_PARAMETERS g_bcm96348w2 =
756 "96348W2", /* szBoardId */
757 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
758 0x01, /* ucPhyAddress */
759 BP_NOT_DEFINED, /* usGpioPhySpiSck */
760 BP_NOT_DEFINED, /* usGpioPhySpiSs */
761 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
762 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
763 BP_NOT_DEFINED, /* usGpioPhyReset */
764 0x01, /* numSwitchPorts */
765 BP_ENET_CONFIG_MDIO, /* usConfigType */
766 BP_NOT_DEFINED}, /* usReverseMii */
767 {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
768 0x00, /* ucPhyAddress */
769 BP_NOT_DEFINED, /* usGpioPhySpiSck */
770 BP_NOT_DEFINED, /* usGpioPhySpiSs */
771 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
772 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
773 BP_NOT_DEFINED, /* usGpioPhyReset */
774 0x03, /* numSwitchPorts */
775 BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */
776 BP_ENET_REVERSE_MII}}, /* usReverseMii */
777 {{BP_VOIP_DSP, /* ucDspType */
778 0x00, /* ucDspAddress */
779 BP_EXT_INTR_2, /* usExtIntrVoip */
780 BP_GPIO_6_AH, /* usGpioVoipReset */
781 BP_GPIO_34_AH, /* usGpioVoipIntr */
782 BP_NOT_DEFINED, /* usGpioLedVoip */
783 BP_CS_2}, /* usCsVoip */
784 {BP_VOIP_NO_DSP}}, /* ucDspType */
785 BP_MEMORY_16MB_2_CHIP, /* usSdramSize */
786 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
787 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
788 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
789 BP_GPIO_33_AL, /* usGpioPressAndHoldReset */
790 BP_NOT_DEFINED, /* usGpioPcmciaReset */
791 BP_NOT_DEFINED, /* usGpioUartRts */
792 BP_NOT_DEFINED, /* usGpioUartCts */
793 BP_NOT_DEFINED, /* usGpioLedAdsl */
794 BP_GPIO_2_AL, /* usGpioLedAdslFail */
795 BP_NOT_DEFINED, /* usGpioLedWireless */
796 BP_NOT_DEFINED, /* usGpioLedUsb */
797 BP_NOT_DEFINED, /* usGpioLedHpna */
798 BP_GPIO_3_AL, /* usGpioLedWanData */
799 BP_GPIO_3_AL, /* usGpioLedPpp */
800 BP_GPIO_4_AL, /* usGpioLedPppFail */
801 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
802 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
803 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
804 BP_GPIO_1_AL, /* usGpioLedBlStop */
805 BP_NOT_DEFINED, /* usExtIntrWireless */
806 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
807 BP_NOT_DEFINED, /* usExtIntrHpna */
808 BP_NOT_DEFINED, /* usCsHpna */
809 BP_WLAN_ANT_AUX, /* usAntInUseWireless */
810 BP_GPIO_35_AH, /* usGpioSesBtnWireless */
811 BP_EXT_INTR_3, /* usExtIntrSesBtnWireless */
812 BP_NOT_DEFINED /* BP_GPIO_0_AL */ /* usGpioLedSesWireless */
815 static BOARD_PARAMETERS g_bcm96348gw_10 =
817 "96348GW-10", /* szBoardId */
818 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
819 0x01, /* ucPhyAddress */
820 BP_NOT_DEFINED, /* usGpioPhySpiSck */
821 BP_NOT_DEFINED, /* usGpioPhySpiSs */
822 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
823 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
824 BP_NOT_DEFINED, /* usGpioPhyReset */
825 0x01, /* numSwitchPorts */
826 BP_ENET_CONFIG_MDIO, /* usConfigType */
827 BP_NOT_DEFINED}, /* usReverseMii */
828 {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
829 0x00, /* ucPhyAddress */
830 BP_NOT_DEFINED, /* usGpioPhySpiSck */
831 BP_NOT_DEFINED, /* usGpioPhySpiSs */
832 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
833 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
834 BP_NOT_DEFINED, /* usGpioPhyReset */
835 0x03, /* numSwitchPorts */
836 BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */
837 BP_ENET_REVERSE_MII}}, /* usReverseMii */
838 {{BP_VOIP_DSP, /* ucDspType */
839 0x00, /* ucDspAddress */
840 BP_EXT_INTR_2, /* usExtIntrVoip */
841 BP_GPIO_6_AH, /* usGpioVoipReset */
842 BP_GPIO_34_AH, /* usGpioVoipIntr */
843 BP_NOT_DEFINED, /* usGpioLedVoip */
844 BP_CS_2}, /* usCsVoip */
845 {BP_VOIP_NO_DSP}}, /* ucDspType */
846 BP_MEMORY_16MB_2_CHIP, /* usSdramSize */
847 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
848 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
849 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
850 BP_GPIO_33_AL, /* usGpioPressAndHoldReset */
851 BP_NOT_DEFINED, /* usGpioPcmciaReset */
852 BP_NOT_DEFINED, /* usGpioUartRts */
853 BP_NOT_DEFINED, /* usGpioUartCts */
854 BP_NOT_DEFINED, /* usGpioLedAdsl */
855 BP_GPIO_2_AL, /* usGpioLedAdslFail */
856 BP_NOT_DEFINED, /* usGpioLedWireless */
857 BP_NOT_DEFINED, /* usGpioLedUsb */
858 BP_NOT_DEFINED, /* usGpioLedHpna */
859 BP_GPIO_3_AL, /* usGpioLedWanData */
860 BP_GPIO_3_AL, /* usGpioLedPpp */
861 BP_GPIO_4_AL, /* usGpioLedPppFail */
862 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
863 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
864 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
865 BP_GPIO_1_AL, /* usGpioLedBlStop */
866 BP_NOT_DEFINED, /* usExtIntrWireless */
867 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
868 BP_NOT_DEFINED, /* usExtIntrHpna */
869 BP_NOT_DEFINED, /* usCsHpna */
870 BP_WLAN_ANT_MAIN, /* usAntInUseWireless */
871 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
872 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
873 BP_NOT_DEFINED /* usGpioLedSesWireless */
876 static BOARD_PARAMETERS g_bcm96348gw_11 =
878 "96348GW-11", /* szBoardId */
879 {{BP_ENET_NO_PHY}, /* ucPhyType */
880 {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
881 0x00, /* ucPhyAddress */
882 BP_NOT_DEFINED, /* usGpioPhySpiSck */
883 BP_NOT_DEFINED, /* usGpioPhySpiSs */
884 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
885 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
886 BP_NOT_DEFINED, /* usGpioPhyReset */
887 0x04, /* numSwitchPorts */
888 BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */
889 BP_ENET_REVERSE_MII}}, /* usReverseMii */
890 {{BP_VOIP_NO_DSP}, /* ucDspType */
891 {BP_VOIP_NO_DSP}}, /* ucDspType */
892 BP_MEMORY_16MB_2_CHIP, /* usSdramSize */
893 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
894 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
895 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
896 BP_GPIO_33_AL, /* usGpioPressAndHoldReset */
897 BP_NOT_DEFINED, /* usGpioPcmciaReset */
898 BP_NOT_DEFINED, /* usGpioUartRts */
899 BP_NOT_DEFINED, /* usGpioUartCts */
900 BP_NOT_DEFINED, /* usGpioLedAdsl */
901 BP_GPIO_2_AL, /* usGpioLedAdslFail */
902 BP_NOT_DEFINED, /* usGpioLedWireless */
903 BP_NOT_DEFINED, /* usGpioLedUsb */
904 BP_NOT_DEFINED, /* usGpioLedHpna */
905 BP_GPIO_3_AL, /* usGpioLedWanData */
906 BP_GPIO_3_AL, /* usGpioLedPpp */
907 BP_GPIO_4_AL, /* usGpioLedPppFail */
908 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
909 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
910 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
911 BP_GPIO_1_AL, /* usGpioLedBlStop */
912 BP_NOT_DEFINED, /* usExtIntrWireless */
913 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
914 BP_NOT_DEFINED, /* usExtIntrHpna */
915 BP_NOT_DEFINED, /* usCsHpna */
916 BP_NOT_DEFINED, /* usAntInUseWireless */
917 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
918 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
919 BP_NOT_DEFINED /* usGpioLedSesWireless */
922 static BOARD_PARAMETERS g_bcm96348sv =
924 "96348SV", /* szBoardId */
925 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
926 0x01, /* ucPhyAddress */
927 BP_NOT_DEFINED, /* usGpioPhySpiSck */
928 BP_NOT_DEFINED, /* usGpioPhySpiSs */
929 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
930 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
931 BP_NOT_DEFINED, /* usGpioPhyReset */
932 0x01, /* numSwitchPorts */
933 BP_ENET_CONFIG_MDIO, /* usConfigType */
934 BP_NOT_DEFINED}, /* usReverseMii */
935 {BP_ENET_EXTERNAL_PHY, /* ucPhyType */
936 0x1f, /* ucPhyAddress */
937 BP_NOT_DEFINED, /* usGpioPhySpiSck */
938 BP_NOT_DEFINED, /* usGpioPhySpiSs */
939 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
940 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
941 BP_NOT_DEFINED, /* usGpioPhyReset */
942 0x01, /* numSwitchPorts */
943 BP_ENET_CONFIG_MDIO, /* usConfigType */
944 BP_NOT_DEFINED}}, /* usReverseMii */
945 {{BP_VOIP_NO_DSP}, /* ucDspType */
946 {BP_VOIP_NO_DSP}}, /* ucDspType */
947 BP_MEMORY_32MB_2_CHIP, /* usSdramSize */
948 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
949 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
950 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
951 BP_NOT_DEFINED, /* usGpioPressAndHoldReset */
952 BP_NOT_DEFINED, /* usGpioPcmciaReset */
953 BP_NOT_DEFINED, /* usGpioUartRts */
954 BP_NOT_DEFINED, /* usGpioUartCts */
955 BP_NOT_DEFINED, /* usGpioLedAdsl */
956 BP_NOT_DEFINED, /* usGpioLedAdslFail */
957 BP_NOT_DEFINED, /* usGpioLedWireless */
958 BP_NOT_DEFINED, /* usGpioLedUsb */
959 BP_NOT_DEFINED, /* usGpioLedHpna */
960 BP_NOT_DEFINED, /* usGpioLedWanData */
961 BP_NOT_DEFINED, /* usGpioLedPpp */
962 BP_NOT_DEFINED, /* usGpioLedPppFail */
963 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
964 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
965 BP_NOT_DEFINED, /* usGpioLedBlResetCfg */
966 BP_NOT_DEFINED, /* usGpioLedBlStop */
967 BP_NOT_DEFINED, /* usExtIntrWireless */
968 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
969 BP_NOT_DEFINED, /* usExtIntrHpna */
970 BP_NOT_DEFINED, /* usCsHpna */
971 BP_NOT_DEFINED, /* usAntInUseWireless */
972 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
973 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
974 BP_NOT_DEFINED /* usGpioLedSesWireless */
979 static BOARD_PARAMETERS g_bcm96348gw_dualDsp =
981 "96348GW-DualDSP", /* szBoardId */
982 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
983 0x01, /* ucPhyAddress */
984 BP_NOT_DEFINED, /* usGpioPhySpiSck */
985 BP_NOT_DEFINED, /* usGpioPhySpiSs */
986 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
987 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
988 BP_NOT_DEFINED, /* usGpioPhyReset */
989 0x01, /* numSwitchPorts */
990 BP_ENET_CONFIG_MDIO, /* usConfigType */
991 BP_NOT_DEFINED}, /* usReverseMii */
992 {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
993 0x00, /* ucPhyAddress */
994 BP_NOT_DEFINED, /* usGpioPhySpiSck */
995 BP_NOT_DEFINED, /* usGpioPhySpiSs */
996 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
997 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
998 BP_NOT_DEFINED, /* usGpioPhyReset */
999 0x03, /* numSwitchPorts */
1000 BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */
1001 BP_ENET_REVERSE_MII}}, /* usReverseMii */
1002 {{BP_VOIP_DSP, /* ucDspType */
1003 0x00, /* ucDspAddress */
1004 BP_EXT_INTR_2, /* usExtIntrVoip */
1005 BP_UNEQUIPPED, /* usGpioVoipReset */
1006 BP_GPIO_34_AH, /* usGpioVoipIntr */
1007 BP_NOT_DEFINED, /* usGpioLedVoip */
1008 BP_CS_2}, /* usCsVoip */
1009 {BP_VOIP_DSP, /* ucDspType */
1010 0x01, /* ucDspAddress */
1011 BP_EXT_INTR_3, /* usExtIntrVoip */
1012 BP_UNEQUIPPED , /* usGpioVoipReset */
1013 BP_GPIO_35_AH, /* usGpioVoipIntr */
1014 BP_NOT_DEFINED, /* usGpioLedVoip */
1015 BP_CS_3}}, /* usCsVoip */
1016 BP_MEMORY_16MB_2_CHIP, /* usSdramSize */
1017 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
1018 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
1019 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
1020 BP_GPIO_33_AL, /* usGpioPressAndHoldReset */
1021 BP_NOT_DEFINED, /* usGpioPcmciaReset */
1022 BP_NOT_DEFINED, /* usGpioUartRts */
1023 BP_NOT_DEFINED, /* usGpioUartCts */
1024 BP_NOT_DEFINED, /* usGpioLedAdsl */
1025 BP_GPIO_2_AL, /* usGpioLedAdslFail */
1026 BP_NOT_DEFINED, /* usGpioLedWireless */
1027 BP_NOT_DEFINED, /* usGpioLedUsb */
1028 BP_NOT_DEFINED, /* usGpioLedHpna */
1029 BP_GPIO_3_AL, /* usGpioLedWanData */
1030 BP_GPIO_3_AL, /* usGpioLedPpp */
1031 BP_GPIO_4_AL, /* usGpioLedPppFail */
1032 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
1033 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
1034 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
1035 BP_GPIO_1_AL, /* usGpioLedBlStop */
1036 BP_NOT_DEFINED, /* usExtIntrWireless */
1037 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
1038 BP_NOT_DEFINED, /* usExtIntrHpna */
1039 BP_NOT_DEFINED, /* usCsHpna */
1040 BP_WLAN_ANT_MAIN, /* usAntInUseWireless */
1041 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
1042 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
1043 BP_NOT_DEFINED /* usGpioLedSesWireless */
1047 static BOARD_PARAMETERS g_bcmCustom_01 =
1049 "BCMCUST_01", /* szBoardId */
1050 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
1051 0x01, /* ucPhyAddress */
1052 BP_NOT_DEFINED, /* usGpioPhySpiSck */
1053 BP_NOT_DEFINED, /* usGpioPhySpiSs */
1054 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
1055 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
1056 BP_NOT_DEFINED, /* usGpioPhyReset */
1057 0x01, /* numSwitchPorts */
1058 BP_ENET_CONFIG_MDIO, /* usConfigType */
1059 BP_NOT_DEFINED}, /* usReverseMii */
1060 {BP_ENET_NO_PHY, /* ucPhyType */
1061 0x00, /* ucPhyAddress */
1062 BP_NOT_DEFINED, /* usGpioPhySpiSck */
1063 BP_NOT_DEFINED, /* usGpioPhySpiSs */
1064 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
1065 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
1066 BP_NOT_DEFINED, /* usGpioPhyReset */
1067 0x01, /* numSwitchPorts */
1068 BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */
1069 BP_ENET_REVERSE_MII}}, /* usReverseMii */
1070 {{BP_VOIP_DSP, /* ucDspType */
1071 0x00, /* ucDspAddress */
1072 BP_EXT_INTR_2, /* usExtIntrVoip */
1073 BP_GPIO_36_AH, /* usGpioVoipReset */
1074 BP_GPIO_34_AL, /* usGpioVoipIntr */
1075 BP_NOT_DEFINED, /* usGpioLedVoip */
1076 BP_CS_2}, /* usCsVoip */
1077 {BP_VOIP_NO_DSP}}, /* ucDspType */
1078 BP_MEMORY_16MB_2_CHIP, /* usSdramSize */
1079 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
1080 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
1081 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
1082 BP_GPIO_33_AL, /* usGpioPressAndHoldReset */
1083 BP_NOT_DEFINED, /* usGpioPcmciaReset */
1084 BP_NOT_DEFINED, /* usGpioUartRts */
1085 BP_NOT_DEFINED, /* usGpioUartCts */
1086 BP_NOT_DEFINED, /* usGpioLedAdsl */
1087 BP_GPIO_2_AL, /* usGpioLedAdslFail */
1088 BP_NOT_DEFINED, /* usGpioLedWireless */
1089 BP_NOT_DEFINED, /* usGpioLedUsb */
1090 BP_NOT_DEFINED, /* usGpioLedHpna */
1091 BP_GPIO_3_AL, /* usGpioLedWanData */
1092 BP_GPIO_3_AL, /* usGpioLedPpp */
1093 BP_GPIO_4_AL, /* usGpioLedPppFail */
1094 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
1095 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
1096 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
1097 BP_GPIO_1_AL, /* usGpioLedBlStop */
1098 BP_NOT_DEFINED, /* usExtIntrWireless */
1099 BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */
1100 BP_NOT_DEFINED, /* usExtIntrHpna */
1101 BP_NOT_DEFINED, /* usCsHpna */
1102 BP_NOT_DEFINED, /* usAntInUseWireless */
1103 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
1104 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
1105 BP_NOT_DEFINED /* usGpioLedSesWireless */
1109 static PBOARD_PARAMETERS g_BoardParms[] =
1110 {&g_bcm96348r, &g_bcm96348r_b, &g_bcm96348lv, &g_bcm96348gw, &g_bcm96348gw_b,
1111 &g_bcm96348w2, &g_bcm96348gw_10, &g_bcm96348gw_11, &g_bcm96348sv,
1112 /* &g_bcm96348gw_dualDsp, &g_bcmCustom_01, */ 0};
1115 static PBOARD_PARAMETERS g_pCurrentBp = 0;
1117 /**************************************************************************
1120 * Description: String compare for this file so it does not depend on an OS.
1121 * (Linux kernel and CFE share this source file.)
1123 * Parameters : [IN] dest - destination string
1124 * [IN] src - source string
1126 * Returns : -1 - dest < src, 1 - dest > src, 0 dest == src
1127 ***************************************************************************/
1128 static int bpstrcmp(const char *dest,const char *src);
1129 static int bpstrcmp(const char *dest,const char *src)
1131 while (*src && *dest)
1133 if (*dest < *src) return -1;
1134 if (*dest > *src) return 1;
1139 if (*dest && !*src) return 1;
1140 if (!*dest && *src) return -1;
1144 /**************************************************************************
1145 * Name : BpGetVoipDspConfig
1147 * Description: Gets the DSP configuration from the board parameter
1148 * structure for a given DSP index.
1150 * Parameters : [IN] dspNum - DSP index (number)
1152 * Returns : Pointer to DSP configuration block if found/valid, NULL
1154 ***************************************************************************/
1155 VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum );
1156 VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum )
1158 VOIP_DSP_INFO *pDspConfig = 0;
1163 for( i = 0 ; i < BP_MAX_VOIP_DSP ; i++ )
1165 if( g_pCurrentBp->VoIPDspInfo[i].ucDspType != BP_VOIP_NO_DSP &&
1166 g_pCurrentBp->VoIPDspInfo[i].ucDspAddress == dspNum )
1168 pDspConfig = &g_pCurrentBp->VoIPDspInfo[i];
1178 /**************************************************************************
1179 * Name : BpSetBoardId
1181 * Description: This function find the BOARD_PARAMETERS structure for the
1182 * specified board id string and assigns it to a global, static
1185 * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM.
1187 * Returns : BP_SUCCESS - Success, value is returned.
1188 * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not
1189 * have a board parameters configuration record.
1190 ***************************************************************************/
1191 int BpSetBoardId( char *pszBoardId )
1193 int nRet = BP_BOARD_ID_NOT_FOUND;
1194 PBOARD_PARAMETERS *ppBp;
1196 for( ppBp = g_BoardParms; *ppBp; ppBp++ )
1198 if( !bpstrcmp((*ppBp)->szBoardId, pszBoardId) )
1200 g_pCurrentBp = *ppBp;
1207 } /* BpSetBoardId */
1209 /**************************************************************************
1210 * Name : BpGetBoardIds
1212 * Description: This function returns all of the supported board id strings.
1214 * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id
1215 * strings are returned in. Each id starts at BP_BOARD_ID_LEN
1217 * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that
1218 * were allocated in pszBoardIds.
1220 * Returns : Number of board id strings returned.
1221 ***************************************************************************/
1222 int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize )
1224 PBOARD_PARAMETERS *ppBp;
1229 for( i = 0, ppBp = g_BoardParms; *ppBp && nBoardIdsSize;
1230 i++, ppBp++, nBoardIdsSize--, pszBoardIds += BP_BOARD_ID_LEN )
1233 src = (*ppBp)->szBoardId;
1240 } /* BpGetBoardIds */
1242 /**************************************************************************
1243 * Name : BpGetEthernetMacInfo
1245 * Description: This function returns all of the supported board id strings.
1247 * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO
1249 * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that
1250 * are pointed to by pEnetInfos.
1252 * Returns : BP_SUCCESS - Success, value is returned.
1253 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1254 ***************************************************************************/
1255 int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos )
1261 for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ )
1263 if( i < BP_MAX_ENET_MACS )
1265 unsigned char *src = (unsigned char *)
1266 &g_pCurrentBp->EnetMacInfos[i];
1267 unsigned char *dest = (unsigned char *) pEnetInfos;
1268 int len = sizeof(ETHERNET_MAC_INFO);
1273 pEnetInfos->ucPhyType = BP_ENET_NO_PHY;
1280 for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ )
1281 pEnetInfos->ucPhyType = BP_ENET_NO_PHY;
1283 nRet = BP_BOARD_ID_NOT_SET;
1287 } /* BpGetEthernetMacInfo */
1289 /**************************************************************************
1290 * Name : BpGetSdramSize
1292 * Description: This function returns a constant that describees the board's
1293 * SDRAM type and size.
1295 * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size
1298 * Returns : BP_SUCCESS - Success, value is returned.
1299 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1300 ***************************************************************************/
1301 int BpGetSdramSize( unsigned long *pulSdramSize )
1307 *pulSdramSize = g_pCurrentBp->usSdramSize;
1312 *pulSdramSize = BP_NOT_DEFINED;
1313 nRet = BP_BOARD_ID_NOT_SET;
1317 } /* BpGetSdramSize */
1319 /**************************************************************************
1320 * Name : BpGetPsiSize
1322 * Description: This function returns the persistent storage size in K bytes.
1324 * Parameters : [OUT] pulPsiSize - Address of short word that the persistent
1325 * storage size is returned in.
1327 * Returns : BP_SUCCESS - Success, value is returned.
1328 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1329 ***************************************************************************/
1330 int BpGetPsiSize( unsigned long *pulPsiSize )
1336 *pulPsiSize = g_pCurrentBp->usPsiSize;
1341 *pulPsiSize = BP_NOT_DEFINED;
1342 nRet = BP_BOARD_ID_NOT_SET;
1346 } /* BpGetPsiSize */
1348 /**************************************************************************
1349 * Name : BpGetRj11InnerOuterPairGpios
1351 * Description: This function returns the GPIO pin assignments for changing
1352 * between the RJ11 inner pair and RJ11 outer pair.
1354 * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair
1355 * GPIO pin is returned in.
1356 * [OUT] pusOuter - Address of short word that the RJ11 outer pair
1357 * GPIO pin is returned in.
1359 * Returns : BP_SUCCESS - Success, values are returned.
1360 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1361 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1363 ***************************************************************************/
1364 int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner,
1365 unsigned short *pusOuter )
1371 *pusInner = g_pCurrentBp->usGpioRj11InnerPair;
1372 *pusOuter = g_pCurrentBp->usGpioRj11OuterPair;
1374 if( g_pCurrentBp->usGpioRj11InnerPair != BP_NOT_DEFINED &&
1375 g_pCurrentBp->usGpioRj11OuterPair != BP_NOT_DEFINED )
1381 nRet = BP_VALUE_NOT_DEFINED;
1386 *pusInner = *pusOuter = BP_NOT_DEFINED;
1387 nRet = BP_BOARD_ID_NOT_SET;
1391 } /* BpGetRj11InnerOuterPairGpios */
1393 /**************************************************************************
1394 * Name : BpGetPressAndHoldResetGpio
1396 * Description: This function returns the GPIO pin assignment for the press
1397 * and hold reset button.
1399 * Parameters : [OUT] pusValue - Address of short word that the press and hold
1400 * reset button GPIO pin is returned in.
1402 * Returns : BP_SUCCESS - Success, value is returned.
1403 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1404 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1406 ***************************************************************************/
1407 int BpGetPressAndHoldResetGpio( unsigned short *pusValue )
1413 *pusValue = g_pCurrentBp->usGpioPressAndHoldReset;
1415 if( g_pCurrentBp->usGpioPressAndHoldReset != BP_NOT_DEFINED )
1421 nRet = BP_VALUE_NOT_DEFINED;
1426 *pusValue = BP_NOT_DEFINED;
1427 nRet = BP_BOARD_ID_NOT_SET;
1431 } /* BpGetPressAndHoldResetGpio */
1433 /**************************************************************************
1434 * Name : BpGetVoipResetGpio
1436 * Description: This function returns the GPIO pin assignment for the VOIP
1439 * Parameters : [OUT] pusValue - Address of short word that the VOIP reset
1440 * GPIO pin is returned in.
1441 * [IN] dspNum - Address of the DSP to query.
1443 * Returns : BP_SUCCESS - Success, value is returned.
1444 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1445 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1447 ***************************************************************************/
1448 int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue )
1454 VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum );
1458 *pusValue = pDspInfo->usGpioVoipReset;
1460 if( *pusValue != BP_NOT_DEFINED ||
1461 *pusValue == BP_UNEQUIPPED )
1467 nRet = BP_VALUE_NOT_DEFINED;
1472 *pusValue = BP_NOT_DEFINED;
1473 nRet = BP_BOARD_ID_NOT_FOUND;
1478 *pusValue = BP_NOT_DEFINED;
1479 nRet = BP_BOARD_ID_NOT_SET;
1483 } /* BpGetVoipResetGpio */
1485 /**************************************************************************
1486 * Name : BpGetVoipIntrGpio
1488 * Description: This function returns the GPIO pin assignment for VoIP interrupt.
1490 * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt
1491 * GPIO pin is returned in.
1492 * [IN] dspNum - Address of the DSP to query.
1494 * Returns : BP_SUCCESS - Success, value is returned.
1495 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1496 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1498 ***************************************************************************/
1499 int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue )
1505 VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum );
1509 *pusValue = pDspInfo->usGpioVoipIntr;
1511 if( *pusValue != BP_NOT_DEFINED )
1517 nRet = BP_VALUE_NOT_DEFINED;
1522 *pusValue = BP_NOT_DEFINED;
1523 nRet = BP_BOARD_ID_NOT_FOUND;
1528 *pusValue = BP_NOT_DEFINED;
1529 nRet = BP_BOARD_ID_NOT_SET;
1533 } /* BpGetVoipIntrGpio */
1535 /**************************************************************************
1536 * Name : BpGetPcmciaResetGpio
1538 * Description: This function returns the GPIO pin assignment for the PCMCIA
1541 * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset
1542 * GPIO pin is returned in.
1544 * Returns : BP_SUCCESS - Success, value is returned.
1545 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1546 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1548 ***************************************************************************/
1549 int BpGetPcmciaResetGpio( unsigned short *pusValue )
1555 *pusValue = g_pCurrentBp->usGpioPcmciaReset;
1557 if( g_pCurrentBp->usGpioPcmciaReset != BP_NOT_DEFINED )
1563 nRet = BP_VALUE_NOT_DEFINED;
1568 *pusValue = BP_NOT_DEFINED;
1569 nRet = BP_BOARD_ID_NOT_SET;
1573 } /* BpGetPcmciaResetGpio */
1575 /**************************************************************************
1576 * Name : BpGetUartRtsCtsGpios
1578 * Description: This function returns the GPIO pin assignments for RTS and CTS
1581 * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO
1582 * pin is returned in.
1583 * [OUT] pusCts - Address of short word that the UART CTS GPIO
1584 * pin is returned in.
1586 * Returns : BP_SUCCESS - Success, values are returned.
1587 * BP_BOARD_ID_NOT_SET - Error, board id input string does not
1588 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1590 ***************************************************************************/
1591 int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts )
1597 *pusRts = g_pCurrentBp->usGpioUartRts;
1598 *pusCts = g_pCurrentBp->usGpioUartCts;
1600 if( g_pCurrentBp->usGpioUartRts != BP_NOT_DEFINED &&
1601 g_pCurrentBp->usGpioUartCts != BP_NOT_DEFINED )
1607 nRet = BP_VALUE_NOT_DEFINED;
1612 *pusRts = *pusCts = BP_NOT_DEFINED;
1613 nRet = BP_BOARD_ID_NOT_SET;
1617 } /* BpGetUartRtsCtsGpios */
1619 /**************************************************************************
1620 * Name : BpGetAdslLedGpio
1622 * Description: This function returns the GPIO pin assignment for the ADSL
1625 * Parameters : [OUT] pusValue - Address of short word that the ADSL LED
1626 * GPIO pin is returned in.
1628 * Returns : BP_SUCCESS - Success, value is returned.
1629 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1630 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1632 ***************************************************************************/
1633 int BpGetAdslLedGpio( unsigned short *pusValue )
1639 *pusValue = g_pCurrentBp->usGpioLedAdsl;
1641 if( g_pCurrentBp->usGpioLedAdsl != BP_NOT_DEFINED )
1647 nRet = BP_VALUE_NOT_DEFINED;
1652 *pusValue = BP_NOT_DEFINED;
1653 nRet = BP_BOARD_ID_NOT_SET;
1657 } /* BpGetAdslLedGpio */
1659 /**************************************************************************
1660 * Name : BpGetAdslFailLedGpio
1662 * Description: This function returns the GPIO pin assignment for the ADSL
1663 * LED that is used when there is a DSL connection failure.
1665 * Parameters : [OUT] pusValue - Address of short word that the ADSL LED
1666 * GPIO pin is returned in.
1668 * Returns : BP_SUCCESS - Success, value is returned.
1669 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1670 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1672 ***************************************************************************/
1673 int BpGetAdslFailLedGpio( unsigned short *pusValue )
1679 *pusValue = g_pCurrentBp->usGpioLedAdslFail;
1681 if( g_pCurrentBp->usGpioLedAdslFail != BP_NOT_DEFINED )
1687 nRet = BP_VALUE_NOT_DEFINED;
1692 *pusValue = BP_NOT_DEFINED;
1693 nRet = BP_BOARD_ID_NOT_SET;
1697 } /* BpGetAdslFailLedGpio */
1699 /**************************************************************************
1700 * Name : BpGetWirelessLedGpio
1702 * Description: This function returns the GPIO pin assignment for the Wireless
1705 * Parameters : [OUT] pusValue - Address of short word that the Wireless LED
1706 * GPIO pin is returned in.
1708 * Returns : BP_SUCCESS - Success, value is returned.
1709 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1710 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1712 ***************************************************************************/
1713 int BpGetWirelessLedGpio( unsigned short *pusValue )
1719 *pusValue = g_pCurrentBp->usGpioLedWireless;
1721 if( g_pCurrentBp->usGpioLedWireless != BP_NOT_DEFINED )
1727 nRet = BP_VALUE_NOT_DEFINED;
1732 *pusValue = BP_NOT_DEFINED;
1733 nRet = BP_BOARD_ID_NOT_SET;
1737 } /* BpGetWirelessLedGpio */
1739 /**************************************************************************
1740 * Name : BpGetWirelessAntInUse
1742 * Description: This function returns the antennas in use for wireless
1744 * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna
1747 * Returns : BP_SUCCESS - Success, value is returned.
1748 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1749 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1751 ***************************************************************************/
1752 int BpGetWirelessAntInUse( unsigned short *pusValue )
1758 *pusValue = g_pCurrentBp->usAntInUseWireless;
1760 if( g_pCurrentBp->usAntInUseWireless != BP_NOT_DEFINED )
1766 nRet = BP_VALUE_NOT_DEFINED;
1771 *pusValue = BP_NOT_DEFINED;
1772 nRet = BP_BOARD_ID_NOT_SET;
1776 } /* BpGetWirelessAntInUse */
1778 /**************************************************************************
1779 * Name : BpGetWirelessSesBtnGpio
1781 * Description: This function returns the GPIO pin assignment for the Wireless
1784 * Parameters : [OUT] pusValue - Address of short word that the Wireless LED
1785 * GPIO pin is returned in.
1787 * Returns : BP_SUCCESS - Success, value is returned.
1788 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1789 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1791 ***************************************************************************/
1792 int BpGetWirelessSesBtnGpio( unsigned short *pusValue )
1798 *pusValue = g_pCurrentBp->usGpioSesBtnWireless;
1800 if( g_pCurrentBp->usGpioSesBtnWireless != BP_NOT_DEFINED )
1806 nRet = BP_VALUE_NOT_DEFINED;
1811 *pusValue = BP_NOT_DEFINED;
1812 nRet = BP_BOARD_ID_NOT_SET;
1816 } /* BpGetWirelessSesBtnGpio */
1818 /**************************************************************************
1819 * Name : BpGetWirelessSesExtIntr
1821 * Description: This function returns the external interrupt number for the
1822 * Wireless Ses Button.
1824 * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses
1825 * external interrup is returned in.
1827 * Returns : BP_SUCCESS - Success, value is returned.
1828 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1829 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1831 ***************************************************************************/
1832 int BpGetWirelessSesExtIntr( unsigned short *pusValue )
1838 *pusValue = g_pCurrentBp->usExtIntrSesBtnWireless;
1840 if( g_pCurrentBp->usExtIntrSesBtnWireless != BP_NOT_DEFINED )
1846 nRet = BP_VALUE_NOT_DEFINED;
1851 *pusValue = BP_NOT_DEFINED;
1852 nRet = BP_BOARD_ID_NOT_SET;
1857 } /* BpGetWirelessSesExtIntr */
1859 /**************************************************************************
1860 * Name : BpGetWirelessSesLedGpio
1862 * Description: This function returns the GPIO pin assignment for the Wireless
1865 * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses
1866 * Led GPIO pin is returned in.
1868 * Returns : BP_SUCCESS - Success, value is returned.
1869 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1870 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1872 ***************************************************************************/
1873 int BpGetWirelessSesLedGpio( unsigned short *pusValue )
1879 *pusValue = g_pCurrentBp->usGpioLedSesWireless;
1881 if( g_pCurrentBp->usGpioLedSesWireless != BP_NOT_DEFINED )
1887 nRet = BP_VALUE_NOT_DEFINED;
1892 *pusValue = BP_NOT_DEFINED;
1893 nRet = BP_BOARD_ID_NOT_SET;
1898 } /* BpGetWirelessSesLedGpio */
1900 /**************************************************************************
1901 * Name : BpGetUsbLedGpio
1903 * Description: This function returns the GPIO pin assignment for the USB
1906 * Parameters : [OUT] pusValue - Address of short word that the USB LED
1907 * GPIO pin is returned in.
1909 * Returns : BP_SUCCESS - Success, value is returned.
1910 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1911 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1913 ***************************************************************************/
1914 int BpGetUsbLedGpio( unsigned short *pusValue )
1920 *pusValue = g_pCurrentBp->usGpioLedUsb;
1922 if( g_pCurrentBp->usGpioLedUsb != BP_NOT_DEFINED )
1928 nRet = BP_VALUE_NOT_DEFINED;
1933 *pusValue = BP_NOT_DEFINED;
1934 nRet = BP_BOARD_ID_NOT_SET;
1938 } /* BpGetUsbLedGpio */
1940 /**************************************************************************
1941 * Name : BpGetHpnaLedGpio
1943 * Description: This function returns the GPIO pin assignment for the HPNA
1946 * Parameters : [OUT] pusValue - Address of short word that the HPNA LED
1947 * GPIO pin is returned in.
1949 * Returns : BP_SUCCESS - Success, value is returned.
1950 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1951 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1953 ***************************************************************************/
1954 int BpGetHpnaLedGpio( unsigned short *pusValue )
1960 *pusValue = g_pCurrentBp->usGpioLedHpna;
1962 if( g_pCurrentBp->usGpioLedHpna != BP_NOT_DEFINED )
1968 nRet = BP_VALUE_NOT_DEFINED;
1973 *pusValue = BP_NOT_DEFINED;
1974 nRet = BP_BOARD_ID_NOT_SET;
1978 } /* BpGetHpnaLedGpio */
1980 /**************************************************************************
1981 * Name : BpGetWanDataLedGpio
1983 * Description: This function returns the GPIO pin assignment for the WAN Data
1986 * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED
1987 * GPIO pin is returned in.
1989 * Returns : BP_SUCCESS - Success, value is returned.
1990 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1991 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1993 ***************************************************************************/
1994 int BpGetWanDataLedGpio( unsigned short *pusValue )
2000 *pusValue = g_pCurrentBp->usGpioLedWanData;
2002 if( g_pCurrentBp->usGpioLedWanData != BP_NOT_DEFINED )
2008 nRet = BP_VALUE_NOT_DEFINED;
2013 *pusValue = BP_NOT_DEFINED;
2014 nRet = BP_BOARD_ID_NOT_SET;
2018 } /* BpGetWanDataLedGpio */
2020 /**************************************************************************
2021 * Name : BpGetPppLedGpio
2023 * Description: This function returns the GPIO pin assignment for the PPP
2026 * Parameters : [OUT] pusValue - Address of short word that the PPP LED
2027 * GPIO pin is returned in.
2029 * Returns : BP_SUCCESS - Success, value is returned.
2030 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2031 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2033 ***************************************************************************/
2034 int BpGetPppLedGpio( unsigned short *pusValue )
2040 *pusValue = g_pCurrentBp->usGpioLedPpp;
2042 if( g_pCurrentBp->usGpioLedPpp != BP_NOT_DEFINED )
2048 nRet = BP_VALUE_NOT_DEFINED;
2053 *pusValue = BP_NOT_DEFINED;
2054 nRet = BP_BOARD_ID_NOT_SET;
2058 } /* BpGetPppLedGpio */
2060 /**************************************************************************
2061 * Name : BpGetPppFailLedGpio
2063 * Description: This function returns the GPIO pin assignment for the PPP
2064 * LED that is used when there is a PPP connection failure.
2066 * Parameters : [OUT] pusValue - Address of short word that the PPP LED
2067 * GPIO pin is returned in.
2069 * Returns : BP_SUCCESS - Success, value is returned.
2070 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2071 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2073 ***************************************************************************/
2074 int BpGetPppFailLedGpio( unsigned short *pusValue )
2080 *pusValue = g_pCurrentBp->usGpioLedPppFail;
2082 if( g_pCurrentBp->usGpioLedPppFail != BP_NOT_DEFINED )
2088 nRet = BP_VALUE_NOT_DEFINED;
2093 *pusValue = BP_NOT_DEFINED;
2094 nRet = BP_BOARD_ID_NOT_SET;
2098 } /* BpGetPppFailLedGpio */
2100 /**************************************************************************
2101 * Name : BpGetBootloaderPowerOnLedGpio
2103 * Description: This function returns the GPIO pin assignment for the power
2104 * on LED that is set by the bootloader.
2106 * Parameters : [OUT] pusValue - Address of short word that the alarm LED
2107 * GPIO pin is returned in.
2109 * Returns : BP_SUCCESS - Success, value is returned.
2110 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2111 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2113 ***************************************************************************/
2114 int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue )
2120 *pusValue = g_pCurrentBp->usGpioLedBlPowerOn;
2122 if( g_pCurrentBp->usGpioLedBlPowerOn != BP_NOT_DEFINED )
2128 nRet = BP_VALUE_NOT_DEFINED;
2133 *pusValue = BP_NOT_DEFINED;
2134 nRet = BP_BOARD_ID_NOT_SET;
2138 } /* BpGetBootloaderPowerOn */
2140 /**************************************************************************
2141 * Name : BpGetBootloaderAlarmLedGpio
2143 * Description: This function returns the GPIO pin assignment for the alarm
2144 * LED that is set by the bootloader.
2146 * Parameters : [OUT] pusValue - Address of short word that the alarm LED
2147 * GPIO pin is returned in.
2149 * Returns : BP_SUCCESS - Success, value is returned.
2150 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2151 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2153 ***************************************************************************/
2154 int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue )
2160 *pusValue = g_pCurrentBp->usGpioLedBlAlarm;
2162 if( g_pCurrentBp->usGpioLedBlAlarm != BP_NOT_DEFINED )
2168 nRet = BP_VALUE_NOT_DEFINED;
2173 *pusValue = BP_NOT_DEFINED;
2174 nRet = BP_BOARD_ID_NOT_SET;
2178 } /* BpGetBootloaderAlarmLedGpio */
2180 /**************************************************************************
2181 * Name : BpGetBootloaderResetCfgLedGpio
2183 * Description: This function returns the GPIO pin assignment for the reset
2184 * configuration LED that is set by the bootloader.
2186 * Parameters : [OUT] pusValue - Address of short word that the reset
2187 * configuration LED GPIO pin is returned in.
2189 * Returns : BP_SUCCESS - Success, value is returned.
2190 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2191 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2193 ***************************************************************************/
2194 int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue )
2200 *pusValue = g_pCurrentBp->usGpioLedBlResetCfg;
2202 if( g_pCurrentBp->usGpioLedBlResetCfg != BP_NOT_DEFINED )
2208 nRet = BP_VALUE_NOT_DEFINED;
2213 *pusValue = BP_NOT_DEFINED;
2214 nRet = BP_BOARD_ID_NOT_SET;
2218 } /* BpGetBootloaderResetCfgLedGpio */
2220 /**************************************************************************
2221 * Name : BpGetBootloaderStopLedGpio
2223 * Description: This function returns the GPIO pin assignment for the break
2224 * into bootloader LED that is set by the bootloader.
2226 * Parameters : [OUT] pusValue - Address of short word that the break into
2227 * bootloader LED GPIO pin is returned in.
2229 * Returns : BP_SUCCESS - Success, value is returned.
2230 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2231 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2233 ***************************************************************************/
2234 int BpGetBootloaderStopLedGpio( unsigned short *pusValue )
2240 *pusValue = g_pCurrentBp->usGpioLedBlStop;
2242 if( g_pCurrentBp->usGpioLedBlStop != BP_NOT_DEFINED )
2248 nRet = BP_VALUE_NOT_DEFINED;
2253 *pusValue = BP_NOT_DEFINED;
2254 nRet = BP_BOARD_ID_NOT_SET;
2258 } /* BpGetBootloaderStopLedGpio */
2260 /**************************************************************************
2261 * Name : BpGetVoipLedGpio
2263 * Description: This function returns the GPIO pin assignment for the VOIP
2266 * Parameters : [OUT] pusValue - Address of short word that the VOIP LED
2267 * GPIO pin is returned in.
2269 * Returns : BP_SUCCESS - Success, value is returned.
2270 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2271 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2274 * Note : The VoIP structure would allow for having one LED per DSP
2275 * however, the board initialization function assumes only one
2276 * LED per functionality (ie one LED for VoIP). Therefore in
2277 * order to keep this tidy and simple we do not make usage of the
2278 * one-LED-per-DSP function. Instead, we assume that the LED for
2279 * VoIP is unique and associated with DSP 0 (always present on
2280 * any VoIP platform). If changing this to a LED-per-DSP function
2281 * then one need to update the board initialization driver in
2282 * bcmdrivers\opensource\char\board\bcm963xx\impl1
2283 ***************************************************************************/
2284 int BpGetVoipLedGpio( unsigned short *pusValue )
2290 VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( 0 );
2294 *pusValue = pDspInfo->usGpioLedVoip;
2296 if( *pusValue != BP_NOT_DEFINED )
2302 nRet = BP_VALUE_NOT_DEFINED;
2307 *pusValue = BP_NOT_DEFINED;
2308 nRet = BP_BOARD_ID_NOT_FOUND;
2313 *pusValue = BP_NOT_DEFINED;
2314 nRet = BP_BOARD_ID_NOT_SET;
2318 } /* BpGetVoipLedGpio */
2320 /**************************************************************************
2321 * Name : BpGetWirelessExtIntr
2323 * Description: This function returns the Wireless external interrupt number.
2325 * Parameters : [OUT] pulValue - Address of short word that the wireless
2326 * external interrupt number is returned in.
2328 * Returns : BP_SUCCESS - Success, value is returned.
2329 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2330 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2332 ***************************************************************************/
2333 int BpGetWirelessExtIntr( unsigned long *pulValue )
2339 *pulValue = g_pCurrentBp->usExtIntrWireless;
2341 if( g_pCurrentBp->usExtIntrWireless != BP_NOT_DEFINED )
2347 nRet = BP_VALUE_NOT_DEFINED;
2352 *pulValue = BP_NOT_DEFINED;
2353 nRet = BP_BOARD_ID_NOT_SET;
2357 } /* BpGetWirelessExtIntr */
2359 /**************************************************************************
2360 * Name : BpGetAdslDyingGaspExtIntr
2362 * Description: This function returns the ADSL Dying Gasp external interrupt
2365 * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp
2366 * external interrupt number is returned in.
2368 * Returns : BP_SUCCESS - Success, value is returned.
2369 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2370 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2372 ***************************************************************************/
2373 int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue )
2379 *pulValue = g_pCurrentBp->usExtIntrAdslDyingGasp;
2381 if( g_pCurrentBp->usExtIntrAdslDyingGasp != BP_NOT_DEFINED )
2387 nRet = BP_VALUE_NOT_DEFINED;
2392 *pulValue = BP_NOT_DEFINED;
2393 nRet = BP_BOARD_ID_NOT_SET;
2397 } /* BpGetAdslDyingGaspExtIntr */
2399 /**************************************************************************
2400 * Name : BpGetVoipExtIntr
2402 * Description: This function returns the VOIP external interrupt number.
2404 * Parameters : [OUT] pulValue - Address of short word that the VOIP
2405 * external interrupt number is returned in.
2406 * [IN] dspNum - Address of the DSP to query.
2408 * Returns : BP_SUCCESS - Success, value is returned.
2409 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2410 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2412 ***************************************************************************/
2413 int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue )
2419 VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum );
2423 *pulValue = pDspInfo->usExtIntrVoip;
2425 if( *pulValue != BP_NOT_DEFINED )
2431 nRet = BP_VALUE_NOT_DEFINED;
2436 *pulValue = BP_NOT_DEFINED;
2437 nRet = BP_BOARD_ID_NOT_FOUND;
2442 *pulValue = BP_NOT_DEFINED;
2443 nRet = BP_BOARD_ID_NOT_SET;
2447 } /* BpGetVoipExtIntr */
2449 /**************************************************************************
2450 * Name : BpGetHpnaExtIntr
2452 * Description: This function returns the HPNA external interrupt number.
2454 * Parameters : [OUT] pulValue - Address of short word that the HPNA
2455 * external interrupt number is returned in.
2457 * Returns : BP_SUCCESS - Success, value is returned.
2458 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2459 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2461 ***************************************************************************/
2462 int BpGetHpnaExtIntr( unsigned long *pulValue )
2468 *pulValue = g_pCurrentBp->usExtIntrHpna;
2470 if( g_pCurrentBp->usExtIntrHpna != BP_NOT_DEFINED )
2476 nRet = BP_VALUE_NOT_DEFINED;
2481 *pulValue = BP_NOT_DEFINED;
2482 nRet = BP_BOARD_ID_NOT_SET;
2486 } /* BpGetHpnaExtIntr */
2488 /**************************************************************************
2489 * Name : BpGetHpnaChipSelect
2491 * Description: This function returns the HPNA chip select number.
2493 * Parameters : [OUT] pulValue - Address of short word that the HPNA
2494 * chip select number is returned in.
2496 * Returns : BP_SUCCESS - Success, value is returned.
2497 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2498 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2500 ***************************************************************************/
2501 int BpGetHpnaChipSelect( unsigned long *pulValue )
2507 *pulValue = g_pCurrentBp->usCsHpna;
2509 if( g_pCurrentBp->usCsHpna != BP_NOT_DEFINED )
2515 nRet = BP_VALUE_NOT_DEFINED;
2520 *pulValue = BP_NOT_DEFINED;
2521 nRet = BP_BOARD_ID_NOT_SET;
2525 } /* BpGetHpnaChipSelect */
2527 /**************************************************************************
2528 * Name : BpGetVoipChipSelect
2530 * Description: This function returns the VOIP chip select number.
2532 * Parameters : [OUT] pulValue - Address of short word that the VOIP
2533 * chip select number is returned in.
2534 * [IN] dspNum - Address of the DSP to query.
2536 * Returns : BP_SUCCESS - Success, value is returned.
2537 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2538 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2540 ***************************************************************************/
2541 int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue )
2547 VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum );
2551 *pulValue = pDspInfo->usCsVoip;
2553 if( *pulValue != BP_NOT_DEFINED )
2559 nRet = BP_VALUE_NOT_DEFINED;
2564 *pulValue = BP_NOT_DEFINED;
2565 nRet = BP_BOARD_ID_NOT_FOUND;
2570 *pulValue = BP_NOT_DEFINED;
2571 nRet = BP_BOARD_ID_NOT_SET;
2575 } /* BpGetVoipChipSelect */