Commit fe4d2755 authored by David Kilroy's avatar David Kilroy Committed by Greg Kroah-Hartman

staging: wlags49_h2: Reindent hcfdef.h

Untabified with tab-width set to 4. Reindented with linux style.

Also remove BITN macros.
Signed-off-by: default avatarDavid Kilroy <kilroyd@googlemail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ada4f4f8
// vim:tw=110:ts=4:
#ifndef HCFDEFC_H #ifndef HCFDEFC_H
#define HCFDEFC_H 1 #define HCFDEFC_H 1
/************************************************************************************************* /*************************************************************************************************
* *
* FILE : HCFDEF.H * FILE : HCFDEF.H
* *
* DATE : $Date: 2004/08/05 11:47:10 $ $Revision: 1.8 $ * DATE : $Date: 2004/08/05 11:47:10 $ $Revision: 1.8 $
* Original: 2004/05/28 14:05:35 Revision: 1.59 Tag: hcf7_t20040602_01 * Original: 2004/05/28 14:05:35 Revision: 1.59 Tag: hcf7_t20040602_01
* Original: 2004/05/13 15:31:45 Revision: 1.53 Tag: hcf7_t7_20040513_01 * Original: 2004/05/13 15:31:45 Revision: 1.53 Tag: hcf7_t7_20040513_01
* Original: 2004/04/15 09:24:42 Revision: 1.44 Tag: hcf7_t7_20040415_01 * Original: 2004/04/15 09:24:42 Revision: 1.44 Tag: hcf7_t7_20040415_01
* Original: 2004/04/13 14:22:45 Revision: 1.43 Tag: t7_20040413_01 * Original: 2004/04/13 14:22:45 Revision: 1.43 Tag: t7_20040413_01
* Original: 2004/04/01 15:32:55 Revision: 1.40 Tag: t7_20040401_01 * Original: 2004/04/01 15:32:55 Revision: 1.40 Tag: t7_20040401_01
* Original: 2004/03/10 15:39:28 Revision: 1.36 Tag: t20040310_01 * Original: 2004/03/10 15:39:28 Revision: 1.36 Tag: t20040310_01
* Original: 2004/03/03 14:10:12 Revision: 1.34 Tag: t20040304_01 * Original: 2004/03/03 14:10:12 Revision: 1.34 Tag: t20040304_01
* Original: 2004/03/02 09:27:12 Revision: 1.32 Tag: t20040302_03 * Original: 2004/03/02 09:27:12 Revision: 1.32 Tag: t20040302_03
* Original: 2004/02/24 13:00:29 Revision: 1.29 Tag: t20040224_01 * Original: 2004/02/24 13:00:29 Revision: 1.29 Tag: t20040224_01
* Original: 2004/02/18 17:13:57 Revision: 1.26 Tag: t20040219_01 * Original: 2004/02/18 17:13:57 Revision: 1.26 Tag: t20040219_01
* *
* AUTHOR : Nico Valster * AUTHOR : Nico Valster
* *
* SPECIFICATION: ........... * SPECIFICATION: ...........
* *
* DESC : Definitions and Prototypes for HCF only * DESC : Definitions and Prototypes for HCF only
* *
************************************************************************************************** **************************************************************************************************
* *
* *
* SOFTWARE LICENSE * SOFTWARE LICENSE
* *
* This software is provided subject to the following terms and conditions, * This software is provided subject to the following terms and conditions,
* which you should read carefully before using the software. Using this * which you should read carefully before using the software. Using this
* software indicates your acceptance of these terms and conditions. If you do * software indicates your acceptance of these terms and conditions. If you do
* not agree with these terms and conditions, do not use the software. * not agree with these terms and conditions, do not use the software.
* *
* COPYRIGHT 1994 - 1995 by AT&T. All Rights Reserved * COPYRIGHT © 1994 - 1995 by AT&T. All Rights Reserved
* COPYRIGHT 1996 - 2000 by Lucent Technologies. All Rights Reserved * COPYRIGHT © 1996 - 2000 by Lucent Technologies. All Rights Reserved
* COPYRIGHT 2001 - 2004 by Agere Systems Inc. All Rights Reserved * COPYRIGHT © 2001 - 2004 by Agere Systems Inc. All Rights Reserved
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source or binary forms, with or without * Redistribution and use in source or binary forms, with or without
* modifications, are permitted provided that the following conditions are met: * modifications, are permitted provided that the following conditions are met:
* *
* . Redistributions of source code must retain the above copyright notice, this * . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following Disclaimer as comments in the code as * list of conditions and the following Disclaimer as comments in the code as
* well as in the documentation and/or other materials provided with the * well as in the documentation and/or other materials provided with the
* distribution. * distribution.
* *
* . Redistributions in binary form must reproduce the above copyright notice, * . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following Disclaimer in the documentation * this list of conditions and the following Disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* *
* . Neither the name of Agere Systems Inc. nor the names of the contributors * . Neither the name of Agere Systems Inc. nor the names of the contributors
* may be used to endorse or promote products derived from this software * may be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* Disclaimer * Disclaimer
* *
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * 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 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE. * DAMAGE.
* *
* *
*************************************************************************************************/ *************************************************************************************************/
/************************************************************************************************/ /************************************************************************************************/
...@@ -85,41 +83,6 @@ ...@@ -85,41 +83,6 @@
/*************************************************************************************************/ /*************************************************************************************************/
#if 0 //
#define BIT0 0x0001
#define BIT1 0x0002
#define BIT2 0x0004
#define BIT3 0x0008
#define BIT4 0x0010
#define BIT5 0x0020
#define BIT6 0x0040
#define BIT7 0x0080
#define BIT8 0x0100
#define BIT9 0x0200
#define BIT10 0x0400
#define BIT11 0x0800
#define BIT12 0x1000
#define BIT13 0x2000
#define BIT14 0x4000
#define BIT15 0x8000
#define BIT16 0x00010000
#define BIT17 0x00020000
#define BIT18 0x00040000
#define BIT19 0x00080000
#define BIT20 0x00100000
#define BIT21 0x00200000
#define BIT22 0x00400000
#define BIT23 0x00800000
#define BIT24 0x01000000
#define BIT25 0x02000000
#define BIT26 0x04000000
#define BIT27 0x08000000
#define BIT28 0x10000000
#define BIT29 0x20000000
#define BIT30 0x40000000
#define BIT31 0x80000000
#endif // 0
/************************************************************************************************/ /************************************************************************************************/
/********************************* GENERAL EQUATES **********************************************/ /********************************* GENERAL EQUATES **********************************************/
/************************************************************************************************/ /************************************************************************************************/
...@@ -279,7 +242,7 @@ ...@@ -279,7 +242,7 @@
#define HREG_EV_RX 0x0001 // Asynchronous Receive Frame #define HREG_EV_RX 0x0001 // Asynchronous Receive Frame
#define HREG_EV_TX_EXT ( (HCF_EXT) & (HCF_EXT_INT_TX_EX | HCF_EXT_INT_TICK ) ) #define HREG_EV_TX_EXT ( (HCF_EXT) & (HCF_EXT_INT_TX_EX | HCF_EXT_INT_TICK ) )
/* HREG_EV_TX_EXT := 0x0000 or HREG_EV_TX_EXC and/or HREG_EV_TICK /* HREG_EV_TX_EXT := 0x0000 or HREG_EV_TX_EXC and/or HREG_EV_TICK
* could be extended with HREG_EV_TX */ * could be extended with HREG_EV_TX */
#if HCF_EXT_INT_TX_EX != HREG_EV_TX_EXC #if HCF_EXT_INT_TX_EX != HREG_EV_TX_EXC
err: these values should match; err: these values should match;
...@@ -315,9 +278,9 @@ err: these values should match; ...@@ -315,9 +278,9 @@ err: these values should match;
#if HCF_DMA #if HCF_DMA
//************************* DMA (bus mastering) //************************* DMA (bus mastering)
// Be careful to use these registers only at a genuine 32 bits NIC // Be careful to use these registers only at a genuine 32 bits NIC
// On 16 bits NICs, these addresses are mapped into the range 0x00 through 0x3F with all consequences // On 16 bits NICs, these addresses are mapped into the range 0x00 through 0x3F with all consequences
// thereof, e.g. HREG_DMA_CTRL register maps to HREG_CMD. // thereof, e.g. HREG_DMA_CTRL register maps to HREG_CMD.
#define HREG_DMA_CTRL 0x0040 #define HREG_DMA_CTRL 0x0040
#define HREG_TXDMA_PTR32 0x0044 #define HREG_TXDMA_PTR32 0x0044
#define HREG_TXDMA_PRIO_PTR32 0x0048 #define HREG_TXDMA_PRIO_PTR32 0x0048
...@@ -329,8 +292,8 @@ err: these values should match; ...@@ -329,8 +292,8 @@ err: these values should match;
#define HREG_DMA_RX_CNT 0x0026 #define HREG_DMA_RX_CNT 0x0026
/****************************************************************************** /******************************************************************************
* Defines for the bits in the DmaControl register (@40h) * Defines for the bits in the DmaControl register (@40h)
******************************************************************************/ ******************************************************************************/
#define HREG_DMA_CTRL_RXHWEN 0x80000000 // high word enable bit #define HREG_DMA_CTRL_RXHWEN 0x80000000 // high word enable bit
#define HREG_DMA_CTRL_RXRESET 0x40000000 // tx dma init bit #define HREG_DMA_CTRL_RXRESET 0x40000000 // tx dma init bit
#define HREG_DMA_CTRL_RXBAP1 BIT29 #define HREG_DMA_CTRL_RXBAP1 BIT29
...@@ -363,7 +326,7 @@ err: these values should match; ...@@ -363,7 +326,7 @@ err: these values should match;
#define DMA_CTRLSTAT_GO (HREG_DMA_CTRL_RXHWEN | HREG_DMA_CTRL_RX_MODE_MULTI_PACKET | \ #define DMA_CTRLSTAT_GO (HREG_DMA_CTRL_RXHWEN | HREG_DMA_CTRL_RX_MODE_MULTI_PACKET | \
HREG_DMA_CTRL_RXAUTOACK_DMAEN | HREG_DMA_CTRL_RXAUTOACK_RX | \ HREG_DMA_CTRL_RXAUTOACK_DMAEN | HREG_DMA_CTRL_RXAUTOACK_RX | \
HREG_DMA_CTRL_TXHWEN | /*;?HREG_DMA_CTRL_TX_TBUFCONT_PLAIN |*/ \ HREG_DMA_CTRL_TXHWEN | /*;?HREG_DMA_CTRL_TX_TBUFCONT_PLAIN |*/ \
HREG_DMA_CTRL_TX_MODE_MULTI_PACKET | HREG_DMA_CTRL_TXAUTOACK_DMAEN |\ HREG_DMA_CTRL_TX_MODE_MULTI_PACKET | HREG_DMA_CTRL_TXAUTOACK_DMAEN | \
HREG_DMA_CTRL_TXAUTOACK_DMAALLOC) HREG_DMA_CTRL_TXAUTOACK_DMAALLOC)
//configuration DWORD to reset both the Tx and Rx DMA engines //configuration DWORD to reset both the Tx and Rx DMA engines
...@@ -665,7 +628,7 @@ err: MSF should no longer supply this macro; ...@@ -665,7 +628,7 @@ err: MSF should no longer supply this macro;
#define IPW(x) ((hcf_16)IN_PORT_WORD( ifbp->IFB_IOBase + (x) ) ) #define IPW(x) ((hcf_16)IN_PORT_WORD( ifbp->IFB_IOBase + (x) ) )
#define OPW(x, y) OUT_PORT_WORD( ifbp->IFB_IOBase + (x), y ) #define OPW(x, y) OUT_PORT_WORD( ifbp->IFB_IOBase + (x), y )
/* make sure the implementation of HCF_WAIT_WHILE is such that there may be multiple HCF_WAIT_WHILE calls /* make sure the implementation of HCF_WAIT_WHILE is such that there may be multiple HCF_WAIT_WHILE calls
* in a row and that when one fails all subsequent fail immediately without reinitialization of prot_cnt * in a row and that when one fails all subsequent fail immediately without reinitialization of prot_cnt
*/ */
#if HCF_PROT_TIME == 0 #if HCF_PROT_TIME == 0
...@@ -725,22 +688,22 @@ err: someone redefined these macros while the implemenation assumes they are equ ...@@ -725,22 +688,22 @@ err: someone redefined these macros while the implemenation assumes they are equ
#define MMDASSERT(x,q) {if (!(x)) {mdd_assert( assert_ifbp, __LINE__ + FILE_NAME_OFFSET, q );}} #define MMDASSERT(x,q) {if (!(x)) {mdd_assert( assert_ifbp, __LINE__ + FILE_NAME_OFFSET, q );}}
#define HCFLOGENTRY( where, what ) \ #define HCFLOGENTRY( where, what ) \
{if ( (ifbp->IFB_AssertWhere = where) <= 15 ) { \ {if ( (ifbp->IFB_AssertWhere = where) <= 15 ) { \
HCF_ENTRY( ifbp ); \ HCF_ENTRY( ifbp ); \
HCFASSERT( (ifbp->IFB_AssertTrace & 1<<((where)&0xF)) == 0, ifbp->IFB_AssertTrace ); \ HCFASSERT( (ifbp->IFB_AssertTrace & 1<<((where)&0xF)) == 0, ifbp->IFB_AssertTrace ); \
ifbp->IFB_AssertTrace |= 1<<((where)&0xF); \ ifbp->IFB_AssertTrace |= 1<<((where)&0xF); \
} \ } \
HCFTRACE(ifbp, where ) \ HCFTRACE(ifbp, where ) \
HCFTRACEVALUE(ifbp, what ) \ HCFTRACEVALUE(ifbp, what ) \
} }
#define HCFLOGEXIT( where ) \ #define HCFLOGEXIT( where ) \
{if ( (ifbp->IFB_AssertWhere = where) <= 15 ) { \ {if ( (ifbp->IFB_AssertWhere = where) <= 15 ) { \
HCF_EXIT( ifbp ); \ HCF_EXIT( ifbp ); \
ifbp->IFB_AssertTrace &= ~(1<<((where)&0xF)); \ ifbp->IFB_AssertTrace &= ~(1<<((where)&0xF)); \
} \ } \
HCFTRACE(ifbp, (where)|HCF_TRACE_EXIT ) \ HCFTRACE(ifbp, (where)|HCF_TRACE_EXIT ) \
} }
#else // HCF_ASSERT #else // HCF_ASSERT
#define HCFASSERT( x, q ) #define HCFASSERT( x, q )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment