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.
17 * One doesn't need to include this file explicitly, gets included automatically if
18 * typedefs.h is included.
21 /* Reclaiming text and data :
22 * The following macros specify special linker sections that can be reclaimed
23 * after a system is considered 'up'.
25 #if defined(__GNUC__) && defined(BCMRECLAIM)
26 extern bool bcmreclaimed
;
27 #define BCMINITDATA(_data) __attribute__ ((__section__ (".dataini." #_data))) _data
28 #define BCMINITFN(_fn) __attribute__ ((__section__ (".textini." #_fn))) _fn
29 #else /* #if defined(__GNUC__) && defined(BCMRECLAIM) */
30 #define BCMINITDATA(_data) _data
31 #define BCMINITFN(_fn) _fn
32 #define bcmreclaimed 0
33 #endif /* #if defined(__GNUC__) && defined(BCMRECLAIM) */
35 /* Reclaim uninit functions if BCMNODOWN is defined */
36 /* and if they are not already removed by -gc-sections */
38 #define BCMUNINITFN(_fn) BCMINITFN(_fn)
40 #define BCMUNINITFN(_fn) _fn
47 #endif /* BCMRECLAIM */
49 /* Compatibility with old-style BCMRECLAIM */
50 #define BCMINIT(_id) _id
53 /* Put some library data/code into ROM to reduce RAM requirements */
54 #if defined(__GNUC__) && defined(BCMROMOFFLOAD)
55 #define BCMROMDATA(_data) __attribute__ ((__section__ (".datarom." #_data))) _data
56 #define BCMROMFN(_fn) __attribute__ ((__section__ (".textrom." #_fn))) _fn
58 #define BCMROMDATA(_data) _data
59 #define BCMROMFN(_fn) _fn
63 #define SB_BUS 0 /* Silicon Backplane */
64 #define PCI_BUS 1 /* PCI target */
65 #define PCMCIA_BUS 2 /* PCMCIA target */
66 #define SDIO_BUS 3 /* SDIO target */
67 #define JTAG_BUS 4 /* JTAG */
68 #define NO_BUS 0xFF /* Bus that does not support R/W REG */
70 /* Allows optimization for single-bus support */
72 #define BUSTYPE(bus) (BCMBUSTYPE)
74 #define BUSTYPE(bus) (bus)
77 /* Defines for DMA Address Width - Shared between OSL and HNDDMA */
78 #define DMADDR_MASK_32 0x0 /* Address mask for 32-bits */
79 #define DMADDR_MASK_30 0xc0000000 /* Address mask for 30-bits */
80 #define DMADDR_MASK_0 0xffffffff /* Address mask for 0-bits (hi-part) */
82 #define DMADDRWIDTH_30 30 /* 30-bit addressing capability */
83 #define DMADDRWIDTH_32 32 /* 32-bit addressing capability */
84 #define DMADDRWIDTH_63 63 /* 64-bit addressing capability */
85 #define DMADDRWIDTH_64 64 /* 64-bit addressing capability */
87 /* packet headroom necessary to accomodate the largest header in the system, (i.e TXOFF).
88 * By doing, we avoid the need to allocate an extra buffer for the header when bridging to WL.
89 * There is a compile time check in wlc.c which ensure that this value is at least as big
90 * as TXOFF. This value is used in dma_rxfill (hnddma.c).
92 #define BCMEXTRAHDROOM 160
94 /* Headroom required for dongle-to-host communication. Packets allocated
95 * locally in the dongle (e.g. for CDC ioctls or RNDIS messages) should
96 * leave this much room in front for low-level message headers which may
97 * be needed to get across the dongle bus to the host. (These messages
98 * don't go over the network, so room for the full WL header above would
101 #define BCMDONGLEHDRSZ 8
105 #endif /* _bcmdefs_h_ */
This page took 0.054672 seconds and 5 git commands to generate.