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
39 typedef struct boardparameters
41 char szBoardId[BP_BOARD_ID_LEN]; /* board id string */
42 ETHERNET_MAC_INFO EnetMacInfos[BP_MAX_ENET_MACS];
43 VOIP_DSP_INFO VoIPDspInfo[BP_MAX_VOIP_DSP];
44 unsigned short usSdramSize; /* SDRAM size and type */
45 unsigned short usPsiSize; /* persistent storage in K bytes */
46 unsigned short usGpioRj11InnerPair; /* GPIO pin or not defined */
47 unsigned short usGpioRj11OuterPair; /* GPIO pin or not defined */
48 unsigned short usGpioPressAndHoldReset; /* GPIO pin or not defined */
49 unsigned short usGpioPcmciaReset; /* GPIO pin or not defined */
50 unsigned short usGpioUartRts; /* GPIO pin or not defined */
51 unsigned short usGpioUartCts; /* GPIO pin or not defined */
52 unsigned short usGpioLedAdsl; /* GPIO pin or not defined */
53 unsigned short usGpioLedAdslFail; /* GPIO pin or not defined */
54 unsigned short usGpioLedWireless; /* GPIO pin or not defined */
55 unsigned short usGpioLedUsb; /* GPIO pin or not defined */
56 unsigned short usGpioLedHpna; /* GPIO pin or not defined */
57 unsigned short usGpioLedWanData; /* GPIO pin or not defined */
58 unsigned short usGpioLedPpp; /* GPIO pin or not defined */
59 unsigned short usGpioLedPppFail; /* GPIO pin or not defined */
60 unsigned short usGpioLedBlPowerOn; /* GPIO pin or not defined */
61 unsigned short usGpioLedBlAlarm; /* GPIO pin or not defined */
62 unsigned short usGpioLedBlResetCfg; /* GPIO pin or not defined */
63 unsigned short usGpioLedBlStop; /* GPIO pin or not defined */
64 unsigned short usExtIntrWireless; /* ext intr or not defined */
65 unsigned short usExtIntrAdslDyingGasp; /* ext intr or not defined */
66 unsigned short usExtIntrHpna; /* ext intr or not defined */
67 unsigned short usCsHpna; /* chip select not defined */
68 unsigned short usAntInUseWireless; /* antenna in use or not defined */
69 unsigned short usGpioSesBtnWireless; /* GPIO pin or not defined */
70 unsigned short usExtIntrSesBtnWireless; /* ext intr or not defined */
71 unsigned short usGpioLedSesWireless; /* GPIO pin or not defined */
72 } BOARD_PARAMETERS, *PBOARD_PARAMETERS;
75 #if defined(_BCM96338_) || defined(CONFIG_BCM96338)
76 static BOARD_PARAMETERS g_bcm96338sv =
78 "96338SV", /* szBoardId */
79 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
80 0x01, /* ucPhyAddress */
81 BP_NOT_DEFINED, /* usGpioPhySpiSck */
82 BP_NOT_DEFINED, /* usGpioPhySpiSs */
83 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
84 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
85 BP_NOT_DEFINED, /* usGpioPhyReset */
86 0x01, /* numSwitchPorts */
87 BP_ENET_CONFIG_MDIO, /* usConfigType */
88 BP_NOT_DEFINED}, /* usReverseMii */
89 {BP_ENET_NO_PHY}}, /* ucPhyType */
90 {{BP_VOIP_NO_DSP}, /* ucDspType */
91 {BP_VOIP_NO_DSP}}, /* ucDspType */
92 BP_MEMORY_16MB_1_CHIP, /* usSdramSize */
93 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
94 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
95 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
96 BP_NOT_DEFINED, /* usGpioPressAndHoldReset */
97 BP_NOT_DEFINED, /* usGpioPcmciaReset */
98 BP_NOT_DEFINED, /* usGpioUartRts */
99 BP_NOT_DEFINED, /* usGpioUartCts */
100 BP_NOT_DEFINED, /* usGpioLedAdsl */
101 BP_NOT_DEFINED, /* usGpioLedAdslFail */
102 BP_NOT_DEFINED, /* usGpioLedWireless */
103 BP_NOT_DEFINED, /* usGpioLedUsb */
104 BP_NOT_DEFINED, /* usGpioLedHpna */
105 BP_NOT_DEFINED, /* usGpioLedWanData */
106 BP_NOT_DEFINED, /* usGpioLedPpp */
107 BP_NOT_DEFINED, /* usGpioLedPppFail */
108 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
109 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
110 BP_NOT_DEFINED, /* usGpioLedBlResetCfg */
111 BP_NOT_DEFINED, /* usGpioLedBlStop */
112 BP_NOT_DEFINED, /* usExtIntrWireless */
113 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
114 BP_NOT_DEFINED, /* usExtIntrHpna */
115 BP_NOT_DEFINED, /* usCsHpna */
116 BP_NOT_DEFINED, /* usAntInUseWireless */
117 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
118 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
119 BP_NOT_DEFINED /* usGpioLedSesWireless */
121 static BOARD_PARAMETERS g_bcm96338l2m8m =
123 "96338L-2M-8M", /* szBoardId */
124 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
125 0x01, /* ucPhyAddress */
126 BP_NOT_DEFINED, /* usGpioPhySpiSck */
127 BP_NOT_DEFINED, /* usGpioPhySpiSs */
128 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
129 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
130 BP_NOT_DEFINED, /* usGpioPhyReset */
131 0x01, /* numSwitchPorts */
132 BP_ENET_CONFIG_MDIO, /* usConfigType */
133 BP_NOT_DEFINED}, /* usReverseMii */
134 {BP_ENET_NO_PHY}}, /* ucPhyType */
135 {{BP_VOIP_NO_DSP}, /* ucDspType */
136 {BP_VOIP_NO_DSP}}, /* ucDspType */
137 BP_MEMORY_8MB_1_CHIP, /* usSdramSize */
138 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
139 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
140 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
141 BP_NOT_DEFINED, /* usGpioPressAndHoldReset */
142 BP_NOT_DEFINED, /* usGpioPcmciaReset */
143 BP_NOT_DEFINED, /* usGpioUartRts */
144 BP_NOT_DEFINED, /* usGpioUartCts */
145 BP_NOT_DEFINED, /* usGpioLedAdsl */
146 BP_GPIO_2_AL, /* usGpioLedAdslFail */
147 BP_NOT_DEFINED, /* usGpioLedWireless */
148 BP_NOT_DEFINED, /* usGpioLedUsb */
149 BP_NOT_DEFINED, /* usGpioLedHpna */
150 BP_GPIO_3_AL, /* usGpioLedWanData */
151 BP_GPIO_3_AL, /* usGpioLedPpp */
152 BP_GPIO_4_AL, /* usGpioLedPppFail */
153 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
154 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
155 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
156 BP_GPIO_1_AL, /* usGpioLedBlStop */
157 BP_NOT_DEFINED, /* usExtIntrWireless */
158 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
159 BP_NOT_DEFINED, /* usExtIntrHpna */
160 BP_NOT_DEFINED, /* usCsHpna */
161 BP_NOT_DEFINED, /* usAntInUseWireless */
162 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
163 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
164 BP_NOT_DEFINED /* usGpioLedSesWireless */
166 static PBOARD_PARAMETERS g_BoardParms[] =
167 {&g_bcm96338sv, &g_bcm96338l2m8m, 0};
170 #if defined(_BCM96345_) || defined(CONFIG_BCM96345)
171 static BOARD_PARAMETERS g_bcm96345r =
173 "96345R", /* szBoardId */
174 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
175 0x01, /* ucPhyAddress */
176 BP_NOT_DEFINED, /* usGpioPhySpiSck */
177 BP_NOT_DEFINED, /* usGpioPhySpiSs */
178 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
179 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
180 BP_NOT_DEFINED, /* usGpioPhyReset */
181 0x01, /* numSwitchPorts */
182 BP_ENET_CONFIG_MDIO, /* usConfigType */
183 BP_NOT_DEFINED}, /* usReverseMii */
184 {BP_ENET_NO_PHY}}, /* ucPhyType */
185 {{BP_VOIP_NO_DSP}, /* ucDspType */
186 {BP_VOIP_NO_DSP}}, /* ucDspType */
187 BP_MEMORY_8MB_1_CHIP, /* usSdramSize */
188 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
189 BP_GPIO_11_AH, /* usGpioRj11InnerPair */
190 BP_GPIO_12_AH, /* usGpioRj11OuterPair */
191 BP_GPIO_13_AH, /* usGpioPressAndHoldReset */
192 BP_NOT_DEFINED, /* usGpioPcmciaReset */
193 BP_NOT_DEFINED, /* usGpioUartRts */
194 BP_NOT_DEFINED, /* usGpioUartCts */
195 BP_GPIO_8_AH, /* usGpioLedAdsl */
196 BP_NOT_DEFINED, /* usGpioLedAdslFail */
197 BP_NOT_DEFINED, /* usGpioLedWireless */
198 BP_NOT_DEFINED, /* usGpioLedUsb */
199 BP_NOT_DEFINED, /* usGpioLedHpna */
200 BP_GPIO_8_AH, /* usGpioLedWanData */
201 BP_GPIO_9_AH, /* usGpioLedPpp */
202 BP_NOT_DEFINED, /* usGpioLedPppFail */
203 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
204 BP_GPIO_10_AH, /* usGpioLedBlAlarm */
205 BP_GPIO_9_AH, /* usGpioLedBlResetCfg */
206 BP_GPIO_8_AH, /* usGpioLedBlStop */
207 BP_NOT_DEFINED, /* usExtIntrWireless */
208 BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */
209 BP_NOT_DEFINED, /* usExtIntrHpna */
210 BP_NOT_DEFINED, /* usCsHpna */
211 BP_NOT_DEFINED, /* usAntInUseWireless */
212 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
213 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
214 BP_NOT_DEFINED /* usGpioLedSesWireless */
217 static BOARD_PARAMETERS g_bcm96345gw2 =
219 /* A hardware jumper determines whether GPIO 13 is used for Press and Hold
222 "96345GW2", /* szBoardId */
223 {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
224 0x00, /* ucPhyAddress */
225 BP_GPIO_0_AH, /* usGpioPhySpiSck */
226 BP_GPIO_4_AH, /* usGpioPhySpiSs */
227 BP_GPIO_12_AH, /* usGpioPhySpiMosi */
228 BP_GPIO_11_AH, /* usGpioPhySpiMiso */
229 BP_NOT_DEFINED, /* usGpioPhyReset */
230 0x04, /* numSwitchPorts */
231 BP_ENET_CONFIG_GPIO, /* usConfigType */
232 BP_ENET_REVERSE_MII}, /* usReverseMii */
233 {BP_ENET_NO_PHY}}, /* ucPhyType */
234 {{BP_VOIP_DSP, /* ucDspType */
235 0x00, /* ucDspAddress */
236 BP_EXT_INTR_1, /* usExtIntrVoip */
237 BP_GPIO_6_AH, /* usGpioVoipReset */
238 BP_GPIO_15_AH, /* usGpioVoipIntr */
239 BP_NOT_DEFINED, /* usGpioLedVoip */
240 BP_CS_2}, /* usCsVoip */
241 {BP_VOIP_NO_DSP}}, /* ucDspType */
242 BP_MEMORY_16MB_1_CHIP, /* usSdramSize */
243 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
244 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
245 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
246 BP_GPIO_13_AH, /* usGpioPressAndHoldReset */
247 BP_GPIO_2_AH, /* usGpioPcmciaReset */
248 BP_GPIO_13_AH, /* usGpioUartRts */
249 BP_GPIO_9_AH, /* usGpioUartCts */
250 BP_GPIO_8_AH, /* usGpioLedAdsl */
251 BP_NOT_DEFINED, /* usGpioLedAdslFail */
252 BP_NOT_DEFINED, /* usGpioLedWireless */
253 BP_GPIO_7_AH, /* usGpioLedUsb */
254 BP_NOT_DEFINED, /* usGpioLedHpna */
255 BP_GPIO_8_AH, /* usGpioLedWanData */
256 BP_NOT_DEFINED, /* usGpioLedPpp */
257 BP_NOT_DEFINED, /* usGpioLedPppFail */
258 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
259 BP_GPIO_10_AH, /* usGpioLedBlAlarm */
260 BP_GPIO_7_AH, /* usGpioLedBlResetCfg */
261 BP_GPIO_8_AH, /* usGpioLedBlStop */
262 BP_EXT_INTR_2, /* usExtIntrWireless */
263 BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */
264 BP_NOT_DEFINED, /* usExtIntrHpna */
265 BP_NOT_DEFINED, /* usCsHpna */
266 BP_WLAN_ANT_MAIN, /* usAntInUseWireless */
267 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
268 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
269 BP_NOT_DEFINED /* usGpioLedSesWireless */
272 static BOARD_PARAMETERS g_bcm96345gw =
274 "96345GW", /* szBoardId */
275 {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
276 0x00, /* ucPhyAddress */
277 BP_NOT_DEFINED, /* usGpioPhySpiSck */
278 BP_NOT_DEFINED, /* usGpioPhySpiSs */
279 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
280 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
281 BP_NOT_DEFINED, /* usGpioPhyReset */
282 0x04, /* numSwitchPorts */
283 BP_ENET_CONFIG_MDIO, /* usConfigType */
284 BP_ENET_NO_REVERSE_MII}, /* usReverseMii */
285 {BP_ENET_NO_PHY}}, /* ucPhyType */
286 {{BP_VOIP_DSP, /* ucDspType */
287 0x00, /* ucDspAddress */
288 BP_EXT_INTR_1, /* usExtIntrVoip */
289 BP_GPIO_6_AH, /* usGpioVoipReset */
290 BP_GPIO_15_AH, /* usGpioVoipIntr */
291 BP_NOT_DEFINED, /* usGpioLedVoip */
292 BP_CS_2}, /* usCsVoip */
293 {BP_VOIP_NO_DSP}}, /* ucDspType */
294 BP_MEMORY_16MB_1_CHIP, /* usSdramSize */
295 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
296 BP_GPIO_11_AH, /* usGpioRj11InnerPair */
297 BP_GPIO_1_AH, /* usGpioRj11OuterPair */
298 BP_GPIO_13_AH, /* usGpioPressAndHoldReset */
299 BP_GPIO_2_AH, /* usGpioPcmciaReset */
300 BP_NOT_DEFINED, /* usGpioUartRts */
301 BP_NOT_DEFINED, /* usGpioUartCts */
302 BP_GPIO_8_AH, /* usGpioLedAdsl */
303 BP_NOT_DEFINED, /* usGpioLedAdslFail */
304 BP_GPIO_10_AH, /* usGpioLedWireless */
305 BP_GPIO_7_AH, /* usGpioLedUsb */
306 BP_NOT_DEFINED, /* usGpioLedHpna */
307 BP_GPIO_8_AH, /* usGpioLedWanData */
308 BP_NOT_DEFINED, /* usGpioLedPpp */
309 BP_NOT_DEFINED, /* usGpioLedPppFail */
310 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
311 BP_GPIO_9_AH, /* usGpioLedBlAlarm */
312 BP_GPIO_10_AH, /* usGpioLedBlResetCfg */
313 BP_GPIO_8_AH, /* usGpioLedBlStop */
314 BP_EXT_INTR_2, /* usExtIntrWireless */
315 BP_EXT_INTR_0, /* usExtIntrAdslDyingGasp */
316 BP_EXT_INTR_3, /* usExtIntrHpna */
317 BP_CS_1, /* usCsHpna */
318 BP_WLAN_ANT_MAIN, /* usAntInUseWireless */
319 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
320 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
321 BP_NOT_DEFINED /* usGpioLedSesWireless */
324 static BOARD_PARAMETERS g_bcm96335r =
326 "96335R", /* szBoardId */
327 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
328 0x01, /* ucPhyAddress */
329 BP_NOT_DEFINED, /* usGpioPhySpiSck */
330 BP_NOT_DEFINED, /* usGpioPhySpiSs */
331 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
332 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
333 BP_NOT_DEFINED, /* usGpioPhyReset */
334 0x01, /* numSwitchPorts */
335 BP_ENET_CONFIG_MDIO, /* usConfigType */
336 BP_NOT_DEFINED}, /* usReverseMii */
337 {BP_ENET_NO_PHY}}, /* ucPhyType */
338 {{BP_VOIP_NO_DSP}, /* ucDspType */
339 {BP_VOIP_NO_DSP}}, /* ucDspType */
340 BP_MEMORY_8MB_1_CHIP, /* usSdramSize */
341 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
342 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
343 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
344 BP_GPIO_14_AH, /* usGpioPressAndHoldReset */
345 BP_NOT_DEFINED, /* usGpioPcmciaReset */
346 BP_NOT_DEFINED, /* usGpioUartRts */
347 BP_NOT_DEFINED, /* usGpioUartCts */
348 BP_GPIO_9_AH, /* usGpioLedAdsl */
349 BP_NOT_DEFINED, /* usGpioLedAdslFail */
350 BP_NOT_DEFINED, /* usGpioLedWireless */
351 BP_NOT_DEFINED, /* usGpioLedUsb */
352 BP_NOT_DEFINED, /* usGpioLedHpna */
353 BP_GPIO_9_AH, /* usGpioLedWanData */
354 BP_GPIO_8_AH, /* usGpioLedPpp */
355 BP_NOT_DEFINED, /* usGpioLedPppFail */
356 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
357 BP_GPIO_10_AH, /* usGpioLedBlAlarm */
358 BP_GPIO_8_AH, /* usGpioLedBlResetCfg */
359 BP_GPIO_9_AH, /* usGpioLedBlStop */
360 BP_NOT_DEFINED, /* usExtIntrWireless */
361 BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */
362 BP_NOT_DEFINED, /* usExtIntrHpna */
363 BP_NOT_DEFINED, /* usCsHpna */
364 BP_NOT_DEFINED, /* usAntInUseWireless */
365 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
366 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
367 BP_NOT_DEFINED /* usGpioLedSesWireless */
370 static BOARD_PARAMETERS g_bcm96345r0 =
372 "96345R0", /* 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_NOT_DEFINED, /* usGpioPressAndHoldReset */
391 BP_NOT_DEFINED, /* usGpioPcmciaReset */
392 BP_NOT_DEFINED, /* usGpioUartRts */
393 BP_NOT_DEFINED, /* usGpioUartCts */
394 BP_GPIO_8_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_9_AH, /* usGpioLedPpp */
401 BP_NOT_DEFINED, /* usGpioLedPppFail */
402 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
403 BP_GPIO_9_AH, /* usGpioLedBlAlarm */
404 BP_GPIO_8_AH, /* usGpioLedBlResetCfg */
405 BP_GPIO_8_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_bcm96345rs =
418 "96345RS", /* szBoardId */
419 {{BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
420 0x00, /* 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_ENET_NO_REVERSE_MII}, /* 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_GPIO_11_AH, /* usGpioRj11InnerPair */
435 BP_GPIO_12_AH, /* usGpioRj11OuterPair */
436 BP_GPIO_13_AH, /* 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_8_AH, /* usGpioLedWanData */
446 BP_GPIO_9_AH, /* usGpioLedPpp */
447 BP_NOT_DEFINED, /* usGpioLedPppFail */
448 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
449 BP_GPIO_10_AH, /* usGpioLedBlAlarm */
450 BP_GPIO_9_AH, /* usGpioLedBlResetCfg */
451 BP_GPIO_8_AH, /* usGpioLedBlStop */
452 BP_NOT_DEFINED, /* usExtIntrWireless */
453 BP_EXT_INTR_0, /* 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 PBOARD_PARAMETERS g_BoardParms[] =
463 {&g_bcm96345r, &g_bcm96345gw2, &g_bcm96345gw, &g_bcm96335r, &g_bcm96345r0,
467 #if defined(_BCM96348_) || defined(CONFIG_BCM96348)
469 static BOARD_PARAMETERS g_bcm96348r =
471 "96348R", /* szBoardId */
472 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
473 0x01, /* ucPhyAddress */
474 BP_NOT_DEFINED, /* usGpioPhySpiSck */
475 BP_NOT_DEFINED, /* usGpioPhySpiSs */
476 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
477 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
478 BP_NOT_DEFINED, /* usGpioPhyReset */
479 0x01, /* numSwitchPorts */
480 BP_ENET_CONFIG_MDIO, /* usConfigType */
481 BP_NOT_DEFINED}, /* usReverseMii */
482 {BP_ENET_NO_PHY}}, /* ucPhyType */
483 {{BP_VOIP_NO_DSP}, /* ucDspType */
484 {BP_VOIP_NO_DSP}}, /* ucDspType */
485 BP_MEMORY_8MB_1_CHIP, /* usSdramSize */
486 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
487 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
488 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
489 BP_GPIO_7_AH, /* usGpioPressAndHoldReset */
490 BP_NOT_DEFINED, /* usGpioPcmciaReset */
491 BP_NOT_DEFINED, /* usGpioUartRts */
492 BP_NOT_DEFINED, /* usGpioUartCts */
493 BP_NOT_DEFINED, /* usGpioLedAdsl */
494 BP_GPIO_2_AL, /* usGpioLedAdslFail */
495 BP_NOT_DEFINED, /* usGpioLedWireless */
496 BP_NOT_DEFINED, /* usGpioLedUsb */
497 BP_NOT_DEFINED, /* usGpioLedHpna */
498 BP_GPIO_3_AL, /* usGpioLedWanData */
499 BP_GPIO_3_AL, /* usGpioLedPpp */
500 BP_GPIO_4_AL, /* usGpioLedPppFail */
501 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
502 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
503 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
504 BP_GPIO_1_AL, /* usGpioLedBlStop */
505 BP_NOT_DEFINED, /* usExtIntrWireless */
506 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
507 BP_NOT_DEFINED, /* usExtIntrHpna */
508 BP_NOT_DEFINED, /* usCsHpna */
509 BP_NOT_DEFINED, /* usAntInUseWireless */
510 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
511 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
512 BP_NOT_DEFINED /* usGpioLedSesWireless */
515 static BOARD_PARAMETERS g_bcm96348lv =
517 "96348LV", /* szBoardId */
518 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
519 0x01, /* ucPhyAddress */
520 BP_NOT_DEFINED, /* usGpioPhySpiSck */
521 BP_NOT_DEFINED, /* usGpioPhySpiSs */
522 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
523 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
524 BP_NOT_DEFINED, /* usGpioPhyReset */
525 0x01, /* numSwitchPorts */
526 BP_ENET_CONFIG_MDIO, /* usConfigType */
527 BP_NOT_DEFINED}, /* usReverseMii */
528 {BP_ENET_EXTERNAL_PHY, /* ucPhyType */
529 0x02, /* ucPhyAddress */
530 BP_NOT_DEFINED, /* usGpioPhySpiSck */
531 BP_NOT_DEFINED, /* usGpioPhySpiSs */
532 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
533 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
534 BP_GPIO_5_AL, /* usGpioPhyReset */
535 0x01, /* numSwitchPorts */
536 BP_ENET_CONFIG_MDIO, /* usConfigType */
537 BP_NOT_DEFINED}}, /* usReverseMii */
538 {{BP_VOIP_NO_DSP}, /* ucDspType */
539 {BP_VOIP_NO_DSP}}, /* ucDspType */
540 BP_MEMORY_16MB_2_CHIP, /* usSdramSize */
541 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
542 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
543 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
544 BP_GPIO_7_AH, /* usGpioPressAndHoldReset */
545 BP_NOT_DEFINED, /* usGpioPcmciaReset */
546 BP_NOT_DEFINED, /* usGpioUartRts */
547 BP_NOT_DEFINED, /* usGpioUartCts */
548 BP_NOT_DEFINED, /* usGpioLedAdsl */
549 BP_GPIO_2_AL, /* usGpioLedAdslFail */
550 BP_NOT_DEFINED, /* usGpioLedWireless */
551 BP_NOT_DEFINED, /* usGpioLedUsb */
552 BP_NOT_DEFINED, /* usGpioLedHpna */
553 BP_GPIO_3_AL, /* usGpioLedWanData */
554 BP_GPIO_3_AL, /* usGpioLedPpp */
555 BP_GPIO_4_AL, /* usGpioLedPppFail */
556 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
557 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
558 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
559 BP_GPIO_1_AL, /* usGpioLedBlStop */
560 BP_NOT_DEFINED, /* usExtIntrWireless */
561 BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */
562 BP_NOT_DEFINED, /* usExtIntrHpna */
563 BP_NOT_DEFINED, /* usCsHpna */
564 BP_NOT_DEFINED, /* usAntInUseWireless */
565 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
566 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
567 BP_NOT_DEFINED /* usGpioLedSesWireless */
570 static BOARD_PARAMETERS g_bcm96348gw =
572 "96348GW", /* szBoardId */
573 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
574 0x01, /* ucPhyAddress */
575 BP_NOT_DEFINED, /* usGpioPhySpiSck */
576 BP_NOT_DEFINED, /* usGpioPhySpiSs */
577 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
578 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
579 BP_NOT_DEFINED, /* usGpioPhyReset */
580 0x01, /* numSwitchPorts */
581 BP_ENET_CONFIG_MDIO, /* usConfigType */
582 BP_NOT_DEFINED}, /* usReverseMii */
583 {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
584 0x00, /* ucPhyAddress */
585 BP_NOT_DEFINED, /* usGpioPhySpiSck */
586 BP_NOT_DEFINED, /* usGpioPhySpiSs */
587 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
588 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
589 BP_NOT_DEFINED, /* usGpioPhyReset */
590 0x03, /* numSwitchPorts */
591 BP_ENET_CONFIG_SPI_SSB_0, /* usConfigType */
592 BP_ENET_REVERSE_MII}}, /* usReverseMii */
593 {{BP_VOIP_DSP, /* ucDspType */
594 0x00, /* ucDspAddress */
595 BP_EXT_INTR_2, /* usExtIntrVoip */
596 BP_GPIO_6_AH, /* usGpioVoipReset */
597 BP_GPIO_34_AH, /* usGpioVoipIntr */
598 BP_NOT_DEFINED, /* usGpioLedVoip */
599 BP_CS_2}, /* usCsVoip */
600 {BP_VOIP_NO_DSP}}, /* ucDspType */
601 BP_MEMORY_16MB_2_CHIP, /* usSdramSize */
602 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
603 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
604 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
605 BP_GPIO_33_AL, /* usGpioPressAndHoldReset */
606 BP_NOT_DEFINED, /* usGpioPcmciaReset */
607 BP_NOT_DEFINED, /* usGpioUartRts */
608 BP_NOT_DEFINED, /* usGpioUartCts */
609 BP_NOT_DEFINED, /* usGpioLedAdsl */
610 BP_GPIO_2_AL, /* usGpioLedAdslFail */
611 BP_NOT_DEFINED, /* usGpioLedWireless */
612 BP_NOT_DEFINED, /* usGpioLedUsb */
613 BP_NOT_DEFINED, /* usGpioLedHpna */
614 BP_GPIO_3_AL, /* usGpioLedWanData */
615 BP_GPIO_3_AL, /* usGpioLedPpp */
616 BP_GPIO_4_AL, /* usGpioLedPppFail */
617 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
618 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
619 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
620 BP_GPIO_1_AL, /* usGpioLedBlStop */
621 BP_NOT_DEFINED, /* usExtIntrWireless */
622 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
623 BP_NOT_DEFINED, /* usExtIntrHpna */
624 BP_NOT_DEFINED, /* usCsHpna */
625 BP_WLAN_ANT_MAIN, /* usAntInUseWireless */
626 BP_NOT_DEFINED, /* BP_GPIO_35_AH, */ /* usGpioSesBtnWireless */
627 BP_NOT_DEFINED, /* BP_EXT_INTR_3, */ /* usExtIntrSesBtnWireless */
628 BP_NOT_DEFINED /* BP_GPIO_0_AL */ /* usGpioLedSesWireless */
632 static BOARD_PARAMETERS g_bcm96348gw_10 =
634 "96348GW-10", /* szBoardId */
635 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
636 0x01, /* ucPhyAddress */
637 BP_NOT_DEFINED, /* usGpioPhySpiSck */
638 BP_NOT_DEFINED, /* usGpioPhySpiSs */
639 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
640 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
641 BP_NOT_DEFINED, /* usGpioPhyReset */
642 0x01, /* numSwitchPorts */
643 BP_ENET_CONFIG_MDIO, /* usConfigType */
644 BP_NOT_DEFINED}, /* usReverseMii */
645 {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
646 0x00, /* ucPhyAddress */
647 BP_NOT_DEFINED, /* usGpioPhySpiSck */
648 BP_NOT_DEFINED, /* usGpioPhySpiSs */
649 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
650 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
651 BP_NOT_DEFINED, /* usGpioPhyReset */
652 0x03, /* numSwitchPorts */
653 BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */
654 BP_ENET_REVERSE_MII}}, /* usReverseMii */
655 {{BP_VOIP_DSP, /* ucDspType */
656 0x00, /* ucDspAddress */
657 BP_EXT_INTR_2, /* usExtIntrVoip */
658 BP_GPIO_6_AH, /* usGpioVoipReset */
659 BP_GPIO_34_AH, /* usGpioVoipIntr */
660 BP_NOT_DEFINED, /* usGpioLedVoip */
661 BP_CS_2}, /* usCsVoip */
662 {BP_VOIP_NO_DSP}}, /* ucDspType */
663 BP_MEMORY_16MB_2_CHIP, /* usSdramSize */
664 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
665 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
666 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
667 BP_GPIO_33_AL, /* usGpioPressAndHoldReset */
668 BP_NOT_DEFINED, /* usGpioPcmciaReset */
669 BP_NOT_DEFINED, /* usGpioUartRts */
670 BP_NOT_DEFINED, /* usGpioUartCts */
671 BP_NOT_DEFINED, /* usGpioLedAdsl */
672 BP_GPIO_2_AL, /* usGpioLedAdslFail */
673 BP_NOT_DEFINED, /* usGpioLedWireless */
674 BP_NOT_DEFINED, /* usGpioLedUsb */
675 BP_NOT_DEFINED, /* usGpioLedHpna */
676 BP_GPIO_3_AL, /* usGpioLedWanData */
677 BP_GPIO_3_AL, /* usGpioLedPpp */
678 BP_GPIO_4_AL, /* usGpioLedPppFail */
679 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
680 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
681 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
682 BP_GPIO_1_AL, /* usGpioLedBlStop */
683 BP_NOT_DEFINED, /* usExtIntrWireless */
684 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
685 BP_NOT_DEFINED, /* usExtIntrHpna */
686 BP_NOT_DEFINED, /* usCsHpna */
687 BP_WLAN_ANT_MAIN, /* usAntInUseWireless */
688 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
689 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
690 BP_NOT_DEFINED /* usGpioLedSesWireless */
693 static BOARD_PARAMETERS g_bcm96348gw_11 =
695 "96348GW-11", /* szBoardId */
696 {{BP_ENET_NO_PHY}, /* ucPhyType */
697 {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
698 0x00, /* ucPhyAddress */
699 BP_NOT_DEFINED, /* usGpioPhySpiSck */
700 BP_NOT_DEFINED, /* usGpioPhySpiSs */
701 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
702 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
703 BP_NOT_DEFINED, /* usGpioPhyReset */
704 0x04, /* numSwitchPorts */
705 BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */
706 BP_ENET_REVERSE_MII}}, /* usReverseMii */
707 {{BP_VOIP_NO_DSP}, /* ucDspType */
708 {BP_VOIP_NO_DSP}}, /* ucDspType */
709 BP_MEMORY_16MB_2_CHIP, /* usSdramSize */
710 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
711 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
712 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
713 BP_GPIO_33_AL, /* usGpioPressAndHoldReset */
714 BP_NOT_DEFINED, /* usGpioPcmciaReset */
715 BP_NOT_DEFINED, /* usGpioUartRts */
716 BP_NOT_DEFINED, /* usGpioUartCts */
717 BP_NOT_DEFINED, /* usGpioLedAdsl */
718 BP_GPIO_2_AL, /* usGpioLedAdslFail */
719 BP_NOT_DEFINED, /* usGpioLedWireless */
720 BP_NOT_DEFINED, /* usGpioLedUsb */
721 BP_NOT_DEFINED, /* usGpioLedHpna */
722 BP_GPIO_3_AL, /* usGpioLedWanData */
723 BP_GPIO_3_AL, /* usGpioLedPpp */
724 BP_GPIO_4_AL, /* usGpioLedPppFail */
725 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
726 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
727 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
728 BP_GPIO_1_AL, /* usGpioLedBlStop */
729 BP_NOT_DEFINED, /* usExtIntrWireless */
730 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
731 BP_NOT_DEFINED, /* usExtIntrHpna */
732 BP_NOT_DEFINED, /* usCsHpna */
733 BP_NOT_DEFINED, /* usAntInUseWireless */
734 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
735 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
736 BP_NOT_DEFINED /* usGpioLedSesWireless */
739 static BOARD_PARAMETERS g_bcm96348sv =
741 "96348SV", /* szBoardId */
742 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
743 0x01, /* ucPhyAddress */
744 BP_NOT_DEFINED, /* usGpioPhySpiSck */
745 BP_NOT_DEFINED, /* usGpioPhySpiSs */
746 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
747 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
748 BP_NOT_DEFINED, /* usGpioPhyReset */
749 0x01, /* numSwitchPorts */
750 BP_ENET_CONFIG_MDIO, /* usConfigType */
751 BP_NOT_DEFINED}, /* usReverseMii */
752 {BP_ENET_EXTERNAL_PHY, /* ucPhyType */
753 0x1f, /* ucPhyAddress */
754 BP_NOT_DEFINED, /* usGpioPhySpiSck */
755 BP_NOT_DEFINED, /* usGpioPhySpiSs */
756 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
757 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
758 BP_NOT_DEFINED, /* usGpioPhyReset */
759 0x01, /* numSwitchPorts */
760 BP_ENET_CONFIG_MDIO, /* usConfigType */
761 BP_NOT_DEFINED}}, /* usReverseMii */
762 {{BP_VOIP_NO_DSP}, /* ucDspType */
763 {BP_VOIP_NO_DSP}}, /* ucDspType */
764 BP_MEMORY_32MB_2_CHIP, /* usSdramSize */
765 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
766 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
767 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
768 BP_NOT_DEFINED, /* usGpioPressAndHoldReset */
769 BP_NOT_DEFINED, /* usGpioPcmciaReset */
770 BP_NOT_DEFINED, /* usGpioUartRts */
771 BP_NOT_DEFINED, /* usGpioUartCts */
772 BP_NOT_DEFINED, /* usGpioLedAdsl */
773 BP_NOT_DEFINED, /* usGpioLedAdslFail */
774 BP_NOT_DEFINED, /* usGpioLedWireless */
775 BP_NOT_DEFINED, /* usGpioLedUsb */
776 BP_NOT_DEFINED, /* usGpioLedHpna */
777 BP_NOT_DEFINED, /* usGpioLedWanData */
778 BP_NOT_DEFINED, /* usGpioLedPpp */
779 BP_NOT_DEFINED, /* usGpioLedPppFail */
780 BP_NOT_DEFINED, /* usGpioLedBlPowerOn */
781 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
782 BP_NOT_DEFINED, /* usGpioLedBlResetCfg */
783 BP_NOT_DEFINED, /* usGpioLedBlStop */
784 BP_NOT_DEFINED, /* usExtIntrWireless */
785 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
786 BP_NOT_DEFINED, /* usExtIntrHpna */
787 BP_NOT_DEFINED, /* usCsHpna */
788 BP_NOT_DEFINED, /* usAntInUseWireless */
789 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
790 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
791 BP_NOT_DEFINED /* usGpioLedSesWireless */
795 static BOARD_PARAMETERS g_bcm96348gw_dualDsp =
797 "96348GW-DualDSP", /* szBoardId */
798 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
799 0x01, /* ucPhyAddress */
800 BP_NOT_DEFINED, /* usGpioPhySpiSck */
801 BP_NOT_DEFINED, /* usGpioPhySpiSs */
802 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
803 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
804 BP_NOT_DEFINED, /* usGpioPhyReset */
805 0x01, /* numSwitchPorts */
806 BP_ENET_CONFIG_MDIO, /* usConfigType */
807 BP_NOT_DEFINED}, /* usReverseMii */
808 {BP_ENET_EXTERNAL_SWITCH, /* ucPhyType */
809 0x00, /* ucPhyAddress */
810 BP_NOT_DEFINED, /* usGpioPhySpiSck */
811 BP_NOT_DEFINED, /* usGpioPhySpiSs */
812 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
813 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
814 BP_NOT_DEFINED, /* usGpioPhyReset */
815 0x03, /* numSwitchPorts */
816 BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */
817 BP_ENET_REVERSE_MII}}, /* usReverseMii */
818 {{BP_VOIP_DSP, /* ucDspType */
819 0x00, /* ucDspAddress */
820 BP_EXT_INTR_2, /* usExtIntrVoip */
821 BP_UNEQUIPPED, /* usGpioVoipReset */
822 BP_GPIO_34_AH, /* usGpioVoipIntr */
823 BP_NOT_DEFINED, /* usGpioLedVoip */
824 BP_CS_2}, /* usCsVoip */
825 {BP_VOIP_DSP, /* ucDspType */
826 0x01, /* ucDspAddress */
827 BP_EXT_INTR_3, /* usExtIntrVoip */
828 BP_UNEQUIPPED , /* usGpioVoipReset */
829 BP_GPIO_35_AH, /* usGpioVoipIntr */
830 BP_NOT_DEFINED, /* usGpioLedVoip */
831 BP_CS_3}}, /* usCsVoip */
832 BP_MEMORY_16MB_2_CHIP, /* usSdramSize */
833 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
834 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
835 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
836 BP_GPIO_33_AL, /* usGpioPressAndHoldReset */
837 BP_NOT_DEFINED, /* usGpioPcmciaReset */
838 BP_NOT_DEFINED, /* usGpioUartRts */
839 BP_NOT_DEFINED, /* usGpioUartCts */
840 BP_NOT_DEFINED, /* usGpioLedAdsl */
841 BP_GPIO_2_AL, /* usGpioLedAdslFail */
842 BP_NOT_DEFINED, /* usGpioLedWireless */
843 BP_NOT_DEFINED, /* usGpioLedUsb */
844 BP_NOT_DEFINED, /* usGpioLedHpna */
845 BP_GPIO_3_AL, /* usGpioLedWanData */
846 BP_GPIO_3_AL, /* usGpioLedPpp */
847 BP_GPIO_4_AL, /* usGpioLedPppFail */
848 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
849 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
850 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
851 BP_GPIO_1_AL, /* usGpioLedBlStop */
852 BP_NOT_DEFINED, /* usExtIntrWireless */
853 BP_HW_DEFINED, /* usExtIntrAdslDyingGasp */
854 BP_NOT_DEFINED, /* usExtIntrHpna */
855 BP_NOT_DEFINED, /* usCsHpna */
856 BP_WLAN_ANT_MAIN, /* usAntInUseWireless */
857 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
858 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
859 BP_NOT_DEFINED /* usGpioLedSesWireless */
863 static BOARD_PARAMETERS g_bcmCustom_01 =
865 "BCMCUST_01", /* szBoardId */
866 {{BP_ENET_INTERNAL_PHY, /* ucPhyType */
867 0x01, /* ucPhyAddress */
868 BP_NOT_DEFINED, /* usGpioPhySpiSck */
869 BP_NOT_DEFINED, /* usGpioPhySpiSs */
870 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
871 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
872 BP_NOT_DEFINED, /* usGpioPhyReset */
873 0x01, /* numSwitchPorts */
874 BP_ENET_CONFIG_MDIO, /* usConfigType */
875 BP_NOT_DEFINED}, /* usReverseMii */
876 {BP_ENET_NO_PHY, /* ucPhyType */
877 0x00, /* ucPhyAddress */
878 BP_NOT_DEFINED, /* usGpioPhySpiSck */
879 BP_NOT_DEFINED, /* usGpioPhySpiSs */
880 BP_NOT_DEFINED, /* usGpioPhySpiMosi */
881 BP_NOT_DEFINED, /* usGpioPhySpiMiso */
882 BP_NOT_DEFINED, /* usGpioPhyReset */
883 0x01, /* numSwitchPorts */
884 BP_ENET_CONFIG_SPI_SSB_1, /* usConfigType */
885 BP_ENET_REVERSE_MII}}, /* usReverseMii */
886 {{BP_VOIP_DSP, /* ucDspType */
887 0x00, /* ucDspAddress */
888 BP_EXT_INTR_2, /* usExtIntrVoip */
889 BP_GPIO_36_AH, /* usGpioVoipReset */
890 BP_GPIO_34_AL, /* usGpioVoipIntr */
891 BP_NOT_DEFINED, /* usGpioLedVoip */
892 BP_CS_2}, /* usCsVoip */
893 {BP_VOIP_NO_DSP}}, /* ucDspType */
894 BP_MEMORY_16MB_2_CHIP, /* usSdramSize */
895 BP_PSI_DEFAULT_SIZE, /* usPsiSize */
896 BP_NOT_DEFINED, /* usGpioRj11InnerPair */
897 BP_NOT_DEFINED, /* usGpioRj11OuterPair */
898 BP_GPIO_33_AL, /* usGpioPressAndHoldReset */
899 BP_NOT_DEFINED, /* usGpioPcmciaReset */
900 BP_NOT_DEFINED, /* usGpioUartRts */
901 BP_NOT_DEFINED, /* usGpioUartCts */
902 BP_NOT_DEFINED, /* usGpioLedAdsl */
903 BP_GPIO_2_AL, /* usGpioLedAdslFail */
904 BP_NOT_DEFINED, /* usGpioLedWireless */
905 BP_NOT_DEFINED, /* usGpioLedUsb */
906 BP_NOT_DEFINED, /* usGpioLedHpna */
907 BP_GPIO_3_AL, /* usGpioLedWanData */
908 BP_GPIO_3_AL, /* usGpioLedPpp */
909 BP_GPIO_4_AL, /* usGpioLedPppFail */
910 BP_GPIO_0_AL, /* usGpioLedBlPowerOn */
911 BP_NOT_DEFINED, /* usGpioLedBlAlarm */
912 BP_GPIO_3_AL, /* usGpioLedBlResetCfg */
913 BP_GPIO_1_AL, /* usGpioLedBlStop */
914 BP_NOT_DEFINED, /* usExtIntrWireless */
915 BP_NOT_DEFINED, /* usExtIntrAdslDyingGasp */
916 BP_NOT_DEFINED, /* usExtIntrHpna */
917 BP_NOT_DEFINED, /* usCsHpna */
918 BP_NOT_DEFINED, /* usAntInUseWireless */
919 BP_NOT_DEFINED, /* usGpioSesBtnWireless */
920 BP_NOT_DEFINED, /* usExtIntrSesBtnWireless */
921 BP_NOT_DEFINED /* usGpioLedSesWireless */
924 static PBOARD_PARAMETERS g_BoardParms[] =
925 {&g_bcm96348r, &g_bcm96348lv, &g_bcm96348gw, &g_bcm96348gw_10,
926 &g_bcm96348gw_11, &g_bcm96348sv, &g_bcm96348gw_dualDsp,
930 static PBOARD_PARAMETERS g_pCurrentBp = 0;
932 /**************************************************************************
935 * Description: String compare for this file so it does not depend on an OS.
936 * (Linux kernel and CFE share this source file.)
938 * Parameters : [IN] dest - destination string
939 * [IN] src - source string
941 * Returns : -1 - dest < src, 1 - dest > src, 0 dest == src
942 ***************************************************************************/
943 static int bpstrcmp(const char *dest,const char *src);
944 static int bpstrcmp(const char *dest,const char *src)
946 while (*src && *dest)
948 if (*dest < *src) return -1;
949 if (*dest > *src) return 1;
954 if (*dest && !*src) return 1;
955 if (!*dest && *src) return -1;
959 /**************************************************************************
960 * Name : BpGetVoipDspConfig
962 * Description: Gets the DSP configuration from the board parameter
963 * structure for a given DSP index.
965 * Parameters : [IN] dspNum - DSP index (number)
967 * Returns : Pointer to DSP configuration block if found/valid, NULL
969 ***************************************************************************/
970 VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum );
971 VOIP_DSP_INFO *BpGetVoipDspConfig( unsigned char dspNum )
973 VOIP_DSP_INFO *pDspConfig = 0;
978 for( i = 0 ; i < BP_MAX_VOIP_DSP ; i++ )
980 if( g_pCurrentBp->VoIPDspInfo[i].ucDspType != BP_VOIP_NO_DSP &&
981 g_pCurrentBp->VoIPDspInfo[i].ucDspAddress == dspNum )
983 pDspConfig = &g_pCurrentBp->VoIPDspInfo[i];
993 /**************************************************************************
994 * Name : BpSetBoardId
996 * Description: This function find the BOARD_PARAMETERS structure for the
997 * specified board id string and assigns it to a global, static
1000 * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM.
1002 * Returns : BP_SUCCESS - Success, value is returned.
1003 * BP_BOARD_ID_NOT_FOUND - Error, board id input string does not
1004 * have a board parameters configuration record.
1005 ***************************************************************************/
1006 int BpSetBoardId( char *pszBoardId )
1008 int nRet = BP_BOARD_ID_NOT_FOUND;
1009 PBOARD_PARAMETERS *ppBp;
1011 for( ppBp = g_BoardParms; *ppBp; ppBp++ )
1013 if( !bpstrcmp((*ppBp)->szBoardId, pszBoardId) )
1015 g_pCurrentBp = *ppBp;
1022 } /* BpSetBoardId */
1024 /**************************************************************************
1025 * Name : BpGetBoardIds
1027 * Description: This function returns all of the supported board id strings.
1029 * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id
1030 * strings are returned in. Each id starts at BP_BOARD_ID_LEN
1032 * [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that
1033 * were allocated in pszBoardIds.
1035 * Returns : Number of board id strings returned.
1036 ***************************************************************************/
1037 int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize )
1039 PBOARD_PARAMETERS *ppBp;
1044 for( i = 0, ppBp = g_BoardParms; *ppBp && nBoardIdsSize;
1045 i++, ppBp++, nBoardIdsSize--, pszBoardIds += BP_BOARD_ID_LEN )
1048 src = (*ppBp)->szBoardId;
1055 } /* BpGetBoardIds */
1057 /**************************************************************************
1058 * Name : BpGetEthernetMacInfo
1060 * Description: This function returns all of the supported board id strings.
1062 * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO
1064 * [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that
1065 * are pointed to by pEnetInfos.
1067 * Returns : BP_SUCCESS - Success, value is returned.
1068 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1069 ***************************************************************************/
1070 int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos )
1076 for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ )
1078 if( i < BP_MAX_ENET_MACS )
1080 unsigned char *src = (unsigned char *)
1081 &g_pCurrentBp->EnetMacInfos[i];
1082 unsigned char *dest = (unsigned char *) pEnetInfos;
1083 int len = sizeof(ETHERNET_MAC_INFO);
1088 pEnetInfos->ucPhyType = BP_ENET_NO_PHY;
1095 for( i = 0; i < nNumEnetInfos; i++, pEnetInfos++ )
1096 pEnetInfos->ucPhyType = BP_ENET_NO_PHY;
1098 nRet = BP_BOARD_ID_NOT_SET;
1102 } /* BpGetEthernetMacInfo */
1104 /**************************************************************************
1105 * Name : BpGetSdramSize
1107 * Description: This function returns a constant that describees the board's
1108 * SDRAM type and size.
1110 * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size
1113 * Returns : BP_SUCCESS - Success, value is returned.
1114 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1115 ***************************************************************************/
1116 int BpGetSdramSize( unsigned long *pulSdramSize )
1122 *pulSdramSize = g_pCurrentBp->usSdramSize;
1127 *pulSdramSize = BP_NOT_DEFINED;
1128 nRet = BP_BOARD_ID_NOT_SET;
1132 } /* BpGetSdramSize */
1134 /**************************************************************************
1135 * Name : BpGetPsiSize
1137 * Description: This function returns the persistent storage size in K bytes.
1139 * Parameters : [OUT] pulPsiSize - Address of short word that the persistent
1140 * storage size is returned in.
1142 * Returns : BP_SUCCESS - Success, value is returned.
1143 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1144 ***************************************************************************/
1145 int BpGetPsiSize( unsigned long *pulPsiSize )
1151 *pulPsiSize = g_pCurrentBp->usPsiSize;
1156 *pulPsiSize = BP_NOT_DEFINED;
1157 nRet = BP_BOARD_ID_NOT_SET;
1161 } /* BpGetPsiSize */
1163 /**************************************************************************
1164 * Name : BpGetRj11InnerOuterPairGpios
1166 * Description: This function returns the GPIO pin assignments for changing
1167 * between the RJ11 inner pair and RJ11 outer pair.
1169 * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair
1170 * GPIO pin is returned in.
1171 * [OUT] pusOuter - Address of short word that the RJ11 outer pair
1172 * GPIO pin is returned in.
1174 * Returns : BP_SUCCESS - Success, values are returned.
1175 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1176 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1178 ***************************************************************************/
1179 int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner,
1180 unsigned short *pusOuter )
1186 *pusInner = g_pCurrentBp->usGpioRj11InnerPair;
1187 *pusOuter = g_pCurrentBp->usGpioRj11OuterPair;
1189 if( g_pCurrentBp->usGpioRj11InnerPair != BP_NOT_DEFINED &&
1190 g_pCurrentBp->usGpioRj11OuterPair != BP_NOT_DEFINED )
1196 nRet = BP_VALUE_NOT_DEFINED;
1201 *pusInner = *pusOuter = BP_NOT_DEFINED;
1202 nRet = BP_BOARD_ID_NOT_SET;
1206 } /* BpGetRj11InnerOuterPairGpios */
1208 /**************************************************************************
1209 * Name : BpGetPressAndHoldResetGpio
1211 * Description: This function returns the GPIO pin assignment for the press
1212 * and hold reset button.
1214 * Parameters : [OUT] pusValue - Address of short word that the press and hold
1215 * reset button GPIO pin is returned in.
1217 * Returns : BP_SUCCESS - Success, value is returned.
1218 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1219 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1221 ***************************************************************************/
1222 int BpGetPressAndHoldResetGpio( unsigned short *pusValue )
1228 *pusValue = g_pCurrentBp->usGpioPressAndHoldReset;
1230 if( g_pCurrentBp->usGpioPressAndHoldReset != BP_NOT_DEFINED )
1236 nRet = BP_VALUE_NOT_DEFINED;
1241 *pusValue = BP_NOT_DEFINED;
1242 nRet = BP_BOARD_ID_NOT_SET;
1246 } /* BpGetPressAndHoldResetGpio */
1248 /**************************************************************************
1249 * Name : BpGetVoipResetGpio
1251 * Description: This function returns the GPIO pin assignment for the VOIP
1254 * Parameters : [OUT] pusValue - Address of short word that the VOIP reset
1255 * GPIO pin is returned in.
1256 * [IN] dspNum - Address of the DSP to query.
1258 * Returns : BP_SUCCESS - Success, value is returned.
1259 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1260 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1262 ***************************************************************************/
1263 int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue )
1269 VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum );
1273 *pusValue = pDspInfo->usGpioVoipReset;
1275 if( *pusValue != BP_NOT_DEFINED ||
1276 *pusValue == BP_UNEQUIPPED )
1282 nRet = BP_VALUE_NOT_DEFINED;
1287 *pusValue = BP_NOT_DEFINED;
1288 nRet = BP_BOARD_ID_NOT_FOUND;
1293 *pusValue = BP_NOT_DEFINED;
1294 nRet = BP_BOARD_ID_NOT_SET;
1298 } /* BpGetVoipResetGpio */
1300 /**************************************************************************
1301 * Name : BpGetVoipIntrGpio
1303 * Description: This function returns the GPIO pin assignment for VoIP interrupt.
1305 * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt
1306 * GPIO pin is returned in.
1307 * [IN] dspNum - Address of the DSP to query.
1309 * Returns : BP_SUCCESS - Success, value is returned.
1310 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1311 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1313 ***************************************************************************/
1314 int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue )
1320 VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum );
1324 *pusValue = pDspInfo->usGpioVoipIntr;
1326 if( *pusValue != BP_NOT_DEFINED )
1332 nRet = BP_VALUE_NOT_DEFINED;
1337 *pusValue = BP_NOT_DEFINED;
1338 nRet = BP_BOARD_ID_NOT_FOUND;
1343 *pusValue = BP_NOT_DEFINED;
1344 nRet = BP_BOARD_ID_NOT_SET;
1348 } /* BpGetVoipIntrGpio */
1350 /**************************************************************************
1351 * Name : BpGetPcmciaResetGpio
1353 * Description: This function returns the GPIO pin assignment for the PCMCIA
1356 * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset
1357 * GPIO pin is returned in.
1359 * Returns : BP_SUCCESS - Success, value is 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 BpGetPcmciaResetGpio( unsigned short *pusValue )
1370 *pusValue = g_pCurrentBp->usGpioPcmciaReset;
1372 if( g_pCurrentBp->usGpioPcmciaReset != BP_NOT_DEFINED )
1378 nRet = BP_VALUE_NOT_DEFINED;
1383 *pusValue = BP_NOT_DEFINED;
1384 nRet = BP_BOARD_ID_NOT_SET;
1388 } /* BpGetPcmciaResetGpio */
1390 /**************************************************************************
1391 * Name : BpGetUartRtsCtsGpios
1393 * Description: This function returns the GPIO pin assignments for RTS and CTS
1396 * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO
1397 * pin is returned in.
1398 * [OUT] pusCts - Address of short word that the UART CTS GPIO
1399 * pin is returned in.
1401 * Returns : BP_SUCCESS - Success, values are returned.
1402 * BP_BOARD_ID_NOT_SET - Error, board id input string does not
1403 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1405 ***************************************************************************/
1406 int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts )
1412 *pusRts = g_pCurrentBp->usGpioUartRts;
1413 *pusCts = g_pCurrentBp->usGpioUartCts;
1415 if( g_pCurrentBp->usGpioUartRts != BP_NOT_DEFINED &&
1416 g_pCurrentBp->usGpioUartCts != BP_NOT_DEFINED )
1422 nRet = BP_VALUE_NOT_DEFINED;
1427 *pusRts = *pusCts = BP_NOT_DEFINED;
1428 nRet = BP_BOARD_ID_NOT_SET;
1432 } /* BpGetUartRtsCtsGpios */
1434 /**************************************************************************
1435 * Name : BpGetAdslLedGpio
1437 * Description: This function returns the GPIO pin assignment for the ADSL
1440 * Parameters : [OUT] pusValue - Address of short word that the ADSL LED
1441 * GPIO pin is returned in.
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 BpGetAdslLedGpio( unsigned short *pusValue )
1454 *pusValue = g_pCurrentBp->usGpioLedAdsl;
1456 if( g_pCurrentBp->usGpioLedAdsl != BP_NOT_DEFINED )
1462 nRet = BP_VALUE_NOT_DEFINED;
1467 *pusValue = BP_NOT_DEFINED;
1468 nRet = BP_BOARD_ID_NOT_SET;
1472 } /* BpGetAdslLedGpio */
1474 /**************************************************************************
1475 * Name : BpGetAdslFailLedGpio
1477 * Description: This function returns the GPIO pin assignment for the ADSL
1478 * LED that is used when there is a DSL connection failure.
1480 * Parameters : [OUT] pusValue - Address of short word that the ADSL LED
1481 * GPIO pin is returned in.
1483 * Returns : BP_SUCCESS - Success, value is returned.
1484 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1485 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1487 ***************************************************************************/
1488 int BpGetAdslFailLedGpio( unsigned short *pusValue )
1494 *pusValue = g_pCurrentBp->usGpioLedAdslFail;
1496 if( g_pCurrentBp->usGpioLedAdslFail != BP_NOT_DEFINED )
1502 nRet = BP_VALUE_NOT_DEFINED;
1507 *pusValue = BP_NOT_DEFINED;
1508 nRet = BP_BOARD_ID_NOT_SET;
1512 } /* BpGetAdslFailLedGpio */
1514 /**************************************************************************
1515 * Name : BpGetWirelessLedGpio
1517 * Description: This function returns the GPIO pin assignment for the Wireless
1520 * Parameters : [OUT] pusValue - Address of short word that the Wireless LED
1521 * GPIO pin is returned in.
1523 * Returns : BP_SUCCESS - Success, value is returned.
1524 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1525 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1527 ***************************************************************************/
1528 int BpGetWirelessLedGpio( unsigned short *pusValue )
1534 *pusValue = g_pCurrentBp->usGpioLedWireless;
1536 if( g_pCurrentBp->usGpioLedWireless != BP_NOT_DEFINED )
1542 nRet = BP_VALUE_NOT_DEFINED;
1547 *pusValue = BP_NOT_DEFINED;
1548 nRet = BP_BOARD_ID_NOT_SET;
1552 } /* BpGetWirelessLedGpio */
1554 /**************************************************************************
1555 * Name : BpGetWirelessAntInUse
1557 * Description: This function returns the antennas in use for wireless
1559 * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna
1562 * Returns : BP_SUCCESS - Success, value is returned.
1563 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1564 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1566 ***************************************************************************/
1567 int BpGetWirelessAntInUse( unsigned short *pusValue )
1573 *pusValue = g_pCurrentBp->usAntInUseWireless;
1575 if( g_pCurrentBp->usAntInUseWireless != BP_NOT_DEFINED )
1581 nRet = BP_VALUE_NOT_DEFINED;
1586 *pusValue = BP_NOT_DEFINED;
1587 nRet = BP_BOARD_ID_NOT_SET;
1591 } /* BpGetWirelessAntInUse */
1593 /**************************************************************************
1594 * Name : BpGetWirelessSesBtnGpio
1596 * Description: This function returns the GPIO pin assignment for the Wireless
1599 * Parameters : [OUT] pusValue - Address of short word that the Wireless LED
1600 * GPIO pin is returned in.
1602 * Returns : BP_SUCCESS - Success, value is returned.
1603 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1604 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1606 ***************************************************************************/
1607 int BpGetWirelessSesBtnGpio( unsigned short *pusValue )
1613 *pusValue = g_pCurrentBp->usGpioSesBtnWireless;
1615 if( g_pCurrentBp->usGpioSesBtnWireless != BP_NOT_DEFINED )
1621 nRet = BP_VALUE_NOT_DEFINED;
1626 *pusValue = BP_NOT_DEFINED;
1627 nRet = BP_BOARD_ID_NOT_SET;
1631 } /* BpGetWirelessSesBtnGpio */
1633 /**************************************************************************
1634 * Name : BpGetWirelessSesExtIntr
1636 * Description: This function returns the external interrupt number for the
1637 * Wireless Ses Button.
1639 * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses
1640 * external interrup is returned in.
1642 * Returns : BP_SUCCESS - Success, value is returned.
1643 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1644 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1646 ***************************************************************************/
1647 int BpGetWirelessSesExtIntr( unsigned short *pusValue )
1653 *pusValue = g_pCurrentBp->usExtIntrSesBtnWireless;
1655 if( g_pCurrentBp->usExtIntrSesBtnWireless != BP_NOT_DEFINED )
1661 nRet = BP_VALUE_NOT_DEFINED;
1666 *pusValue = BP_NOT_DEFINED;
1667 nRet = BP_BOARD_ID_NOT_SET;
1672 } /* BpGetWirelessSesExtIntr */
1674 /**************************************************************************
1675 * Name : BpGetWirelessSesLedGpio
1677 * Description: This function returns the GPIO pin assignment for the Wireless
1680 * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses
1681 * Led GPIO pin is returned in.
1683 * Returns : BP_SUCCESS - Success, value is returned.
1684 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1685 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1687 ***************************************************************************/
1688 int BpGetWirelessSesLedGpio( unsigned short *pusValue )
1694 *pusValue = g_pCurrentBp->usGpioLedSesWireless;
1696 if( g_pCurrentBp->usGpioLedSesWireless != BP_NOT_DEFINED )
1702 nRet = BP_VALUE_NOT_DEFINED;
1707 *pusValue = BP_NOT_DEFINED;
1708 nRet = BP_BOARD_ID_NOT_SET;
1713 } /* BpGetWirelessSesLedGpio */
1715 /**************************************************************************
1716 * Name : BpGetUsbLedGpio
1718 * Description: This function returns the GPIO pin assignment for the USB
1721 * Parameters : [OUT] pusValue - Address of short word that the USB LED
1722 * GPIO pin is returned in.
1724 * Returns : BP_SUCCESS - Success, value is returned.
1725 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1726 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1728 ***************************************************************************/
1729 int BpGetUsbLedGpio( unsigned short *pusValue )
1735 *pusValue = g_pCurrentBp->usGpioLedUsb;
1737 if( g_pCurrentBp->usGpioLedUsb != BP_NOT_DEFINED )
1743 nRet = BP_VALUE_NOT_DEFINED;
1748 *pusValue = BP_NOT_DEFINED;
1749 nRet = BP_BOARD_ID_NOT_SET;
1753 } /* BpGetUsbLedGpio */
1755 /**************************************************************************
1756 * Name : BpGetHpnaLedGpio
1758 * Description: This function returns the GPIO pin assignment for the HPNA
1761 * Parameters : [OUT] pusValue - Address of short word that the HPNA LED
1762 * GPIO pin is returned in.
1764 * Returns : BP_SUCCESS - Success, value is returned.
1765 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1766 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1768 ***************************************************************************/
1769 int BpGetHpnaLedGpio( unsigned short *pusValue )
1775 *pusValue = g_pCurrentBp->usGpioLedHpna;
1777 if( g_pCurrentBp->usGpioLedHpna != BP_NOT_DEFINED )
1783 nRet = BP_VALUE_NOT_DEFINED;
1788 *pusValue = BP_NOT_DEFINED;
1789 nRet = BP_BOARD_ID_NOT_SET;
1793 } /* BpGetHpnaLedGpio */
1795 /**************************************************************************
1796 * Name : BpGetWanDataLedGpio
1798 * Description: This function returns the GPIO pin assignment for the WAN Data
1801 * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED
1802 * GPIO pin is returned in.
1804 * Returns : BP_SUCCESS - Success, value is returned.
1805 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1806 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1808 ***************************************************************************/
1809 int BpGetWanDataLedGpio( unsigned short *pusValue )
1815 *pusValue = g_pCurrentBp->usGpioLedWanData;
1817 if( g_pCurrentBp->usGpioLedWanData != BP_NOT_DEFINED )
1823 nRet = BP_VALUE_NOT_DEFINED;
1828 *pusValue = BP_NOT_DEFINED;
1829 nRet = BP_BOARD_ID_NOT_SET;
1833 } /* BpGetWanDataLedGpio */
1835 /**************************************************************************
1836 * Name : BpGetPppLedGpio
1838 * Description: This function returns the GPIO pin assignment for the PPP
1841 * Parameters : [OUT] pusValue - Address of short word that the PPP LED
1842 * GPIO pin is returned in.
1844 * Returns : BP_SUCCESS - Success, value is returned.
1845 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1846 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1848 ***************************************************************************/
1849 int BpGetPppLedGpio( unsigned short *pusValue )
1855 *pusValue = g_pCurrentBp->usGpioLedPpp;
1857 if( g_pCurrentBp->usGpioLedPpp != BP_NOT_DEFINED )
1863 nRet = BP_VALUE_NOT_DEFINED;
1868 *pusValue = BP_NOT_DEFINED;
1869 nRet = BP_BOARD_ID_NOT_SET;
1873 } /* BpGetPppLedGpio */
1875 /**************************************************************************
1876 * Name : BpGetPppFailLedGpio
1878 * Description: This function returns the GPIO pin assignment for the PPP
1879 * LED that is used when there is a PPP connection failure.
1881 * Parameters : [OUT] pusValue - Address of short word that the PPP LED
1882 * GPIO pin is returned in.
1884 * Returns : BP_SUCCESS - Success, value is returned.
1885 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1886 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1888 ***************************************************************************/
1889 int BpGetPppFailLedGpio( unsigned short *pusValue )
1895 *pusValue = g_pCurrentBp->usGpioLedPppFail;
1897 if( g_pCurrentBp->usGpioLedPppFail != BP_NOT_DEFINED )
1903 nRet = BP_VALUE_NOT_DEFINED;
1908 *pusValue = BP_NOT_DEFINED;
1909 nRet = BP_BOARD_ID_NOT_SET;
1913 } /* BpGetPppFailLedGpio */
1915 /**************************************************************************
1916 * Name : BpGetBootloaderPowerOnLedGpio
1918 * Description: This function returns the GPIO pin assignment for the power
1919 * on LED that is set by the bootloader.
1921 * Parameters : [OUT] pusValue - Address of short word that the alarm LED
1922 * GPIO pin is returned in.
1924 * Returns : BP_SUCCESS - Success, value is returned.
1925 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1926 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1928 ***************************************************************************/
1929 int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue )
1935 *pusValue = g_pCurrentBp->usGpioLedBlPowerOn;
1937 if( g_pCurrentBp->usGpioLedBlPowerOn != BP_NOT_DEFINED )
1943 nRet = BP_VALUE_NOT_DEFINED;
1948 *pusValue = BP_NOT_DEFINED;
1949 nRet = BP_BOARD_ID_NOT_SET;
1953 } /* BpGetBootloaderPowerOn */
1955 /**************************************************************************
1956 * Name : BpGetBootloaderAlarmLedGpio
1958 * Description: This function returns the GPIO pin assignment for the alarm
1959 * LED that is set by the bootloader.
1961 * Parameters : [OUT] pusValue - Address of short word that the alarm LED
1962 * GPIO pin is returned in.
1964 * Returns : BP_SUCCESS - Success, value is returned.
1965 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
1966 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
1968 ***************************************************************************/
1969 int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue )
1975 *pusValue = g_pCurrentBp->usGpioLedBlAlarm;
1977 if( g_pCurrentBp->usGpioLedBlAlarm != BP_NOT_DEFINED )
1983 nRet = BP_VALUE_NOT_DEFINED;
1988 *pusValue = BP_NOT_DEFINED;
1989 nRet = BP_BOARD_ID_NOT_SET;
1993 } /* BpGetBootloaderAlarmLedGpio */
1995 /**************************************************************************
1996 * Name : BpGetBootloaderResetCfgLedGpio
1998 * Description: This function returns the GPIO pin assignment for the reset
1999 * configuration LED that is set by the bootloader.
2001 * Parameters : [OUT] pusValue - Address of short word that the reset
2002 * configuration LED GPIO pin is returned in.
2004 * Returns : BP_SUCCESS - Success, value is returned.
2005 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2006 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2008 ***************************************************************************/
2009 int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue )
2015 *pusValue = g_pCurrentBp->usGpioLedBlResetCfg;
2017 if( g_pCurrentBp->usGpioLedBlResetCfg != BP_NOT_DEFINED )
2023 nRet = BP_VALUE_NOT_DEFINED;
2028 *pusValue = BP_NOT_DEFINED;
2029 nRet = BP_BOARD_ID_NOT_SET;
2033 } /* BpGetBootloaderResetCfgLedGpio */
2035 /**************************************************************************
2036 * Name : BpGetBootloaderStopLedGpio
2038 * Description: This function returns the GPIO pin assignment for the break
2039 * into bootloader LED that is set by the bootloader.
2041 * Parameters : [OUT] pusValue - Address of short word that the break into
2042 * bootloader LED GPIO pin is returned in.
2044 * Returns : BP_SUCCESS - Success, value is returned.
2045 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2046 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2048 ***************************************************************************/
2049 int BpGetBootloaderStopLedGpio( unsigned short *pusValue )
2055 *pusValue = g_pCurrentBp->usGpioLedBlStop;
2057 if( g_pCurrentBp->usGpioLedBlStop != BP_NOT_DEFINED )
2063 nRet = BP_VALUE_NOT_DEFINED;
2068 *pusValue = BP_NOT_DEFINED;
2069 nRet = BP_BOARD_ID_NOT_SET;
2073 } /* BpGetBootloaderStopLedGpio */
2075 /**************************************************************************
2076 * Name : BpGetVoipLedGpio
2078 * Description: This function returns the GPIO pin assignment for the VOIP
2081 * Parameters : [OUT] pusValue - Address of short word that the VOIP LED
2082 * GPIO pin is returned in.
2084 * Returns : BP_SUCCESS - Success, value is returned.
2085 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2086 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2089 * Note : The VoIP structure would allow for having one LED per DSP
2090 * however, the board initialization function assumes only one
2091 * LED per functionality (ie one LED for VoIP). Therefore in
2092 * order to keep this tidy and simple we do not make usage of the
2093 * one-LED-per-DSP function. Instead, we assume that the LED for
2094 * VoIP is unique and associated with DSP 0 (always present on
2095 * any VoIP platform). If changing this to a LED-per-DSP function
2096 * then one need to update the board initialization driver in
2097 * bcmdrivers\opensource\char\board\bcm963xx\impl1
2098 ***************************************************************************/
2099 int BpGetVoipLedGpio( unsigned short *pusValue )
2105 VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( 0 );
2109 *pusValue = pDspInfo->usGpioLedVoip;
2111 if( *pusValue != BP_NOT_DEFINED )
2117 nRet = BP_VALUE_NOT_DEFINED;
2122 *pusValue = BP_NOT_DEFINED;
2123 nRet = BP_BOARD_ID_NOT_FOUND;
2128 *pusValue = BP_NOT_DEFINED;
2129 nRet = BP_BOARD_ID_NOT_SET;
2133 } /* BpGetVoipLedGpio */
2135 /**************************************************************************
2136 * Name : BpGetWirelessExtIntr
2138 * Description: This function returns the Wireless external interrupt number.
2140 * Parameters : [OUT] pulValue - Address of short word that the wireless
2141 * external interrupt number is returned in.
2143 * Returns : BP_SUCCESS - Success, value is returned.
2144 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2145 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2147 ***************************************************************************/
2148 int BpGetWirelessExtIntr( unsigned long *pulValue )
2154 *pulValue = g_pCurrentBp->usExtIntrWireless;
2156 if( g_pCurrentBp->usExtIntrWireless != BP_NOT_DEFINED )
2162 nRet = BP_VALUE_NOT_DEFINED;
2167 *pulValue = BP_NOT_DEFINED;
2168 nRet = BP_BOARD_ID_NOT_SET;
2172 } /* BpGetWirelessExtIntr */
2174 /**************************************************************************
2175 * Name : BpGetAdslDyingGaspExtIntr
2177 * Description: This function returns the ADSL Dying Gasp external interrupt
2180 * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp
2181 * external interrupt number is returned in.
2183 * Returns : BP_SUCCESS - Success, value is returned.
2184 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2185 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2187 ***************************************************************************/
2188 int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue )
2194 *pulValue = g_pCurrentBp->usExtIntrAdslDyingGasp;
2196 if( g_pCurrentBp->usExtIntrAdslDyingGasp != BP_NOT_DEFINED )
2202 nRet = BP_VALUE_NOT_DEFINED;
2207 *pulValue = BP_NOT_DEFINED;
2208 nRet = BP_BOARD_ID_NOT_SET;
2212 } /* BpGetAdslDyingGaspExtIntr */
2214 /**************************************************************************
2215 * Name : BpGetVoipExtIntr
2217 * Description: This function returns the VOIP external interrupt number.
2219 * Parameters : [OUT] pulValue - Address of short word that the VOIP
2220 * external interrupt number is returned in.
2221 * [IN] dspNum - Address of the DSP to query.
2223 * Returns : BP_SUCCESS - Success, value is returned.
2224 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2225 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2227 ***************************************************************************/
2228 int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue )
2234 VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum );
2238 *pulValue = pDspInfo->usExtIntrVoip;
2240 if( *pulValue != BP_NOT_DEFINED )
2246 nRet = BP_VALUE_NOT_DEFINED;
2251 *pulValue = BP_NOT_DEFINED;
2252 nRet = BP_BOARD_ID_NOT_FOUND;
2257 *pulValue = BP_NOT_DEFINED;
2258 nRet = BP_BOARD_ID_NOT_SET;
2262 } /* BpGetVoipExtIntr */
2264 /**************************************************************************
2265 * Name : BpGetHpnaExtIntr
2267 * Description: This function returns the HPNA external interrupt number.
2269 * Parameters : [OUT] pulValue - Address of short word that the HPNA
2270 * external interrupt number is returned in.
2272 * Returns : BP_SUCCESS - Success, value is returned.
2273 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2274 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2276 ***************************************************************************/
2277 int BpGetHpnaExtIntr( unsigned long *pulValue )
2283 *pulValue = g_pCurrentBp->usExtIntrHpna;
2285 if( g_pCurrentBp->usExtIntrHpna != BP_NOT_DEFINED )
2291 nRet = BP_VALUE_NOT_DEFINED;
2296 *pulValue = BP_NOT_DEFINED;
2297 nRet = BP_BOARD_ID_NOT_SET;
2301 } /* BpGetHpnaExtIntr */
2303 /**************************************************************************
2304 * Name : BpGetHpnaChipSelect
2306 * Description: This function returns the HPNA chip select number.
2308 * Parameters : [OUT] pulValue - Address of short word that the HPNA
2309 * chip select number is returned in.
2311 * Returns : BP_SUCCESS - Success, value is returned.
2312 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2313 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2315 ***************************************************************************/
2316 int BpGetHpnaChipSelect( unsigned long *pulValue )
2322 *pulValue = g_pCurrentBp->usCsHpna;
2324 if( g_pCurrentBp->usCsHpna != BP_NOT_DEFINED )
2330 nRet = BP_VALUE_NOT_DEFINED;
2335 *pulValue = BP_NOT_DEFINED;
2336 nRet = BP_BOARD_ID_NOT_SET;
2340 } /* BpGetHpnaChipSelect */
2342 /**************************************************************************
2343 * Name : BpGetVoipChipSelect
2345 * Description: This function returns the VOIP chip select number.
2347 * Parameters : [OUT] pulValue - Address of short word that the VOIP
2348 * chip select number is returned in.
2349 * [IN] dspNum - Address of the DSP to query.
2351 * Returns : BP_SUCCESS - Success, value is returned.
2352 * BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
2353 * BP_VALUE_NOT_DEFINED - At least one return value is not defined
2355 ***************************************************************************/
2356 int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue )
2362 VOIP_DSP_INFO *pDspInfo = BpGetVoipDspConfig( dspNum );
2366 *pulValue = pDspInfo->usCsVoip;
2368 if( *pulValue != BP_NOT_DEFINED )
2374 nRet = BP_VALUE_NOT_DEFINED;
2379 *pulValue = BP_NOT_DEFINED;
2380 nRet = BP_BOARD_ID_NOT_FOUND;
2385 *pulValue = BP_NOT_DEFINED;
2386 nRet = BP_BOARD_ID_NOT_SET;
2390 } /* BpGetVoipChipSelect */