2 * Misc system wide definitions
4 * Copyright 2006, Broadcom Corporation
7 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
11 * $Id: bcmdefs.h,v 1.1.1.3 2006/04/08 06:13:39 honor Exp $
18 * One doesn't need to include this file explicitly, gets included automatically if
19 * typedefs.h is included.
22 /* Reclaiming text and data :
23 * The following macros specify special linker sections that can be reclaimed
24 * after a system is considered 'up'.
26 #if defined(__GNUC__) && defined(BCMRECLAIM)
27 extern bool bcmreclaimed
;
28 #define BCMINITDATA(_data) __attribute__ ((__section__ (".dataini." #_data))) _data
29 #define BCMINITFN(_fn) __attribute__ ((__section__ (".textini." #_fn))) _fn
30 #else /* #if defined(__GNUC__) && defined(BCMRECLAIM) */
31 #define BCMINITDATA(_data) _data
32 #define BCMINITFN(_fn) _fn
33 #define bcmreclaimed 0
34 #endif /* #if defined(__GNUC__) && defined(BCMRECLAIM) */
36 /* Reclaim uninit functions if BCMNODOWN is defined */
37 /* and if they are not already removed by -gc-sections */
39 #define BCMUNINITFN(_fn) BCMINITFN(_fn)
41 #define BCMUNINITFN(_fn) _fn
48 #endif /* BCMRECLAIM */
50 /* Compatibility with old-style BCMRECLAIM */
51 #define BCMINIT(_id) _id
54 /* Put some library data/code into ROM to reduce RAM requirements */
55 #if defined(__GNUC__) && defined(BCMROMOFFLOAD)
56 #define BCMROMDATA(_data) __attribute__ ((__section__ (".datarom." #_data))) _data
57 #define BCMROMFN(_fn) __attribute__ ((__section__ (".textrom." #_fn))) _fn
59 #define BCMROMDATA(_data) _data
60 #define BCMROMFN(_fn) _fn
64 #define SB_BUS 0 /* Silicon Backplane */
65 #define PCI_BUS 1 /* PCI target */
66 #define PCMCIA_BUS 2 /* PCMCIA target */
67 #define SDIO_BUS 3 /* SDIO target */
68 #define JTAG_BUS 4 /* JTAG */
69 #define NO_BUS 0xFF /* Bus that does not support R/W REG */
71 /* Allows optimization for single-bus support */
73 #define BUSTYPE(bus) (BCMBUSTYPE)
75 #define BUSTYPE(bus) (bus)
78 /* Defines for DMA Address Width - Shared between OSL and HNDDMA */
79 #define DMADDR_MASK_32 0x0 /* Address mask for 32-bits */
80 #define DMADDR_MASK_30 0xc0000000 /* Address mask for 30-bits */
81 #define DMADDR_MASK_0 0xffffffff /* Address mask for 0-bits (hi-part) */
83 #define DMADDRWIDTH_30 30 /* 30-bit addressing capability */
84 #define DMADDRWIDTH_32 32 /* 32-bit addressing capability */
85 #define DMADDRWIDTH_63 63 /* 64-bit addressing capability */
86 #define DMADDRWIDTH_64 64 /* 64-bit addressing capability */
88 /* packet headroom necessary to accomodate the largest header in the system, (i.e TXOFF).
89 * By doing, we avoid the need to allocate an extra buffer for the header when bridging to WL.
90 * There is a compile time check in wlc.c which ensure that this value is at least as big
91 * as TXOFF. This value is used in dma_rxfill (hnddma.c).
93 #define BCMEXTRAHDROOM 160
95 /* Headroom required for dongle-to-host communication. Packets allocated
96 * locally in the dongle (e.g. for CDC ioctls or RNDIS messages) should
97 * leave this much room in front for low-level message headers which may
98 * be needed to get across the dongle bus to the host. (These messages
99 * don't go over the network, so room for the full WL header above would
102 #define BCMDONGLEHDRSZ 8
106 #endif /* _bcmdefs_h_ */
This page took 0.048672 seconds and 5 git commands to generate.