Home | History | Annotate | Line # | Download | only in xscale
ixp425_npevar.h revision 1.1
      1  1.1  scw /*	$NetBSD: ixp425_npevar.h,v 1.1 2006/12/10 10:01:49 scw Exp $	*/
      2  1.1  scw 
      3  1.1  scw /*-
      4  1.1  scw  * Copyright (c) 2006 Sam Leffler.  All rights reserved.
      5  1.1  scw  *
      6  1.1  scw  * Redistribution and use in source and binary forms, with or without
      7  1.1  scw  * modification, are permitted provided that the following conditions
      8  1.1  scw  * are met:
      9  1.1  scw  * 1. Redistributions of source code must retain the above copyright
     10  1.1  scw  *    notice, this list of conditions and the following disclaimer.
     11  1.1  scw  * 2. Redistributions in binary form must reproduce the above copyright
     12  1.1  scw  *    notice, this list of conditions and the following disclaimer in the
     13  1.1  scw  *    documentation and/or other materials provided with the distribution.
     14  1.1  scw  *
     15  1.1  scw  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     16  1.1  scw  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     17  1.1  scw  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     18  1.1  scw  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     19  1.1  scw  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     20  1.1  scw  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     21  1.1  scw  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     22  1.1  scw  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     23  1.1  scw  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     24  1.1  scw  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     25  1.1  scw  *
     26  1.1  scw  * $FreeBSD: src/sys/arm/xscale/ixp425/ixp425_npevar.h,v 1.1 2006/11/19 23:55:23 sam Exp $
     27  1.1  scw  */
     28  1.1  scw 
     29  1.1  scw #ifndef _IXP425_NPEVAR_H_
     30  1.1  scw #define _IXP425_NPEVAR_H_
     31  1.1  scw 
     32  1.1  scw /*
     33  1.1  scw  * Intel (R) IXP400 Software NPE Image ID Definition
     34  1.1  scw  *
     35  1.1  scw  * Firmware Id's for current firmware image.  These are typed by
     36  1.1  scw  * NPE ID and the feature set.  Not all features are available
     37  1.1  scw  * on all NPE's.
     38  1.1  scw  *
     39  1.1  scw  * HSS-0: supports 32 channelized and 4 packetized.
     40  1.1  scw  * HSS-0 + ATM + SPHY:
     41  1.1  scw  *    For HSS, 16/32 channelized and 4/0 packetized.
     42  1.1  scw  *    For ATM, AAL5, AAL0 and OAM for UTOPIA SPHY, 1 logical port, 32 VCs.
     43  1.1  scw  *    Fast Path support.
     44  1.1  scw  * HSS-0 + ATM + MPHY:
     45  1.1  scw  *    For HSS, 16/32 channelized and 4/0 packetized.
     46  1.1  scw  *    For ATM, AAL5, AAL0 and OAM for UTOPIA MPHY, 1 logical port, 32 VCs.
     47  1.1  scw  *    Fast Path support.
     48  1.1  scw  * ATM-Only:
     49  1.1  scw  *    AAL5, AAL0 and OAM for UTOPIA MPHY, 12 logical ports, 32 VCs.
     50  1.1  scw  *    Fast Path support.
     51  1.1  scw  * HSS-2:
     52  1.1  scw  *    HSS-0 and HSS-1.
     53  1.1  scw  *    Each HSS port supports 32 channelized and 4 packetized.
     54  1.1  scw  * ETH: Ethernet Rx/Tx which includes:
     55  1.1  scw  *    MAC_FILTERING, MAC_LEARNING, SPANNING_TREE, FIREWALL
     56  1.1  scw  * ETH+VLAN Ethernet Rx/Tx which includes:
     57  1.1  scw  *    MAC_FILTERING, MAC_LEARNING, SPANNING_TREE, FIREWALL, VLAN_QOS
     58  1.1  scw  * ETH+VLAN+HDR: Ethernet Rx/Tx which includes:
     59  1.1  scw  *    SPANNING_TREE, FIREWALL, VLAN_QOS, HEADER_CONVERSION
     60  1.1  scw  */
     61  1.1  scw /* XXX not right, revise */
     62  1.1  scw /* NPE A Firmware Image Id's */
     63  1.1  scw #define	NPEFW_A_HSS0		0x00010000 /* HSS-0: 32 chan+4 packet */
     64  1.1  scw #define NPEFW_A_HSS0_ATM_S_1	0x00020000 /* HSS-0+ATM UTOPIA SPHY (1 port) */
     65  1.1  scw #define NPEFW_A_HSS0_ATM_M_1	0x00020000 /* HSS-0+ATM UTOPIA MPHY (1 port) */
     66  1.1  scw #define NPEFW_A_ATM_M_12	0x00040000 /* ATM UTOPIA MPHY (12 ports) */
     67  1.1  scw #define NPEFW_A_DMA		0x00150100 /* DMA only */
     68  1.1  scw #define	NPEFW_A_HSS2		0x00090000 /* HSS-0 + HSS-1 */
     69  1.1  scw #define	NPEFW_A_ETH		0x10800200 /* Basic Ethernet */
     70  1.1  scw #define	NPEFW_A_ETH_VLAN	0x10810200 /* NPEFW_A_ETH + VLAN QoS */
     71  1.1  scw #define	NPEFW_A_ETH_VLAN_HDR	0x10820200 /* NPEFW_A_ETH_VLAN + Hdr conv */
     72  1.1  scw /* XXX ... more not included */
     73  1.1  scw 
     74  1.1  scw /* NPE B Firmware Image Id's */
     75  1.1  scw #define NPEFW_B_ETH		0x01000200 /* Basic Ethernet */
     76  1.1  scw #define NPEFW_B_ETH_VLAN	0x01010200 /* NPEFW_B_ETH + VLAN QoS */
     77  1.1  scw #define NPEFW_B_ETH_VLAN_HDR	0x01020201 /* NPEFW_B_ETH_VLAN + Hdr conv */
     78  1.1  scw #define NPEFW_B_DMA		0x01020100 /* DMA only */
     79  1.1  scw /* XXX ... more not include */
     80  1.1  scw 
     81  1.1  scw #define	IXP425_NPE_B_IMAGEID	0x01000201
     82  1.1  scw #define	IXP425_NPE_C_IMAGEID	0x02000201
     83  1.1  scw 
     84  1.1  scw struct ixpnpe_softc;
     85  1.1  scw 
     86  1.1  scw int	ixpnpe_stopandreset(struct ixpnpe_softc *);
     87  1.1  scw int	ixpnpe_start(struct ixpnpe_softc *);
     88  1.1  scw int	ixpnpe_stop(struct ixpnpe_softc *);
     89  1.1  scw int	ixpnpe_init(struct ixpnpe_softc *, const char *imageName,
     90  1.1  scw 	    uint32_t imageId);
     91  1.1  scw int	ixpnpe_getfunctionality(struct ixpnpe_softc *sc);
     92  1.1  scw 
     93  1.1  scw int	ixpnpe_sendmsg(struct ixpnpe_softc *, const uint32_t msg[2]);
     94  1.1  scw int	ixpnpe_recvmsg(struct ixpnpe_softc *, uint32_t msg[2]);
     95  1.1  scw int	ixpnpe_sendandrecvmsg(struct ixpnpe_softc *, const uint32_t send[2],
     96  1.1  scw 	    uint32_t recv[2]);
     97  1.1  scw 
     98  1.1  scw struct ixpnpe_attach_args {
     99  1.1  scw 	int na_unit;
    100  1.1  scw 	int na_phy;
    101  1.1  scw 	struct ixpnpe_softc *na_npe;
    102  1.1  scw 	bus_space_tag_t na_iot;
    103  1.1  scw 	bus_dma_tag_t na_dt;
    104  1.1  scw };
    105  1.1  scw 
    106  1.1  scw #endif /* _IXP425_NPEVAR_H_ */
    107