2
* Misc system wide definitions
4
* Copyright 2008, Broadcom Corporation
7
* Unless you and Broadcom execute a separate written software license
8
* agreement governing use of this software, this software is licensed to you
9
* under the terms of the GNU General Public License version 2, available at
10
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html (the "GPL"), with the
11
* following added to such license:
12
* As a special exception, the copyright holders of this software give you
13
* permission to link this software with independent modules, regardless of the
14
* license terms of these independent modules, and to copy and distribute the
15
* resulting executable under terms of your choice, provided that you also meet,
16
* for each linked independent module, the terms and conditions of the license
17
* of that module. An independent module is a module which is not derived from
20
* THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
21
* KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
22
* SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
23
* FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
25
* $Id: bcmdefs.h,v 13.43.2.11 2009/02/11 01:59:34 Exp $
31
#define bcmreclaimed 0
32
#define BCMATTACHDATA(_data) _data
33
#define BCMATTACHFN(_fn) _fn
34
#define BCMINITDATA(_data) _data
35
#define BCMINITFN(_fn) _fn
36
#define BCMUNINITFN(_fn) _fn
37
#define BCMNMIATTACHFN(_fn) _fn
38
#define BCMNMIATTACHDATA(_data) _data
42
#define BCMROMDATA(_data) _data
43
#define BCMROMFN(_fn) _fn
55
#define BUSTYPE(bus) (BCMBUSTYPE)
57
#define BUSTYPE(bus) (bus)
61
#define CHIPTYPE(bus) (BCMCHIPTYPE)
63
#define CHIPTYPE(bus) (bus)
66
#define SPROMBUS (PCI_BUS)
68
#define CHIPID(chip) (chip)
70
#define DMADDR_MASK_32 0x0
71
#define DMADDR_MASK_30 0xc0000000
72
#define DMADDR_MASK_0 0xffffffff
74
#define DMADDRWIDTH_30 30
75
#define DMADDRWIDTH_32 32
76
#define DMADDRWIDTH_63 63
77
#define DMADDRWIDTH_64 64
85
typedef dma64addr_t dmaaddr_t;
86
#define PHYSADDRHI(_pa) ((_pa).hiaddr)
87
#define PHYSADDRHISET(_pa, _val) \
89
(_pa).hiaddr = (_val); \
91
#define PHYSADDRLO(_pa) ((_pa).loaddr)
92
#define PHYSADDRLOSET(_pa, _val) \
94
(_pa).loaddr = (_val); \
98
typedef unsigned long dmaaddr_t;
99
#define PHYSADDRHI(_pa) (0)
100
#define PHYSADDRHISET(_pa, _val)
101
#define PHYSADDRLO(_pa) ((_pa))
102
#define PHYSADDRLOSET(_pa, _val) \
113
#define MAX_DMA_SEGS 4
119
hnddma_seg_t segs[MAX_DMA_SEGS];
122
#if defined(BCM_RPC_NOCOPY) || defined(BCM_RCP_TXNOCOPY)
123
#define BCMEXTRAHDROOM 220
125
#define BCMEXTRAHDROOM 172
128
#define BCMDONGLEHDRSZ 12
136
#ifndef BCMDBG_ASSERT
137
#define BCMDBG_ASSERT
142
#if defined(BCMDBG_ASSERT)
143
#define BCMASSERT_SUPPORT
146
#define BITFIELD_MASK(width) \
147
(((unsigned)1 << (width)) - 1)
148
#define GFIELD(val, field) \
149
(((val) >> field ## _S) & field ## _M)
150
#define SFIELD(val, field, bits) \
151
(((val) & (~(field ## _M << field ## _S))) | \
152
((unsigned)(bits) << field ## _S))
155
#define bcmspace FALSE
157
#define MAXSZ_NVRAM_VARS 4096
159
#define LOCATOR_EXTERN static