Home | History | Annotate | Download | only in xaui
      1 /*
      2  * CDDL HEADER START
      3  *
      4  * The contents of this file are subject to the terms of the
      5  * Common Development and Distribution License (the "License").
      6  * You may not use this file except in compliance with the License.
      7  *
      8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9  * or http://www.opensolaris.org/os/licensing.
     10  * See the License for the specific language governing permissions
     11  * and limitations under the License.
     12  *
     13  * When distributing Covered Code, include this CDDL HEADER in each
     14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15  * If applicable, add the following below this CDDL HEADER, with the
     16  * fields enclosed by brackets "[]" replaced with your own identifying
     17  * information: Portions Copyright [yyyy] [name of copyright owner]
     18  *
     19  * CDDL HEADER END
     20  */
     21 
     22 /*
     23  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
     24  * Use is subject to license terms.
     25  */
     26 
     27 #ifndef _XAUI_H
     28 #define	_XAUI_H
     29 
     30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
     31 
     32 #ifdef __cplusplus
     33 extern "C" {
     34 #endif
     35 
     36 /*
     37  * When all we're provided is a physical slot number, these structures
     38  * allow us to attach an accompanying label.
     39  */
     40 typedef struct physnm {
     41 	int ps_num;
     42 	const char *ps_label;
     43 } physnm_t;
     44 
     45 typedef struct pphysnm {
     46 	const char *pnm_platform;	/* platform on which the names apply */
     47 	int pnm_nnames;			/* number of names */
     48 	struct physnm *pnm_names;	/* array of labels */
     49 } pphysnm_t;
     50 
     51 typedef struct physlot_names {
     52 	int psn_nplats;
     53 	struct pphysnm *psn_names;
     54 } physlot_names_t;
     55 
     56 /* T5120/T5220 xaui slot numbers */
     57 physnm_t t5120_pnms[] = {
     58 	/* Slot #, Label */
     59 	{   0, "MB/RISER2/XAUI0" },
     60 	{   1, "MB/RISER3/XAUI1" }
     61 };
     62 
     63 /* T5140/T5240 xaui slot numbers */
     64 physnm_t t5140_pnms[] = {
     65 	/* Slot #, Label */
     66 	{   0, "MB/RISER0/XAUI0" },
     67 	{   1, "MB/RISER1/XAUI1" }
     68 };
     69 
     70 /* T5440 xaui slot numbers */
     71 physnm_t t5440_pnms[] = {
     72 	/* Slot #, Label */
     73 	{   0, "MB/XAUI0" },
     74 	{   1, "MB/XAUI1" }
     75 };
     76 
     77 pphysnm_t plat_pnames[] = {
     78 	{ "SPARC-Enterprise-T5120",
     79 	sizeof (t5120_pnms) / sizeof (physnm_t),
     80 	t5120_pnms },
     81 	{ "SPARC-Enterprise-T5220",
     82 	sizeof (t5120_pnms) / sizeof (physnm_t),
     83 	t5120_pnms },
     84 	{ "T5140",
     85 	sizeof (t5140_pnms) / sizeof (physnm_t),
     86 	t5140_pnms },
     87 	{ "T5240",
     88 	sizeof (t5140_pnms) / sizeof (physnm_t),
     89 	t5140_pnms },
     90 	{ "T5440",
     91 	sizeof (t5440_pnms) / sizeof (physnm_t),
     92 	t5440_pnms }
     93 };
     94 
     95 physlot_names_t PhyxauiNMs = {
     96 	sizeof (plat_pnames) / sizeof (pphysnm_t),
     97 	plat_pnames
     98 };
     99 
    100 physlot_names_t *Phyxaui_Names = &PhyxauiNMs;
    101 
    102 #ifdef __cplusplus
    103 }
    104 #endif
    105 
    106 #endif /* _XAUI_H */
    107