http://downloads.netgear.com/files/GPL/DM111PSP_v3.61d_GPL.tar.gz
[bcm963xx.git] / shared / opensource / include / 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 #ifdef __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 /* Values for EthernetMacInfo Configuration type. */
58 #define BP_ENET_CONFIG_MDIO                     0       /* Internal PHY, External PHY, Switch+(no GPIO, no SPI, no MDIO Pseudo phy */
59 #define BP_ENET_CONFIG_GPIO                     1       /* Bcm96345GW board + Bcm5325M/E */
60 #define BP_ENET_CONFIG_MDIO_PSEUDO_PHY          2       /* Bcm96348GW board + Bcm5325E */
61 #define BP_ENET_CONFIG_SPI_SSB_0                3       /* Bcm96348GW board + Bcm5325M/E */
62 #define BP_ENET_CONFIG_SPI_SSB_1                4       /* Bcm96348GW board + Bcm5325M/E */
63 #define BP_ENET_CONFIG_SPI_SSB_2                5       /* Bcm96348GW board + Bcm5325M/E */
64 #define BP_ENET_CONFIG_SPI_SSB_3                6       /* Bcm96348GW board + Bcm5325M/E */
65
66 /* Values for EthernetMacInfo Reverse MII. */
67 #define BP_ENET_NO_REVERSE_MII                  0
68 #define BP_ENET_REVERSE_MII                     1
69
70 /* Values for VoIPDSPInfo DSPType. */
71 #define BP_VOIP_NO_DSP                          0
72 #define BP_VOIP_DSP                             1
73
74
75 /* Values for GPIO pin assignments (AH = Active High, AL = Active Low). */
76 #define BP_GPIO_NUM_MASK                        0x00FF
77 #define BP_ACTIVE_LOW                           0x8000
78 #define BP_GPIO_SERIAL                          0x4000
79
80 #define BP_GPIO_0_AH                            (0)
81 #define BP_GPIO_0_AL                            (0  | BP_ACTIVE_LOW)
82 #define BP_GPIO_1_AH                            (1)
83 #define BP_GPIO_1_AL                            (1  | BP_ACTIVE_LOW)
84 #define BP_GPIO_2_AH                            (2)
85 #define BP_GPIO_2_AL                            (2  | BP_ACTIVE_LOW)
86 #define BP_GPIO_3_AH                            (3)
87 #define BP_GPIO_3_AL                            (3  | BP_ACTIVE_LOW)
88 #define BP_GPIO_4_AH                            (4)
89 #define BP_GPIO_4_AL                            (4  | BP_ACTIVE_LOW)
90 #define BP_GPIO_5_AH                            (5)
91 #define BP_GPIO_5_AL                            (5  | BP_ACTIVE_LOW)
92 #define BP_GPIO_6_AH                            (6)
93 #define BP_GPIO_6_AL                            (6  | BP_ACTIVE_LOW)
94 #define BP_GPIO_7_AH                            (7)
95 #define BP_GPIO_7_AL                            (7  | BP_ACTIVE_LOW)
96 #define BP_GPIO_8_AH                            (8)
97 #define BP_GPIO_8_AL                            (8  | BP_ACTIVE_LOW)
98 #define BP_GPIO_9_AH                            (9)
99 #define BP_GPIO_9_AL                            (9  | BP_ACTIVE_LOW)
100 #define BP_GPIO_10_AH                           (10)
101 #define BP_GPIO_10_AL                           (10 | BP_ACTIVE_LOW)
102 #define BP_GPIO_11_AH                           (11)
103 #define BP_GPIO_11_AL                           (11 | BP_ACTIVE_LOW)
104 #define BP_GPIO_12_AH                           (12)
105 #define BP_GPIO_12_AL                           (12 | BP_ACTIVE_LOW)
106 #define BP_GPIO_13_AH                           (13)
107 #define BP_GPIO_13_AL                           (13 | BP_ACTIVE_LOW)
108 #define BP_GPIO_14_AH                           (14)
109 #define BP_GPIO_14_AL                           (14 | BP_ACTIVE_LOW)
110 #define BP_GPIO_15_AH                           (15)
111 #define BP_GPIO_15_AL                           (15 | BP_ACTIVE_LOW)
112 #define BP_GPIO_16_AH                           (16)
113 #define BP_GPIO_16_AL                           (16 | BP_ACTIVE_LOW)
114 #define BP_GPIO_17_AH                           (17)
115 #define BP_GPIO_17_AL                           (17 | BP_ACTIVE_LOW)
116 #define BP_GPIO_18_AH                           (18)
117 #define BP_GPIO_18_AL                           (18 | BP_ACTIVE_LOW)
118 #define BP_GPIO_19_AH                           (19)
119 #define BP_GPIO_19_AL                           (19 | BP_ACTIVE_LOW)
120 #define BP_GPIO_20_AH                           (20)
121 #define BP_GPIO_20_AL                           (20 | BP_ACTIVE_LOW)
122 #define BP_GPIO_21_AH                           (21)
123 #define BP_GPIO_21_AL                           (21 | BP_ACTIVE_LOW)
124 #define BP_GPIO_22_AH                           (22)
125 #define BP_GPIO_22_AL                           (22 | BP_ACTIVE_LOW)
126 #define BP_GPIO_23_AH                           (23)
127 #define BP_GPIO_23_AL                           (23 | BP_ACTIVE_LOW)
128 #define BP_GPIO_24_AH                           (24)
129 #define BP_GPIO_24_AL                           (24 | BP_ACTIVE_LOW)
130 #define BP_GPIO_25_AH                           (25)
131 #define BP_GPIO_25_AL                           (25 | BP_ACTIVE_LOW)
132 #define BP_GPIO_26_AH                           (26)
133 #define BP_GPIO_26_AL                           (26 | BP_ACTIVE_LOW)
134 #define BP_GPIO_27_AH                           (27)
135 #define BP_GPIO_27_AL                           (27 | BP_ACTIVE_LOW)
136 #define BP_GPIO_28_AH                           (28)
137 #define BP_GPIO_28_AL                           (28 | BP_ACTIVE_LOW)
138 #define BP_GPIO_29_AH                           (29)
139 #define BP_GPIO_29_AL                           (29 | BP_ACTIVE_LOW)
140 #define BP_GPIO_30_AH                           (30)
141 #define BP_GPIO_30_AL                           (30 | BP_ACTIVE_LOW)
142 #define BP_GPIO_31_AH                           (31)
143 #define BP_GPIO_31_AL                           (31 | BP_ACTIVE_LOW)
144 #define BP_GPIO_32_AH                           (32)
145 #define BP_GPIO_32_AL                           (32 | BP_ACTIVE_LOW)
146 #define BP_GPIO_33_AH                           (33)
147 #define BP_GPIO_33_AL                           (33 | BP_ACTIVE_LOW)
148 #define BP_GPIO_34_AH                           (34)
149 #define BP_GPIO_34_AL                           (34 | BP_ACTIVE_LOW)
150 #define BP_GPIO_35_AH                           (35)
151 #define BP_GPIO_35_AL                           (35 | BP_ACTIVE_LOW)
152 #define BP_GPIO_36_AH                           (36)
153 #define BP_GPIO_36_AL                           (36 | BP_ACTIVE_LOW)
154 #define BP_GPIO_37_AH                           (37)
155 #define BP_GPIO_37_AL                           (37 | BP_ACTIVE_LOW)
156
157 #define BP_SERIAL_GPIO_0_AH                     (0  | BP_GPIO_SERIAL)
158 #define BP_SERIAL_GPIO_0_AL                     (0  | BP_GPIO_SERIAL | BP_ACTIVE_LOW)
159 #define BP_SERIAL_GPIO_1_AH                     (1  | BP_GPIO_SERIAL)
160 #define BP_SERIAL_GPIO_1_AL                     (1  | BP_GPIO_SERIAL | BP_ACTIVE_LOW)
161 #define BP_SERIAL_GPIO_2_AH                     (2  | BP_GPIO_SERIAL)
162 #define BP_SERIAL_GPIO_2_AL                     (2  | BP_GPIO_SERIAL | BP_ACTIVE_LOW)
163 #define BP_SERIAL_GPIO_3_AH                     (3  | BP_GPIO_SERIAL)
164 #define BP_SERIAL_GPIO_3_AL                     (3  | BP_GPIO_SERIAL | BP_ACTIVE_LOW)
165 #define BP_SERIAL_GPIO_4_AH                     (4  | BP_GPIO_SERIAL)
166 #define BP_SERIAL_GPIO_4_AL                     (4  | BP_GPIO_SERIAL | BP_ACTIVE_LOW)
167 #define BP_SERIAL_GPIO_5_AH                     (5  | BP_GPIO_SERIAL)
168 #define BP_SERIAL_GPIO_5_AL                     (5  | BP_GPIO_SERIAL | BP_ACTIVE_LOW)
169 #define BP_SERIAL_GPIO_6_AH                     (6  | BP_GPIO_SERIAL)
170 #define BP_SERIAL_GPIO_6_AL                     (6  | BP_GPIO_SERIAL | BP_ACTIVE_LOW)
171 #define BP_SERIAL_GPIO_7_AH                     (7  | BP_GPIO_SERIAL)
172 #define BP_SERIAL_GPIO_7_AL                     (7  | BP_GPIO_SERIAL | BP_ACTIVE_LOW)
173
174 /* Values for external interrupt assignments. */
175 #define BP_EXT_INTR_0                           0
176 #define BP_EXT_INTR_1                           1
177 #define BP_EXT_INTR_2                           2
178 #define BP_EXT_INTR_3                           3
179 #define BP_EXT_INTR_4                           4
180 #define BP_EXT_INTR_5                           5
181
182 /* Values for chip select assignments. */
183 #define BP_CS_0                                 0
184 #define BP_CS_1                                 1
185 #define BP_CS_2                                 2
186 #define BP_CS_3                                 3
187
188 /* Value for GPIO and external interrupt fields that are not used. */
189 #define BP_NOT_DEFINED                          0xffff
190 #define BP_UNEQUIPPED                           0xfff1
191
192 #define BP_HW_DEFINED                           0xfff0
193 #define BP_HW_DEFINED_AL                        0xfff0
194 #define BP_HW_DEFINED_AH                        0xfff2
195
196 /* Maximum size of the board id string. */
197 #define BP_BOARD_ID_LEN                         16
198
199 /* Maximum number of Ethernet MACs. */
200 #define BP_MAX_ENET_MACS                        2
201
202 /* Maximum number of VoIP DSPs. */
203 #define BP_MAX_VOIP_DSP                         2
204
205 /* Wireless Antenna Settings. */
206 #define BP_WLAN_ANT_MAIN                        0
207 #define BP_WLAN_ANT_AUX                         1
208 #define BP_WLAN_ANT_BOTH                        3
209
210 /* Wireless FLAGS */
211 #define BP_WLAN_MAC_ADDR_OVERRIDE               1   /* use kerSysGetMacAddress for mac address */
212
213 #if !defined(__ASSEMBLER__)
214
215 /* Information about an Ethernet MAC.  If ucPhyType is BP_ENET_NO_PHY,
216  * then the other fields are not valid.
217  */
218 typedef struct EthernetMacInfo
219 {
220     unsigned char ucPhyType;                    /* BP_ENET_xxx             */
221     unsigned char ucPhyAddress;                 /* 0 to 31                 */
222     unsigned short usGpioPhySpiSck;             /* GPIO pin or not defined */
223     unsigned short usGpioPhySpiSs;              /* GPIO pin or not defined */
224     unsigned short usGpioPhySpiMosi;            /* GPIO pin or not defined */
225     unsigned short usGpioPhySpiMiso;            /* GPIO pin or not defined */
226     unsigned short usGpioPhyReset;              /* GPIO pin or not defined (96348LV) */
227     unsigned short usGpioPhyLinkSpeed;          /* GPIO pin or not defined */
228     unsigned short numSwitchPorts;              /* Number of PHY ports */
229     unsigned short usConfigType;                /* Configuration type */
230     unsigned short usReverseMii;                /* Reverse MII */
231 } ETHERNET_MAC_INFO, *PETHERNET_MAC_INFO;
232
233
234 /* Information about VoIP DSPs.  If ucDspType is BP_VOIP_NO_DSP,
235  * then the other fields are not valid.
236  */
237 typedef struct VoIPDspInfo
238 {
239     unsigned char  ucDspType;
240     unsigned char  ucDspAddress;
241     unsigned short usExtIntrVoip;
242     unsigned short usGpioVoipReset;
243     unsigned short usGpioVoipIntr;
244     unsigned short usGpioLedVoip;
245     unsigned short usCsVoip;
246
247 } VOIP_DSP_INFO;
248
249
250 /*   VCOPE board definitions 
251  */
252 typedef enum
253 {
254     BCM6505_RESET_GPIO = 1,
255     VCOPE_RELAY_GPIO,
256     HPI_CS,
257     VCOPE_BOARD_REV, 
258 } VCOPE_PIN_TYPES;
259
260 /**************************************************************************
261  * Name       : BpSetBoardId
262  *
263  * Description: This function find the BOARD_PARAMETERS structure for the
264  *              specified board id string and assigns it to a global, static
265  *              variable.
266  *
267  * Parameters : [IN] pszBoardId - Board id string that is saved into NVRAM.
268  *
269  * Returns    : BP_SUCCESS - Success, value is returned.
270  *              BP_BOARD_ID_NOT_FOUND - Error, board id input string does not
271  *                  have a board parameters configuration record.
272  ***************************************************************************/
273 int BpSetBoardId( char *pszBoardId );
274
275 /**************************************************************************
276  * Name       : BpGetBoardIds
277  *
278  * Description: This function returns all of the supported board id strings.
279  *
280  * Parameters : [OUT] pszBoardIds - Address of a buffer that the board id
281  *                  strings are returned in.  Each id starts at BP_BOARD_ID_LEN
282  *                  boundary.
283  *              [IN] nBoardIdsSize - Number of BP_BOARD_ID_LEN elements that
284  *                  were allocated in pszBoardIds.
285  *
286  * Returns    : Number of board id strings returned.
287  ***************************************************************************/
288 int BpGetBoardIds( char *pszBoardIds, int nBoardIdsSize );
289
290 /**************************************************************************
291  * Name       : BpGetEthernetMacInfo
292  *
293  * Description: This function returns all of the supported board id strings.
294  *
295  * Parameters : [OUT] pEnetInfos - Address of an array of ETHERNET_MAC_INFO
296  *                  buffers.
297  *              [IN] nNumEnetInfos - Number of ETHERNET_MAC_INFO elements that
298  *                  are pointed to by pEnetInfos.
299  *
300  * Returns    : BP_SUCCESS - Success, value is returned.
301  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
302  ***************************************************************************/
303 int BpGetEthernetMacInfo( PETHERNET_MAC_INFO pEnetInfos, int nNumEnetInfos );
304
305 /**************************************************************************
306  * Name       : BpGetSdramSize
307  *
308  * Description: This function returns a constant that describees the board's
309  *              SDRAM type and size.
310  *
311  * Parameters : [OUT] pulSdramSize - Address of short word that the SDRAM size
312  *                  is returned in.
313  *
314  * Returns    : BP_SUCCESS - Success, value is returned.
315  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
316  ***************************************************************************/
317 int BpGetSdramSize( unsigned long *pulSdramSize );
318
319 /**************************************************************************
320  * Name       : BpGetPsiSize
321  *
322  * Description: This function returns the persistent storage size in K bytes.
323  *
324  * Parameters : [OUT] pulPsiSize - Address of short word that the persistent
325  *                  storage size is returned in.
326  *
327  * Returns    : BP_SUCCESS - Success, value is returned.
328  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
329  ***************************************************************************/
330 int BpGetPsiSize( unsigned long *pulPsiSize );
331
332 /**************************************************************************
333  * Name       : BpGetRj11InnerOuterPairGpios
334  *
335  * Description: This function returns the GPIO pin assignments for changing
336  *              between the RJ11 inner pair and RJ11 outer pair.
337  *
338  * Parameters : [OUT] pusInner - Address of short word that the RJ11 inner pair
339  *                  GPIO pin is returned in.
340  *              [OUT] pusOuter - Address of short word that the RJ11 outer pair
341  *                  GPIO pin is returned in.
342  *
343  * Returns    : BP_SUCCESS - Success, values are returned.
344  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
345  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
346  *                  for the board.
347  ***************************************************************************/
348 int BpGetRj11InnerOuterPairGpios( unsigned short *pusInner,
349     unsigned short *pusOuter );
350
351 /**************************************************************************
352  * Name       : BpGetPressAndHoldResetGpio
353  *
354  * Description: This function returns the GPIO pin assignment for the press
355  *              and hold reset button.
356  *
357  * Parameters : [OUT] pusValue - Address of short word that the press and hold
358  *                  reset button GPIO pin is returned in.
359  *
360  * Returns    : BP_SUCCESS - Success, value is returned.
361  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
362  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
363  *                  for the board.
364  ***************************************************************************/
365 int BpGetPressAndHoldResetGpio( unsigned short *pusValue );
366
367 /**************************************************************************
368  * Name       : BpGetVoipResetGpio
369  *
370  * Description: This function returns the GPIO pin assignment for the VOIP
371  *              Reset operation.
372  *
373  * Parameters : [OUT] pusValue - Address of short word that the VOIP reset
374  *                  GPIO pin is returned in.
375  *              [IN] dspNum - Address of the DSP to query.
376  *
377  * Returns    : BP_SUCCESS - Success, value is returned.
378  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
379  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
380  *                  for the board.
381  ***************************************************************************/
382 int BpGetVoipResetGpio( unsigned char dspNum, unsigned short *pusValue );
383
384 /**************************************************************************
385  * Name       : BpGetVoipIntrGpio
386  *
387  * Description: This function returns the GPIO pin assignment for VoIP interrupt.
388  *
389  * Parameters : [OUT] pusValue - Address of short word that the VOIP interrupt
390  *                  GPIO pin is returned in.
391  *              [IN] dspNum - Address of the DSP to query.
392  *
393  * Returns    : BP_SUCCESS - Success, value is returned.
394  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
395  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
396  *                  for the board.
397  ***************************************************************************/
398 int BpGetVoipIntrGpio( unsigned char dspNum, unsigned short *pusValue );
399
400 /**************************************************************************
401  * Name       : BpGetUartRtsCtsGpios
402  *
403  * Description: This function returns the GPIO pin assignments for RTS and CTS
404  *              UART signals.
405  *
406  * Parameters : [OUT] pusRts - Address of short word that the UART RTS GPIO
407  *                  pin is returned in.
408  *              [OUT] pusCts - Address of short word that the UART CTS GPIO
409  *                  pin is returned in.
410  *
411  * Returns    : BP_SUCCESS - Success, values are returned.
412  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
413  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
414  *                  for the board.
415  ***************************************************************************/
416 int BpGetRtsCtsUartGpios( unsigned short *pusRts, unsigned short *pusCts );
417
418 /**************************************************************************
419  * Name       : BpGetAdslLedGpio
420  *
421  * Description: This function returns the GPIO pin assignment for the ADSL
422  *              LED.
423  *
424  * Parameters : [OUT] pusValue - Address of short word that the ADSL LED
425  *                  GPIO pin is returned in.
426  *
427  * Returns    : BP_SUCCESS - Success, value is returned.
428  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
429  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
430  *                  for the board.
431  ***************************************************************************/
432 int BpGetAdslLedGpio( unsigned short *pusValue );
433
434 /**************************************************************************
435  * Name       : BpGetAdslFailLedGpio
436  *
437  * Description: This function returns the GPIO pin assignment for the ADSL
438  *              LED that is used when there is a DSL connection failure.
439  *
440  * Parameters : [OUT] pusValue - Address of short word that the ADSL LED
441  *                  GPIO pin is returned in.
442  *
443  * Returns    : BP_SUCCESS - Success, value is returned.
444  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
445  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
446  *                  for the board.
447  ***************************************************************************/
448 int BpGetAdslFailLedGpio( unsigned short *pusValue );
449
450 /**************************************************************************
451  * Name       : BpGetWirelessLedGpio
452  *
453  * Description: This function returns the GPIO pin assignment for the Wireless
454  *              LED.
455  *
456  * Parameters : [OUT] pusValue - Address of short word that the Wireless LED
457  *                  GPIO pin is returned in.
458  *
459  * Returns    : BP_SUCCESS - Success, value is returned.
460  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
461  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
462  *                  for the board.
463  ***************************************************************************/
464 int BpGetWirelessLedGpio( unsigned short *pusValue );
465
466 /**************************************************************************
467  * Name       : BpGetWirelessAntInUse
468  *
469  * Description: This function returns the antennas in use for wireless
470  *
471  * Parameters : [OUT] pusValue - Address of short word that the Wireless Antenna
472  *                  is in use.
473  *
474  * Returns    : BP_SUCCESS - Success, value is returned.
475  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
476  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
477  *                  for the board.
478  ***************************************************************************/
479 int BpGetWirelessAntInUse( unsigned short *pusValue );
480
481 /**************************************************************************
482  * Name       : BpGetWirelessFlags
483  *
484  * Description: This function returns optional control flags for wireless
485  *
486  * Parameters : [OUT] pusValue - Address of short word control flags
487  *
488  * Returns    : BP_SUCCESS - Success, value is returned.
489  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
490  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
491  *                  for the board.
492  ***************************************************************************/
493 int BpGetWirelessFlags( unsigned short *pusValue );
494
495 /**************************************************************************
496  * Name       : BpGetWirelessSesBtnGpio
497  *
498  * Description: This function returns the GPIO pin assignment for the Wireless
499  *              Ses Button.
500  *
501  * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses
502  *                  Button GPIO pin is returned in.
503  *
504  * Returns    : BP_SUCCESS - Success, value is returned.
505  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
506  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
507  *                  for the board.
508  ***************************************************************************/
509 int BpGetWirelessSesBtnGpio( unsigned short *pusValue );
510
511 /**************************************************************************
512  * Name       : BpGetWirelessSesExtIntr
513  *
514  * Description: This function returns the external interrupt number for the 
515  *              Wireless Ses Button.
516  *
517  * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses
518  *                  external interrup is returned in.
519  *
520  * Returns    : BP_SUCCESS - Success, value is returned.
521  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
522  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
523  *                  for the board.
524  ***************************************************************************/
525 int BpGetWirelessSesExtIntr( unsigned short *pusValue );
526
527 /**************************************************************************
528  * Name       : BpGetWirelessSesLedGpio
529  *
530  * Description: This function returns the GPIO pin assignment for the Wireless
531  *              Ses Led.
532  *
533  * Parameters : [OUT] pusValue - Address of short word that the Wireless Ses
534  *                  Led GPIO pin is returned in.
535  *
536  * Returns    : BP_SUCCESS - Success, value is returned.
537  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
538  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
539  *                  for the board.
540  ***************************************************************************/
541 int BpGetWirelessSesLedGpio( unsigned short *pusValue );
542
543 /**************************************************************************
544  * Name       : BpGetUsbLedGpio
545  *
546  * Description: This function returns the GPIO pin assignment for the USB
547  *              LED.
548  *
549  * Parameters : [OUT] pusValue - Address of short word that the USB LED
550  *                  GPIO pin is returned in.
551  *
552  * Returns    : BP_SUCCESS - Success, value is returned.
553  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
554  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
555  *                  for the board.
556  ***************************************************************************/
557 int BpGetUsbLedGpio( unsigned short *pusValue );
558
559 /**************************************************************************
560  * Name       : BpGetHpnaLedGpio
561  *
562  * Description: This function returns the GPIO pin assignment for the HPNA
563  *              LED.
564  *
565  * Parameters : [OUT] pusValue - Address of short word that the HPNA LED
566  *                  GPIO pin is returned in.
567  *
568  * Returns    : BP_SUCCESS - Success, value is returned.
569  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
570  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
571  *                  for the board.
572  ***************************************************************************/
573 int BpGetHpnaLedGpio( unsigned short *pusValue );
574
575 /**************************************************************************
576  * Name       : BpGetWanDataLedGpio
577  *
578  * Description: This function returns the GPIO pin assignment for the WAN Data
579  *              LED.
580  *
581  * Parameters : [OUT] pusValue - Address of short word that the WAN Data LED
582  *                  GPIO pin is returned in.
583  *
584  * Returns    : BP_SUCCESS - Success, value is returned.
585  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
586  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
587  *                  for the board.
588  ***************************************************************************/
589 int BpGetWanDataLedGpio( unsigned short *pusValue );
590
591 /**************************************************************************
592  * Name       : BpGetPppLedGpio
593  *
594  * Description: This function returns the GPIO pin assignment for the PPP
595  *              LED.
596  *
597  * Parameters : [OUT] pusValue - Address of short word that the PPP LED
598  *                  GPIO pin is returned in.
599  *
600  * Returns    : BP_SUCCESS - Success, value is returned.
601  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
602  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
603  *                  for the board.
604  ***************************************************************************/
605 int BpGetPppLedGpio( unsigned short *pusValue );
606
607 /**************************************************************************
608  * Name       : BpGetPppFailLedGpio
609  *
610  * Description: This function returns the GPIO pin assignment for the PPP
611  *              LED that is used when there is a PPP connection failure.
612  *
613  * Parameters : [OUT] pusValue - Address of short word that the PPP LED
614  *                  GPIO pin is returned in.
615  *
616  * Returns    : BP_SUCCESS - Success, value is returned.
617  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
618  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
619  *                  for the board.
620  ***************************************************************************/
621 int BpGetPppFailLedGpio( unsigned short *pusValue );
622
623 /**************************************************************************
624  * Name       : BpGetVoipLedGpio
625  *
626  * Description: This function returns the GPIO pin assignment for the VOIP
627  *              LED.
628  *
629  * Parameters : [OUT] pusValue - Address of short word that the VOIP LED
630  *                  GPIO pin is returned in.
631  *
632  * Returns    : BP_SUCCESS - Success, value is returned.
633  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
634  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
635  *                  for the board.
636  ***************************************************************************/
637 int BpGetVoipLedGpio( unsigned short *pusValue );
638
639 /**************************************************************************
640  * Name       : BpGetBootloaderPowerOnLedGpio
641  *
642  * Description: This function returns the GPIO pin assignment for the power
643  *              on LED that is set by the bootloader.
644  *
645  * Parameters : [OUT] pusValue - Address of short word that the alarm LED
646  *                  GPIO pin is returned in.
647  *
648  * Returns    : BP_SUCCESS - Success, value is returned.
649  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
650  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
651  *                  for the board.
652  ***************************************************************************/
653 int BpGetBootloaderPowerOnLedGpio( unsigned short *pusValue );
654
655 /**************************************************************************
656  * Name       : BpGetBootloaderResetCfgLedGpio
657  *
658  * Description: This function returns the GPIO pin assignment for the reset
659  *              configuration LED that is set by the bootloader.
660  *
661  * Parameters : [OUT] pusValue - Address of short word that the reset
662  *                  configuration LED GPIO pin is returned in.
663  *
664  * Returns    : BP_SUCCESS - Success, value is returned.
665  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
666  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
667  *                  for the board.
668  ***************************************************************************/
669 int BpGetBootloaderResetCfgLedGpio( unsigned short *pusValue );
670
671 /**************************************************************************
672  * Name       : BpGetBootloaderStopLedGpio
673  *
674  * Description: This function returns the GPIO pin assignment for the break
675  *              into bootloader LED that is set by the bootloader.
676  *
677  * Parameters : [OUT] pusValue - Address of short word that the break into
678  *                  bootloader LED GPIO pin is returned in.
679  *
680  * Returns    : BP_SUCCESS - Success, value is returned.
681  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
682  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
683  *                  for the board.
684  ***************************************************************************/
685 int BpGetBootloaderStopLedGpio( unsigned short *pusValue );
686
687 /**************************************************************************
688  * Name       : BpGetAdslDyingGaspExtIntr
689  *
690  * Description: This function returns the ADSL Dying Gasp external interrupt
691  *              number.
692  *
693  * Parameters : [OUT] pulValue - Address of short word that the ADSL Dying Gasp
694  *                  external interrupt number is returned in.
695  *
696  * Returns    : BP_SUCCESS - Success, value is returned.
697  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
698  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
699  *                  for the board.
700  ***************************************************************************/
701 int BpGetAdslDyingGaspExtIntr( unsigned long *pulValue );
702
703 /**************************************************************************
704  * Name       : BpGetVoipExtIntr
705  *
706  * Description: This function returns the VOIP external interrupt number.
707  *
708  * Parameters : [OUT] pulValue - Address of short word that the VOIP
709  *                  external interrupt number is returned in.
710  *              [IN] dspNum - Address of the DSP to query.
711  *
712  * Returns    : BP_SUCCESS - Success, value is returned.
713  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
714  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
715  *                  for the board.
716  ***************************************************************************/
717 int BpGetVoipExtIntr( unsigned char dspNum, unsigned long *pulValue );
718
719 /**************************************************************************
720  * Name       : BpGetHpnaExtIntr
721  *
722  * Description: This function returns the HPNA external interrupt number.
723  *
724  * Parameters : [OUT] pulValue - Address of short word that the HPNA
725  *                  external interrupt number is returned in.
726  *
727  * Returns    : BP_SUCCESS - Success, value is returned.
728  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
729  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
730  *                  for the board.
731  ***************************************************************************/
732 int BpGetHpnaExtIntr( unsigned long *pulValue );
733
734 /**************************************************************************
735  * Name       : BpGetHpnaChipSelect
736  *
737  * Description: This function returns the HPNA chip select number.
738  *
739  * Parameters : [OUT] pulValue - Address of short word that the HPNA
740  *                  chip select number is returned in.
741  *
742  * Returns    : BP_SUCCESS - Success, value is returned.
743  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
744  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
745  *                  for the board.
746  ***************************************************************************/
747 int BpGetHpnaChipSelect( unsigned long *pulValue );
748
749 /**************************************************************************
750  * Name       : BpGetVoipChipSelect
751  *
752  * Description: This function returns the VOIP chip select number.
753  *
754  * Parameters : [OUT] pulValue - Address of short word that the VOIP
755  *                  chip select number is returned in.
756  *              [IN] dspNum - Address of the DSP to query.
757  *
758  * Returns    : BP_SUCCESS - Success, value is returned.
759  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
760  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
761  *                  for the board.
762  ***************************************************************************/
763 int BpGetVoipChipSelect( unsigned char dspNum, unsigned long *pulValue );
764
765 /**************************************************************************
766  * Name       : BpGetCMTThread
767  *
768  * Description: This function returns CMT thread number to run main code
769  *
770  * Parameters : [OUT] pulValue - CMT thread number to run main code
771  *
772  * Returns    : BP_SUCCESS - Success, value is returned.
773  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
774  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
775  *                  for the board.
776  ***************************************************************************/
777 int BpGetCMTThread( unsigned long *pulValue );
778
779 /**************************************************************************
780  * Name       : BpGetHpiChipSelect
781  *
782  * Description: This function returns the HPI chip select number.
783  *
784  * Parameters : [OUT] pulValue - Address of short word that the HPNA
785                 chip select number is returned in.
786  *
787  * Returns    : BP_SUCCESS           - Success, value is returned.
788  *              BP_BOARD_ID_NOT_SET  - Error, BpSetBoardId has not been called.
789  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
790  *                                     for the board.
791  ***************************************************************************/
792 int BpGetHpiChipSelect( unsigned long *pulValue );
793
794 /**************************************************************************
795  * Name       : BpGetVcopeGpio 
796  *
797  * Description: This function returns the GPIO number of VCOPE board
798  *
799  * Parameters : [OUT] - GPIO index (name)
800  *
801  * Returns    : pin number      - Success
802  *              BP_NOT_DEFINED  - any kind of Error
803  ***************************************************************************/
804 int BpGetVcopeGpio(int pio_idx);
805
806 /**************************************************************************
807  * Name       : BpGetPressAndHoldResetExtIntr
808  *
809  * Description: This function returns the external interrupt number for the 
810  *              Press and Hold Reset button.
811  *
812  * Parameters : [OUT] pusValue - Address of short word that the Press and
813  *                  Hold Reset external interrupt is returned in.
814  *
815  * Returns    : BP_SUCCESS - Success, value is returned.
816  *              BP_BOARD_ID_NOT_SET - Error, BpSetBoardId has not been called.
817  *              BP_VALUE_NOT_DEFINED - At least one return value is not defined
818  *                  for the board.
819  ***************************************************************************/
820 int BpGetPressAndHoldResetExtIntr( unsigned short *pusValue );
821
822 #endif /* __ASSEMBLER__ */
823
824 #ifdef __cplusplus
825 }
826 #endif
827
828 #endif /* _BOARDPARMS_H */
829