Re: [U-Boot-Users] IXP4XX NPE Support

Hi Stefan, Thanks for the file, the build works again, so now I am moving to the next steps, it appears that the software is not recognizing the NPE, so I would imagine that there are some vars that need to be added to the "include/configs/ixdp425.h" to make the port available. Mike
--- Stefan Roese sr@denx.de wrote:
Hi Michael,
On Wednesday 07 June 2006 16:25, Michael Sprauve wrote:
I noticed the one file missing (IxNpeMicrocode.c)
but
was able to include my local copy in the build (assuming that your version is same), but it seems like the build is choking on the include file used
by
npe.c.
It seems that we broke the code in IxEthDB.h while trying to clean it from "//" style comments. With the attached (test-)version of this file the build should work again.
Best regards, Stefan
/** @file IxEthDB.h
- @brief this file contains the public API of @ref
IxEthDB component
- @par
- IXP400 SW Release version 2.0
- -- Copyright Notice --
- @par
- Copyright 2001-2005, Intel Corporation.
- All rights reserved.
- @par
- Redistribution and use in source and binary
forms, with or without
- modification, are permitted provided that the
following conditions
- are met:
- Redistributions of source code must retain the
above copyright
- notice, this list of conditions and the
following disclaimer.
- Redistributions in binary form must reproduce
the above copyright
- notice, this list of conditions and the
following disclaimer in the
- documentation and/or other materials provided
with the distribution.
- Neither the name of the Intel Corporation nor
the names of its contributors
- may be used to endorse or promote products
derived from this software
- without specific prior written permission.
- @par
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
HOLDERS AND CONTRIBUTORS ``AS IS''
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS
- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF
- SUCH DAMAGE.
- @par
- -- End of Copyright Notice --
*/
#ifndef IxEthDB_H #define IxEthDB_H
#include <IxOsBuffMgt.h> #include <IxTypes.h>
/**
- @defgroup IxEthDB IXP400 Ethernet Database
(IxEthDB) API
- @brief ethDB is a library that does provides a
MAC address database learning/filtering capability
*@{ */
#define INLINE __inline__
#define IX_ETH_DB_PRIVATE PRIVATE /* imported from IxTypes.h */
#define IX_ETH_DB_PUBLIC PUBLIC
/**
- @brief port ID => message handler NPE id
conversion (0 => NPE_B, 1 => NPE_C) */ #define IX_ETH_DB_PORT_ID_TO_NPE(id) (id == 0 ? 1 : (id == 1 ? 2 : (id == 2 ? 0 : -1)))
/**
- @def IX_ETH_DB_NPE_TO_PORT_ID(npe)
- @brief message handler NPE id => port ID
conversion (NPE_B => 0, NPE_C => 1) */ #define IX_ETH_DB_NPE_TO_PORT_ID(npe) (npe == 0 ? 2 : (npe == 1 ? 0 : (npe == 2 ? 1 : -1)))
/* temporary define - won't work for Azusa */ #define IX_ETH_DB_PORT_ID_TO_NPE_LOGICAL_ID(id) (IX_ETH_DB_PORT_ID_TO_NPE(id) << 4) #define IX_ETH_DB_NPE_LOGICAL_ID_TO_PORT_ID(id) (IX_ETH_DB_NPE_TO_PORT_ID(id >> 4))
/**
- @def IX_IEEE803_MAC_ADDRESS_SIZE
- @brief The size of the MAC address
*/ #define IX_IEEE803_MAC_ADDRESS_SIZE (6)
/**
- @def IX_IEEE802_1Q_QOS_PRIORITY_COUNT
- @brief Number of QoS priorities defined by
IEEE802.1Q */ #define IX_IEEE802_1Q_QOS_PRIORITY_COUNT (8)
/**
- @enum IxEthDBStatus
- @brief Ethernet Database API return values
*/ typedef enum /* IxEthDBStatus */ { IX_ETH_DB_SUCCESS = IX_SUCCESS, /**< Success */ IX_ETH_DB_FAIL = IX_FAIL, /**< Failure */ IX_ETH_DB_INVALID_PORT, /**< Invalid port */ IX_ETH_DB_PORT_UNINITIALIZED, /**< Port not initialized */ IX_ETH_DB_MAC_UNINITIALIZED, /**< MAC not initialized */ IX_ETH_DB_INVALID_ARG, /**< Invalid argument */ IX_ETH_DB_NO_SUCH_ADDR, /**< Address not found for search or delete operations */ IX_ETH_DB_NOMEM, /**< Learning database memory full */ IX_ETH_DB_BUSY, /**< Learning database cannot complete operation, access temporarily blocked */ IX_ETH_DB_END, /**< Database browser passed the end of the record set */ IX_ETH_DB_INVALID_VLAN, /**< Invalid VLAN ID (valid range is 0..4094, 0 signifies no VLAN membership, used for priority tagged frames) */ IX_ETH_DB_INVALID_PRIORITY, /**< Invalid QoS priority/traffic class (valid range for QoS priority is 0..7, valid range for traffic class depends on run-time configuration) */ IX_ETH_DB_NO_PERMISSION, /**< No permission for attempted operation */ IX_ETH_DB_FEATURE_UNAVAILABLE, /**< Feature not available (or not enabled) */ IX_ETH_DB_INVALID_KEY, /**< Invalid search key */ IX_ETH_DB_INVALID_RECORD_TYPE /**< Invalid record type */ } IxEthDBStatus;
/** @brief VLAN ID type, valid range is 0..4094, 0 signifying no VLAN membership */ typedef UINT32 IxEthDBVlanId;
/** @brief 802.1Q VLAN tag, contains 3 bits user priority, 1 bit CFI, 12 bits VLAN ID */ typedef UINT32 IxEthDBVlanTag;
/** @brief QoS priority/traffic class type, valid range is 0..7, 0 being the lowest */ typedef UINT32 IxEthDBPriority;
/** @brief Priority mapping table; 0..7 QoS priorities used to index, table contains traffic classes */ typedef UINT8 IxEthDBPriorityTable[8];
/** @brief A 4096 bit array used to map the complete VLAN ID range */ typedef UINT8 IxEthDBVlanSet[512];
#define IX_ETH_DB_802_1Q_VLAN_MASK (0xFFF) #define IX_ETH_DB_802_1Q_QOS_MASK (0x7)
#define IX_ETH_DB_802_1Q_MAX_VLAN_ID (0xFFE)
/**
- @def IX_ETH_DB_SET_VLAN_ID
- @brief returns the given 802.1Q tag with the VLAN
ID field substituted with the given VLAN ID
- This macro is used to change the VLAN ID in a
802.1Q tag.
- Example:
- tag = IX_ETH_DB_SET_VLAN_ID(tag, 32)
=== message truncated ===
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

Hi Mike,
On Thursday 08 June 2006 18:40, Michael Sprauve wrote:
Thanks for the file, the build works again, so now I am moving to the next steps, it appears that the software is not recognizing the NPE, so I would imagine that there are some vars that need to be added to the "include/configs/ixdp425.h" to make the port available.
I think you just have to set the MAC address environment variables (ethaddr & eth1addr) and reset the board. This should do it.
Best regards, Stefan
participants (2)
-
Michael Sprauve
-
Stefan Roese