define number of ports on ethernet switch
[bcm963xx.git] / targets / boardparms / bcm963xx / boardparms.h
1 /*
2 <:copyright-gpl 
3
4  Copyright 2003 Broadcom Corp. All Rights Reserved. 
5  
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. 
9  
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 
13  for more details. 
14  
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. 
18
19 :>
20 */
21 /**************************************************************************
22  * File Name  : boardparms.h
23  *
24  * Description: This file contains definitions and function prototypes for
25  *              the BCM63xx board parameter access functions.
26  * 
27  * Updates    : 07/14/2003  Created.
28  ***************************************************************************/
29
30 #if !defined(_BOARDPARMS_H)
31 #define _BOARDPARMS_H
32
33 #if __cplusplus
34 extern "C" {
35 #endif
36
37 /* Return codes. */
38 #define BP_SUCCESS                              0
39 #define BP_BOARD_ID_NOT_FOUND                   1
40 #define BP_VALUE_NOT_DEFINED                    2
41 #define BP_BOARD_ID_NOT_SET                     3
42
43 /* Values for BpGetSdramSize. */
44 #define BP_MEMORY_8MB_1_CHIP                    0
45 #define BP_MEMORY_16MB_1_CHIP                   1
46 #define BP_MEMORY_32MB_1_CHIP                   2
47 #define BP_MEMORY_64MB_2_CHIP                   3
48 #define BP_MEMORY_32MB_2_CHIP                   4
49 #define BP_MEMORY_16MB_2_CHIP                   5
50
51 /* Values for EthernetMacInfo PhyType. */
52 #define BP_ENET_NO_PHY                          0
53 #define BP_ENET_INTERNAL_PHY                    1
54 #define BP_ENET_EXTERNAL_PHY                    2
55 #define BP_ENET_EXTERNAL_SWITCH                 3
56
57 /* Number of ports on switch */
58 #define BP_NO_SWITCH                            2
59
60 /* Values for EthernetMacInfo Configuration type. */
61 #define BP_ENET_CONFIG_MDIO                     0       /* Internal PHY, External PHY, Switch+(no GPIO, no SPI, no MDIO Pseudo phy */
62 #define BP_ENET_CONFIG_GPIO                     1       /* Bcm96345GW board + Bcm5325M/E */
63 #define BP_ENET_CONFIG_MDIO_PSEUDO_PHY          2       /* Bcm96348GW board + Bcm5325E */
64 #define BP_ENET_CONFIG_SPI_SSB_0                3       /* Bcm96348GW board + Bcm5325M/E */
65 #define BP_ENET_CONFIG_SPI_SSB_1                4       /* Bcm96348GW board + Bcm5325M/E */
66 #define BP_ENET_CONFIG_SPI_SSB_2                5       /* Bcm96348GW board + Bcm5325M/E */
67 #define BP_ENET_CONFIG_SPI_SSB_3                6       /* Bcm96348GW board + Bcm5325M/E */
68
69 /* Values for EthernetMacInfo Reverse MII. */
70 #define BP_ENET_NO_REVERSE_MII                  0
71 #define BP_ENET_REVERSE_MII                     1
72
73 /* Values for VoIPDSPInfo DSPType. */
74 #define BP_VOIP_NO_DSP                          0
75 #define BP_VOIP_DSP                             1
76
77
78 /* Values for GPIO pin assignments (AH = Active High, AL = Active Low). */
79 #define BP_ACTIVE_MASK                          0x8000
80 #define BP_ACTIVE_HIGH                          0x0000
81 #define BP_ACTIVE_LOW                           0x8000
82 #define BP_GPIO_0_AH                            (0  | BP_ACTIVE_HIGH)
83 #define BP_GPIO_0_AL                            (0  | BP_ACTIVE_LOW)
84 #define BP_GPIO_1_AH                            (1  | BP_ACTIVE_HIGH)
85 #define BP_GPIO_1_AL                            (1  | BP_ACTIVE_LOW)
86 #define BP_GPIO_2_AH                            (2  | BP_ACTIVE_HIGH)
87 #define BP_GPIO_2_AL                            (2  | BP_ACTIVE_LOW)
88 #define BP_GPIO_3_AH                            (3  | BP_ACTIVE_HIGH)
89 #define BP_GPIO_3_AL                            (3  | BP_ACTIVE_LOW)
90 #define BP_GPIO_4_AH                            (4  | BP_ACTIVE_HIGH)
91 #define BP_GPIO_4_AL                            (4  | BP_ACTIVE_LOW)
92 #define BP_GPIO_5_AH                            (5  | BP_ACTIVE_HIGH)
93 #define BP_GPIO_5_AL                            (5  | BP_ACTIVE_LOW)
94 #define BP_GPIO_6_AH                            (6  | BP_ACTIVE_HIGH)
95 #define BP_GPIO_6_AL                            (6  | BP_ACTIVE_LOW)
96 #define BP_GPIO_7_AH                            (7  | BP_ACTIVE_HIGH)
97 #define BP_GPIO_7_AL                            (7  | BP_ACTIVE_LOW)
98 #define BP_GPIO_8_AH                            (8  | BP_ACTIVE_HIGH)
99 #define BP_GPIO_8_AL                            (8  | BP_ACTIVE_LOW)
100 #define BP_GPIO_9_AH                            (9  | BP_ACTIVE_HIGH)
101 #define BP_GPIO_9_AL                            (9  | BP_ACTIVE_LOW)
102 #define BP_GPIO_10_AH                           (10 | BP_ACTIVE_HIGH)
103 #define BP_GPIO_10_AL                           (10 | BP_ACTIVE_LOW)
104 #define BP_GPIO_11_AH                           (11 | BP_ACTIVE_HIGH)
105 #define BP_GPIO_11_AL                           (11 | BP_ACTIVE_LOW)
106 #define BP_GPIO_12_AH                           (12 | BP_ACTIVE_HIGH)
107 #define BP_GPIO_12_AL                           (12 | BP_ACTIVE_LOW)
108 #define BP_GPIO_13_AH                           (13 | BP_ACTIVE_HIGH)
109 #define BP_GPIO_13_AL                           (13 | BP_ACTIVE_LOW)
110 #define BP_GPIO_14_AH                           (14 | BP_ACTIVE_HIGH)
111 #define BP_GPIO_14_AL                           (14 | BP_ACTIVE_LOW)
112 #define BP_GPIO_15_AH                           (15 | BP_ACTIVE_HIGH)
113 #define BP_GPIO_15_AL                           (15 | BP_ACTIVE_LOW)
114 #define BP_GPIO_16_AH                           (16 | BP_ACTIVE_HIGH)
115 #define BP_GPIO_16_AL                           (16 | BP_ACTIVE_LOW)
116 #define BP_GPIO_17_AH                           (17 | BP_ACTIVE_HIGH)
117 #define BP_GPIO_17_AL                           (17 | BP_ACTIVE_LOW)
118 #define BP_GPIO_18_AH                           (18 | BP_ACTIVE_HIGH)
119 #define BP_GPIO_18_AL                           (18 | BP_ACTIVE_LOW)
120 #define BP_GPIO_19_AH                           (19 | BP_ACTIVE_HIGH)
121 #define BP_GPIO_19_AL                           (19 | BP_ACTIVE_LOW)
122 #define BP_GPIO_20_AH                           (20 | BP_ACTIVE_HIGH)
123 #define BP_GPIO_20_AL                           (20 | BP_ACTIVE_LOW)
124 #define BP_GPIO_21_AH                           (21 | BP_ACTIVE_HIGH)
125 #define BP_GPIO_21_AL                           (21 | BP_ACTIVE_LOW)
126 #define BP_GPIO_22_AH                           (22 | BP_ACTIVE_HIGH)
127 #define BP_GPIO_22_AL                           (22 | BP_ACTIVE_LOW)
128 #define BP_GPIO_23_AH                           (23 | BP_ACTIVE_HIGH)
129 #define BP_GPIO_23_AL                           (23 | BP_ACTIVE_LOW)
130 #define BP_GPIO_24_AH                           (24 | BP_ACTIVE_HIGH)
131 #define BP_GPIO_24_AL                           (24 | BP_ACTIVE_LOW)
132 #define BP_GPIO_25_AH                           (25 | BP_ACTIVE_HIGH)
133 #define BP_GPIO_25_AL                           (25 | BP_ACTIVE_LOW)
134 #define BP_GPIO_26_AH                           (26 | BP_ACTIVE_HIGH)
135 #define BP_GPIO_26_AL                           (26 | BP_ACTIVE_LOW)
136 #define BP_GPIO_27_AH                           (27 | BP_ACTIVE_HIGH)
137 #define BP_GPIO_27_AL                           (27 | BP_ACTIVE_LOW)
138 #define BP_GPIO_28_AH                           (28 | BP_ACTIVE_HIGH)
139 #define BP_GPIO_28_AL                           (28 | BP_ACTIVE_LOW)
140 #define BP_GPIO_29_AH                           (29 | BP_ACTIVE_HIGH)
141 #define BP_GPIO_29_AL                           (29 | BP_ACTIVE_LOW)
142 #define BP_GPIO_30_AH                           (30 | BP_ACTIVE_HIGH)
143 #define BP_GPIO_30_AL                           (30 | BP_ACTIVE_LOW)
144 #define BP_GPIO_31_AH                           (31 | BP_ACTIVE_HIGH)
145 #define BP_GPIO_31_AL                           (31 | BP_ACTIVE_LOW)
146 #define BP_GPIO_32_AH                           (32 | BP_ACTIVE_HIGH)
147 #define BP_GPIO_32_AL                           (32 | BP_ACTIVE_LOW)
148 #define BP_GPIO_33_AH                           (33 | BP_ACTIVE_HIGH)
149 #define BP_GPIO_33_AL                           (33 | BP_ACTIVE_LOW)
150 #define BP_GPIO_34_AH                           (34 | BP_ACTIVE_HIGH)
151 #define BP_GPIO_34_AL                           (34 | BP_ACTIVE_LOW)
152 #define BP_GPIO_35_AH                           (35 | BP_ACTIVE_HIGH)
153 #define BP_GPIO_35_AL                           (35 | BP_ACTIVE_LOW)
154 #define BP_GPIO_36_AH                           (36 | BP_ACTIVE_HIGH)
155 #define BP_GPIO_36_AL                           (36 | BP_ACTIVE_LOW)
156
157 /* Values for external interrupt assignments. */
158 #define BP_EXT_INTR_0                           0
159 #define BP_EXT_INTR_1                           1
160 #define BP_EXT_INTR_2                           2
161 #define BP_EXT_INTR_3                           3
162
163 /* Values for chip select assignments. */
164 #define BP_CS_0                                 0
165 #define BP_CS_1                                 1
166 #define BP_CS_2                                 2
167 #define BP_CS_3                                 3
168
169 /* Value for GPIO and external interrupt fields that are not used. */
170 #define BP_NOT_DEFINED                          0xffff
171 #define BP_HW_DEFINED                           0xfff0
172 #define BP_UNEQUIPPED                           0xfff1
173
174 /* Maximum size of the board id string. */
175 #define BP_BOARD_ID_LEN                         16
176
177 /* Maximum number of Ethernet MACs. */
178 #define BP_MAX_ENET_MACS                        2
179
180 /* GPIO pin mask for hardware version (must be 32 bits)*/
181 #define NULL_MASK                               0x00000000
182
183 #define MAGIC_MASK                              0x30000000
184 #define MAGIC_BOARDID                           "MAGIC"
185
186 /* Maximum number of VoIP DSPs. */
187 #define BP_MAX_VOIP_DSP                         2
188
189 /* Wireless Antenna Settings. */
190 #define BP_WLAN_ANT_MAIN                        0
191 #define BP_WLAN_ANT_AUX                         1
192 #define BP_WLAN_ANT_BOTH                        3
193
194 #if !defined(__ASSEMBLER__)
195
196 /* Information about an Ethernet MAC.  If ucPhyType is BP_ENET_NO_PHY,
197  * then the other fields are not valid.
198  */
199 typedef struct EthernetMacInfo
200 {
201     unsigned char ucPhyType;                    /* BP_ENET_xxx             */
202     unsigned char ucPhyAddress;                 /* 0 to 31                 */
203     unsigned short usGpioPhySpiSck;             /* GPIO pin or not defined */
204     unsigned short usGpioPhySpiSs;              /* GPIO pin or not defined */
205     unsigned short usGpioPhySpiMosi;            /* GPIO pin or not defined */
206     unsigned short usGpioPhySpiMiso;            /* GPIO pin or not defined */
207     unsigned short usGpioPhyReset;              /* GPIO pin or not defined (96348LV) */
208     unsigned short numSwitchPorts;              /* Number of PHY ports */
209                 unsigned short uplinkIndex;                 /* index of uplink port in switch */
210     unsigned short usConfigType;                /* Configuration type */
211     unsigned short usReverseMii;                /* Reverse MII */
212     unsigned short usSwitchType;
213 } ETHERNET_MAC_INFO, *PETHERNET_MAC_INFO;
214
215
216 /* Information about VoIP DSPs.  If ucDspType is BP_VOIP_NO_DSP,
217  * then the other fields are not valid.
218  */
219 typedef struct VoIPDspInfo
220 {
221     unsigned char  ucDspType;
222     unsigned char  ucDspAddress;
223     unsigned short usExtIntrVoip;
224     unsigned short usGpioVoipReset;
225     unsigned short usGpioVoipIntr;
226     unsigned short usGpioLedVoip;
227     unsigned short usCsVoip;
228
229 } VOIP_DSP_INFO;
230
231
232 /**************************************************************************
233  * Name       : BpSetBoardId
234  *
235  * Description: This function find the BOARD_PARAMETERS structure for the
236  *              specified board id string and assigns it to a global, static
237  *              variable.
238  *
239  * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM.
240  *
241  * Returns    : BP_SUCCESS - Success, value is returned.
242  *              BP_BOARD_ID_NOT_FOUND - Error, board id input string does not
243  *                  have a board parameters configuration record.
244  ***************************************************************************/
245 int BpSetBoardId( char *pszBoardId );
246
247 /**************************************************************************
248  * Name       : BpGetBoardIds
249  *
250  * Description: This function returns all of the supported board id strings.
251  *
252  * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id
253  *                  strings are returned in.  Each id starts at BP_BOARD_ID_LEN
254  *                  boundary.
255  *              [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that
256  *                  were allocated in pszBoardIds.
257  *
258  * Returns    : Number of board id strings returned.
259  ***************************************************************************/
260 int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize );
261
262 /**************************************************************************
263  * Name       : BpGetEthernetMacInfo
264  *
265  * Description: This function returns all of the supported board id strings.
266  *
267  * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO
268  *                  buffers.
269  *              [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that
270  *                  are pointed to by pEnetInfos.
271  *
272  * Returns    : BP_SUCCESS - Success, value is returned.
273  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
274  ***************************************************************************/
275 int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos );
276
277 /**************************************************************************
278  * Name       : BpGetSdramSize
279  *
280  * Description: This function returns a constant that describees the board's
281  *              SDRAM type and size.
282  *
283  * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size
284  *                  is returned in.
285  *
286  * Returns    : BP_SUCCESS - Success, value is returned.
287  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
288  ***************************************************************************/
289 int BpGetSdramSize( unsigned long *pulSdramSize );
290
291 /**************************************************************************
292  * Name       : BpGetPsiSize
293  *
294  * Description: This function returns the persistent storage size in K bytes.
295  *
296  * Parameters : [OUT] pulPsiSize - Address of short word that the persistent
297  *                  storage size is returned in.
298  *
299  * Returns    : BP_SUCCESS - Success, value is returned.
300  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
301  ***************************************************************************/
302 int BpGetPsiSize( unsigned long *pulPsiSize );
303
304 /**************************************************************************
305  * Name       : BpGetRj11InnerOuterPairGpios
306  *
307  * Description: This function returns the GPIO pin assignments for changing
308  *              between the RJ11 inner pair and RJ11 outer pair.
309  *
310  * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair
311  *                  GPIO pin is returned in.
312  *              [OUT] pusOuter - Address of short word that the RJ11 outer pair
313  *                  GPIO pin is returned in.
314  *
315  * Returns    : BP_SUCCESS - Success, values are returned.
316  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
317  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
318  *                  for the board.
319  ***************************************************************************/
320 int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner,
321     unsigned short *pusOuter );
322
323 /**************************************************************************
324  * Name       : BpGetPressAndHoldResetGpio
325  *
326  * Description: This function returns the GPIO pin assignment for the press
327  *              and hold reset button.
328  *
329  * Parameters : [OUT] pusValue - Address of short word that the press and hold
330  *                  reset button GPIO pin is returned in.
331  *
332  * Returns    : BP_SUCCESS - Success, value is returned.
333  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
334  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
335  *                  for the board.
336  ***************************************************************************/
337 int BpGetPressAndHoldResetGpio( unsigned short *pusValue );
338
339 /**************************************************************************
340  * Name       : BpGetVoipResetGpio
341  *
342  * Description: This function returns the GPIO pin assignment for the VOIP
343  *              Reset operation.
344  *
345  * Parameters : [OUT] pusValue - Address of short word that the VOIP reset
346  *                  GPIO pin is returned in.
347  *              [IN] dspNum - Address of the DSP to query.
348  *
349  * Returns    : BP_SUCCESS - Success, value is returned.
350  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
351  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
352  *                  for the board.
353  ***************************************************************************/
354 int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue );
355
356 /**************************************************************************
357  * Name       : BpGetVoipIntrGpio
358  *
359  * Description: This function returns the GPIO pin assignment for VoIP interrupt.
360  *
361  * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt
362  *                  GPIO pin is returned in.
363  *              [IN] dspNum - Address of the DSP to query.
364  *
365  * Returns    : BP_SUCCESS - Success, value is returned.
366  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
367  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
368  *                  for the board.
369  ***************************************************************************/
370 int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue );
371
372 /**************************************************************************
373  * Name       : BpGetPcmciaResetGpio
374  *
375  * Description: This function returns the GPIO pin assignment for the PCMCIA
376  *              Reset operation.
377  *
378  * Parameters : [OUT] pusValue - Address of short word that the PCMCIA reset
379  *                  GPIO pin is returned in.
380  *
381  * Returns    : BP_SUCCESS - Success, value is returned.
382  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
383  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
384  *                  for the board.
385  ***************************************************************************/
386 int BpGetPcmciaResetGpio( unsigned short *pusValue );
387
388 /**************************************************************************
389  * Name       : BpGetUartRtsCtsGpios
390  *
391  * Description: This function returns the GPIO pin assignments for RTS and CTS
392  *              UART signals.
393  *
394  * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO
395  *                  pin is returned in.
396  *              [OUT] pusCts - Address of short word that the UART CTS GPIO
397  *                  pin is returned in.
398  *
399  * Returns    : BP_SUCCESS - Success, values are returned.
400  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
401  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
402  *                  for the board.
403  ***************************************************************************/
404 int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts );
405
406 /**************************************************************************
407  * Name       : BpGetAdslLedGpio
408  *
409  * Description: This function returns the GPIO pin assignment for the ADSL
410  *              LED.
411  *
412  * Parameters : [OUT] pusValue - Address of short word that the ADSL LED
413  *                  GPIO pin is returned in.
414  *
415  * Returns    : BP_SUCCESS - Success, value is returned.
416  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
417  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
418  *                  for the board.
419  ***************************************************************************/
420 int BpGetAdslLedGpio( unsigned short *pusValue );
421
422 /**************************************************************************
423  * Name       : BpGetAdslFailLedGpio
424  *
425  * Description: This function returns the GPIO pin assignment for the ADSL
426  *              LED that is used when there is a DSL connection failure.
427  *
428  * Parameters : [OUT] pusValue - Address of short word that the ADSL LED
429  *                  GPIO pin is returned in.
430  *
431  * Returns    : BP_SUCCESS - Success, value is returned.
432  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
433  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
434  *                  for the board.
435  ***************************************************************************/
436 int BpGetAdslFailLedGpio( unsigned short *pusValue );
437
438 /**************************************************************************
439  * Name       : BpGetWirelessLedOnGpio
440  *
441  * Description: This function returns the GPIO pin assignment for the Wireless
442  *              LED.
443  *
444  * Parameters : [OUT] pusValue - Address of short word that the Wireless LED
445  *                  GPIO pin is returned in.
446  *
447  * Returns    : BP_SUCCESS - Success, value is returned.
448  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
449  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
450  *                  for the board.
451  ***************************************************************************/
452 int BpGetWirelessLedOnGpio( unsigned short *pusValue );
453
454 /**************************************************************************
455  * Name       : BpGetWirelessLedOffGpio
456  *
457  * Description: This function returns the GPIO pin assignment for the Wireless
458  *              LED.
459  *
460  * Parameters : [OUT] pusValue - Address of short word that the Wireless LED
461  *                  GPIO pin is returned in.
462  *
463  * Returns    : BP_SUCCESS - Success, value is returned.
464  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
465  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
466  *                  for the board.
467  ***************************************************************************/
468 int BpGetWirelessLedOffGpio( unsigned short *pusValue );
469
470 /**************************************************************************
471  * Name       : BpGetWirelessFailLedGpio
472  *
473  * Description: This function returns the GPIO pin assignment for the Wireless
474  *              LED.
475  *
476  * Parameters : [OUT] pusValue - Address of short word that the Wireless LED
477  *                  GPIO pin is returned in.
478  *
479  * Returns    : BP_SUCCESS - Success, value is returned.
480  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
481  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
482  *                  for the board.
483  ***************************************************************************/
484 int BpGetWirelessFailLedGpio( unsigned short *pusValue );
485
486 /**************************************************************************
487  * Name       : BpGetServiceLedGpio
488  *
489  * Description: This function returns the GPIO pin assignment for the Service
490  *              LED.
491  *
492  * Parameters : [OUT] pusValue - Address of short word that the Service LED
493  *                  GPIO pin is returned in.
494  *
495  * Returns    : BP_SUCCESS - Success, value is returned.
496  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
497  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
498  *                  for the board.
499  ***************************************************************************/
500 int BpGetServiceLedGpio( unsigned short *pusValue );
501
502 /**************************************************************************
503  * Name       : BpGetServiceFailLedGpio
504  *
505  * Description: This function returns the GPIO pin assignment for the Service
506  *              LED that is used when there is a Service connection failure.
507  *
508  * Parameters : [OUT] pusValue - Address of short word that the Service LED
509  *                  GPIO pin is returned in.
510  *
511  * Returns    : BP_SUCCESS - Success, value is returned.
512  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
513  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
514  *                  for the board.
515  ***************************************************************************/
516 int BpGetServiceFailLedGpio( unsigned short *pusValue );
517
518 /**************************************************************************
519  * Name       : BpGetWirelessAntInUse
520  *
521  * Description: This function returns the antennas in use for wireless
522  *
523  * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna
524  *                  is in use.
525  *
526  * Returns    : BP_SUCCESS - Success, value is returned.
527  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
528  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
529  *                  for the board.
530  ***************************************************************************/
531 int BpGetWirelessAntInUse( unsigned short *pusValue );
532
533 /**************************************************************************
534  * Name       : BpGetWirelessSesBtnGpio
535  *
536  * Description: This function returns the GPIO pin assignment for the Wireless
537  *              Ses Button.
538  *
539  * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses
540  *                  Button GPIO pin is returned in.
541  *
542  * Returns    : BP_SUCCESS - Success, value is returned.
543  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
544  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
545  *                  for the board.
546  ***************************************************************************/
547 int BpGetWirelessSesBtnGpio( unsigned short *pusValue );
548
549 /**************************************************************************
550  * Name       : BpGetWirelessSesExtIntr
551  *
552  * Description: This function returns the external interrupt number for the 
553  *              Wireless Ses Button.
554  *
555  * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses
556  *                  external interrup is returned in.
557  *
558  * Returns    : BP_SUCCESS - Success, value is returned.
559  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
560  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
561  *                  for the board.
562  ***************************************************************************/
563 int BpGetWirelessSesExtIntr( unsigned short *pusValue );
564
565 /**************************************************************************
566  * Name       : BpGetWirelessSesLedGpio
567  *
568  * Description: This function returns the GPIO pin assignment for the Wireless
569  *              Ses Led.
570  *
571  * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses
572  *                  Led GPIO pin is returned in.
573  *
574  * Returns    : BP_SUCCESS - Success, value is returned.
575  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
576  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
577  *                  for the board.
578  ***************************************************************************/
579 int BpGetWirelessSesLedGpio( unsigned short *pusValue );
580
581 /**************************************************************************
582  * Name       : BpGetUsbLedGpio
583  *
584  * Description: This function returns the GPIO pin assignment for the USB
585  *              LED.
586  *
587  * Parameters : [OUT] pusValue - Address of short word that the USB LED
588  *                  GPIO pin is returned in.
589  *
590  * Returns    : BP_SUCCESS - Success, value is returned.
591  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
592  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
593  *                  for the board.
594  ***************************************************************************/
595 int BpGetUsbLedGpio( unsigned short *pusValue );
596
597 /**************************************************************************
598  * Name       : BpGetHpnaLedGpio
599  *
600  * Description: This function returns the GPIO pin assignment for the HPNA
601  *              LED.
602  *
603  * Parameters : [OUT] pusValue - Address of short word that the HPNA LED
604  *                  GPIO pin is returned in.
605  *
606  * Returns    : BP_SUCCESS - Success, value is returned.
607  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
608  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
609  *                  for the board.
610  ***************************************************************************/
611 int BpGetHpnaLedGpio( unsigned short *pusValue );
612
613 /**************************************************************************
614  * Name       : BpGetWanDataLedGpio
615  *
616  * Description: This function returns the GPIO pin assignment for the WAN Data
617  *              LED.
618  *
619  * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED
620  *                  GPIO pin is returned in.
621  *
622  * Returns    : BP_SUCCESS - Success, value is returned.
623  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
624  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
625  *                  for the board.
626  ***************************************************************************/
627 int BpGetWanDataLedGpio( unsigned short *pusValue );
628
629 /**************************************************************************
630  * Name       : BpGetPppLedGpio
631  *
632  * Description: This function returns the GPIO pin assignment for the PPP
633  *              LED.
634  *
635  * Parameters : [OUT] pusValue - Address of short word that the PPP LED
636  *                  GPIO pin is returned in.
637  *
638  * Returns    : BP_SUCCESS - Success, value is returned.
639  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
640  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
641  *                  for the board.
642  ***************************************************************************/
643 int BpGetPppLedGpio( unsigned short *pusValue );
644
645 /**************************************************************************
646  * Name       : BpGetPppFailLedGpio
647  *
648  * Description: This function returns the GPIO pin assignment for the PPP
649  *              LED that is used when there is a PPP connection failure.
650  *
651  * Parameters : [OUT] pusValue - Address of short word that the PPP LED
652  *                  GPIO pin is returned in.
653  *
654  * Returns    : BP_SUCCESS - Success, value is returned.
655  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
656  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
657  *                  for the board.
658  ***************************************************************************/
659 int BpGetPppFailLedGpio( unsigned short *pusValue );
660
661 /**************************************************************************
662  * Name       : BpGetVoipLedGpio
663  *
664  * Description: This function returns the GPIO pin assignment for the VOIP
665  *              LED.
666  *
667  * Parameters : [OUT] pusValue - Address of short word that the VOIP LED
668  *                  GPIO pin is returned in.
669  *
670  * Returns    : BP_SUCCESS - Success, value is returned.
671  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
672  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
673  *                  for the board.
674  ***************************************************************************/
675 int BpGetVoipLedGpio( unsigned short *pusValue );
676
677 /**************************************************************************
678  * Name       : BpGetVoipLedGpio
679  *
680  * Description: This function returns the GPIO pin assignment for the VOIP
681  *              LED.
682  *
683  * Parameters : [OUT] pusValue - Address of short word that the VOIP LED
684  *                  GPIO pin is returned in.
685  *
686  * Returns    : BP_SUCCESS - Success, value is returned.
687  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
688  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
689  *                  for the board.
690  ***************************************************************************/
691 int BpGetVoipFailLedGpio( unsigned short *pusValue );
692
693 /**************************************************************************
694  * Name       : BpGetBootloaderPowerOnLedGpio
695  *
696  * Description: This function returns the GPIO pin assignment for the power
697  *              on LED that is set by the bootloader.
698  *
699  * Parameters : [OUT] pusValue - Address of short word that the alarm LED
700  *                  GPIO pin is returned in.
701  *
702  * Returns    : BP_SUCCESS - Success, value is returned.
703  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
704  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
705  *                  for the board.
706  ***************************************************************************/
707 int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue );
708
709 /**************************************************************************
710  * Name       : BpGetBootloaderAlarmLedGpio
711  *
712  * Description: This function returns the GPIO pin assignment for the alarm
713  *              LED that is set by the bootloader.
714  *
715  * Parameters : [OUT] pusValue - Address of short word that the alarm LED
716  *                  GPIO pin is returned in.
717  *
718  * Returns    : BP_SUCCESS - Success, value is returned.
719  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
720  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
721  *                  for the board.
722  ***************************************************************************/
723 int BpGetBootloaderAlarmLedGpio( unsigned short *pusValue );
724
725 /**************************************************************************
726  * Name       : BpGetBootloaderResetCfgLedGpio
727  *
728  * Description: This function returns the GPIO pin assignment for the reset
729  *              configuration LED that is set by the bootloader.
730  *
731  * Parameters : [OUT] pusValue - Address of short word that the reset
732  *                  configuration LED GPIO pin is returned in.
733  *
734  * Returns    : BP_SUCCESS - Success, value is returned.
735  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
736  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
737  *                  for the board.
738  ***************************************************************************/
739 int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue );
740
741 /**************************************************************************
742  * Name       : BpGetBootloaderStopLedGpio
743  *
744  * Description: This function returns the GPIO pin assignment for the break
745  *              into bootloader LED that is set by the bootloader.
746  *
747  * Parameters : [OUT] pusValue - Address of short word that the break into
748  *                  bootloader LED GPIO pin is returned in.
749  *
750  * Returns    : BP_SUCCESS - Success, value is returned.
751  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
752  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
753  *                  for the board.
754  ***************************************************************************/
755 int BpGetBootloaderStopLedGpio( unsigned short *pusValue );
756
757 /**************************************************************************
758  * Name       : BpGetWirelessExtIntr
759  *
760  * Description: This function returns the Wireless external interrupt number.
761  *
762  * Parameters : [OUT] pulValue - Address of short word that the wireless
763  *                  external interrupt number is returned in.
764  *
765  * Returns    : BP_SUCCESS - Success, value is returned.
766  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
767  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
768  *                  for the board.
769  ***************************************************************************/
770 int BpGetWirelessExtIntr( unsigned long *pulValue );
771
772 /**************************************************************************
773  * Name       : BpGetAdslDyingGaspExtIntr
774  *
775  * Description: This function returns the ADSL Dying Gasp external interrupt
776  *              number.
777  *
778  * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp
779  *                  external interrupt number is returned in.
780  *
781  * Returns    : BP_SUCCESS - Success, value is returned.
782  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
783  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
784  *                  for the board.
785  ***************************************************************************/
786 int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue );
787
788 /**************************************************************************
789  * Name       : BpGetVoipExtIntr
790  *
791  * Description: This function returns the VOIP external interrupt number.
792  *
793  * Parameters : [OUT] pulValue - Address of short word that the VOIP
794  *                  external interrupt number is returned in.
795  *              [IN] dspNum - Address of the DSP to query.
796  *
797  * Returns    : BP_SUCCESS - Success, value is returned.
798  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
799  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
800  *                  for the board.
801  ***************************************************************************/
802 int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue );
803
804 /**************************************************************************
805  * Name       : BpGetHpnaExtIntr
806  *
807  * Description: This function returns the HPNA external interrupt number.
808  *
809  * Parameters : [OUT] pulValue - Address of short word that the HPNA
810  *                  external interrupt number is returned in.
811  *
812  * Returns    : BP_SUCCESS - Success, value is returned.
813  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
814  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
815  *                  for the board.
816  ***************************************************************************/
817 int BpGetHpnaExtIntr( unsigned long *pulValue );
818
819 /**************************************************************************
820  * Name       : BpGetHpnaChipSelect
821  *
822  * Description: This function returns the HPNA chip select number.
823  *
824  * Parameters : [OUT] pulValue - Address of short word that the HPNA
825  *                  chip select number is returned in.
826  *
827  * Returns    : BP_SUCCESS - Success, value is returned.
828  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
829  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
830  *                  for the board.
831  ***************************************************************************/
832 int BpGetHpnaChipSelect( unsigned long *pulValue );
833
834 /**************************************************************************
835  * Name       : BpGetVoipChipSelect
836  *
837  * Description: This function returns the VOIP chip select number.
838  *
839  * Parameters : [OUT] pulValue - Address of short word that the VOIP
840  *                  chip select number is returned in.
841  *              [IN] dspNum - Address of the DSP to query.
842  *
843  * Returns    : BP_SUCCESS - Success, value is returned.
844  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
845  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
846  *                  for the board.
847  ***************************************************************************/
848 int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue );
849
850 /************************************************************************
851  * Name       : BpGetSmcChipSelect
852  *
853  * Description: This function returns the Smart Card Reader chip select number.
854  *
855  * Parameters : [OUT] pulValue - Address of short word that the VOIP
856  *                  chip select number is returned in.
857  *
858  * Returns    : BP_SUCCESS - Success, value is returned.
859  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
860  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
861  *                  for the board.
862  ***************************************************************************/
863 int BpGetSmcChipSelect( unsigned long *pulValue );
864
865 /**************************************************************************
866  * Name       : BpGetRestoreBtnGpio
867  *
868  * Description: This function returns the SW Reset external interrupt number.
869  *
870  * Parameters : [OUT] pulValue - Address of short word that the HPNA
871  *                  external interrupt number is returned in.
872  *
873  * Returns    : BP_SUCCESS - Success, value is returned.
874  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
875  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
876  *                  for the board.
877  ***************************************************************************/
878 int BpGetRestoreBtnGpio( unsigned long *pulValue );
879
880 /**************************************************************************
881  * Name       : BpGetExtIntrCnfButton
882  *
883  * Description: This function returns the Confirm Button external interrupt number.
884  *
885  * Parameters : [OUT] pulValue - Address of short word that the HPNA
886  *                  external interrupt number is returned in.
887  *
888  * Returns    : BP_SUCCESS - Success, value is returned.
889  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
890  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
891  *                  for the board.
892  ***************************************************************************/
893 int BpGetExtIntrCnfButton( unsigned long *pulValue );
894
895 /**************************************************************************
896  * Name       : BpGetOptTranscvReset
897  *
898  * Description: This function returns the GPIO pin assignment for the optical
899  *              transceiver reset
900  *
901  * Parameters : [OUT] pusValue - Address of short word that the VOIP LED
902  *                  GPIO pin is returned in.
903  *
904  * Returns    : BP_SUCCESS - Success, value is returned.
905  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
906  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
907  *                  for the board.
908  ***************************************************************************/
909 int BpGetOptTranscvReset( unsigned short *pusValue );
910
911 /**************************************************************************
912  * Name       : BpGetHwVersionMask
913  *
914  * Description: This function returns the Gpio Mask for hardware version.
915  *
916  * Parameters : [OUT] pulValue - an unsigned int rappresenting hw version mask
917   *
918  * Returns    : BP_SUCCESS - Success, value is returned.
919  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
920  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
921  *                  for the board.
922  ***************************************************************************/
923 int BpGetHwVersionMask( unsigned int *pulValue );
924
925 /**************************************************************************
926  * Name       : BpGetSmcExtIntr
927  *
928  * Description: This function returns the Smart Card Reader external interrupt number.
929  *
930  * Parameters : [OUT] pulValue - Address of short word that the SMC
931  *                  external interrupt number is returned in.
932  *
933  * Returns    : BP_SUCCESS - Success, value is returned.
934  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
935  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
936  *                  for the board.
937  ***************************************************************************/
938 int BpGetSmcExtIntr( unsigned long *pulValue );
939
940 /**************************************************************************
941  * Name       : BpGetPhone1LedGpio
942  *
943  * Description: This function returns the GPIO pin assignment for the PHONE1
944  *              LED.
945  *
946  * Parameters : [OUT] pusValue - Address of short word that the PHONE1 LED
947  *                  GPIO pin is returned in.
948  *
949  * Returns    : BP_SUCCESS - Success, value is returned.
950  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
951  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
952  *                  for the board.
953  ***************************************************************************/
954 int BpGetPhone1LedGpio( unsigned short *pusValue );
955
956 /**************************************************************************
957  * Name       : BpGetVoipPhone2Gpio
958  *
959  * Description: This function returns the GPIO pin assignment for the PHONE2
960  *              LED.
961  *
962  * Parameters : [OUT] pusValue - Address of short word that the PHONE2 LED
963  *                  GPIO pin is returned in.
964  *
965  * Returns    : BP_SUCCESS - Success, value is returned.
966  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
967  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
968  *                  for the board.
969  ***************************************************************************/
970 int BpGetPhone2LedGpio( unsigned short *pusValue );
971
972 /**************************************************************************
973  * Name       : BpGetBoardId
974  *
975  * Description: This function returns the BoardId actually in use
976  *
977  * Parameters : [OUT] pusValue - BoardId
978  *              [IN]  len length of allocated pusValue buffer
979  *
980  * Returns    : BP_SUCCESS - Success, value is returned.
981  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
982  ***************************************************************************/
983 int BpGetBoardId( char *pusValue, int len );
984
985 #endif /* __ASSEMBLER__ */
986
987 #if __cplusplus
988 }
989 #endif
990
991 #endif /* _BOARDPARMS_H */
992