PageRenderTime 33ms CodeModel.GetById 26ms app.highlight 5ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/bcm4329/include/bcmdefs.h

https://bitbucket.org/wisechild/galaxy-nexus
C++ Header | 114 lines | 60 code | 30 blank | 24 comment | 0 complexity | 12b6a4bf519be95e35107ae6647ca11f MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
  1/*
  2 * Misc system wide definitions
  3 *
  4 * Copyright (C) 1999-2010, Broadcom Corporation
  5 * 
  6 *      Unless you and Broadcom execute a separate written software license
  7 * agreement governing use of this software, this software is licensed to you
  8 * under the terms of the GNU General Public License version 2 (the "GPL"),
  9 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
 10 * following added to such license:
 11 * 
 12 *      As a special exception, the copyright holders of this software give you
 13 * permission to link this software with independent modules, and to copy and
 14 * distribute the resulting executable under terms of your choice, provided that
 15 * you also meet, for each linked independent module, the terms and conditions of
 16 * the license of that module.  An independent module is a module which is not
 17 * derived from this software.  The special exception does not apply to any
 18 * modifications of the software.
 19 * 
 20 *      Notwithstanding the above, under no circumstances may you combine this
 21 * software in any way with any other Broadcom software provided under a license
 22 * other than the GPL, without Broadcom's express prior written consent.
 23 * $Id: bcmdefs.h,v 13.38.4.10.2.7.6.11 2010/02/01 05:51:55 Exp $
 24 */
 25
 26
 27#ifndef	_bcmdefs_h_
 28#define	_bcmdefs_h_
 29
 30#define STATIC	static
 31
 32#define	SI_BUS			0	
 33#define	PCI_BUS			1	
 34#define	PCMCIA_BUS		2	
 35#define SDIO_BUS		3	
 36#define JTAG_BUS		4	
 37#define USB_BUS			5	
 38#define SPI_BUS			6	
 39
 40
 41#ifdef BCMBUSTYPE
 42#define BUSTYPE(bus) 	(BCMBUSTYPE)
 43#else
 44#define BUSTYPE(bus) 	(bus)
 45#endif
 46
 47
 48#ifdef BCMCHIPTYPE
 49#define CHIPTYPE(bus) 	(BCMCHIPTYPE)
 50#else
 51#define CHIPTYPE(bus) 	(bus)
 52#endif
 53
 54
 55
 56#if defined(BCMSPROMBUS)
 57#define SPROMBUS	(BCMSPROMBUS)
 58#elif defined(SI_PCMCIA_SROM)
 59#define SPROMBUS	(PCMCIA_BUS)
 60#else
 61#define SPROMBUS	(PCI_BUS)
 62#endif
 63
 64
 65#ifdef BCMCHIPID
 66#define CHIPID(chip)	(BCMCHIPID)
 67#else
 68#define CHIPID(chip)	(chip)
 69#endif
 70
 71
 72#define DMADDR_MASK_32 0x0		
 73#define DMADDR_MASK_30 0xc0000000	
 74#define DMADDR_MASK_0  0xffffffff	
 75
 76#define	DMADDRWIDTH_30  30 
 77#define	DMADDRWIDTH_32  32 
 78#define	DMADDRWIDTH_63  63 
 79#define	DMADDRWIDTH_64  64 
 80
 81
 82#define BCMEXTRAHDROOM 164
 83
 84
 85#define BCMDONGLEHDRSZ 12
 86#define BCMDONGLEPADSZ 16
 87
 88#define BCMDONGLEOVERHEAD	(BCMDONGLEHDRSZ + BCMDONGLEPADSZ)
 89
 90
 91
 92#define BITFIELD_MASK(width) \
 93		(((unsigned)1 << (width)) - 1)
 94#define GFIELD(val, field) \
 95		(((val) >> field ## _S) & field ## _M)
 96#define SFIELD(val, field, bits) \
 97		(((val) & (~(field ## _M << field ## _S))) | \
 98		 ((unsigned)(bits) << field ## _S))
 99
100
101#ifdef BCMSMALL
102#undef	BCMSPACE
103#define bcmspace	FALSE	
104#else
105#define	BCMSPACE
106#define bcmspace	TRUE	
107#endif
108
109
110#define	MAXSZ_NVRAM_VARS	4096
111
112#define LOCATOR_EXTERN static
113
114#endif