/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

  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. #ifndef _bcmdefs_h_
  26. #define _bcmdefs_h_
  27. #define STATIC static
  28. #define SI_BUS 0
  29. #define PCI_BUS 1
  30. #define PCMCIA_BUS 2
  31. #define SDIO_BUS 3
  32. #define JTAG_BUS 4
  33. #define USB_BUS 5
  34. #define SPI_BUS 6
  35. #ifdef BCMBUSTYPE
  36. #define BUSTYPE(bus) (BCMBUSTYPE)
  37. #else
  38. #define BUSTYPE(bus) (bus)
  39. #endif
  40. #ifdef BCMCHIPTYPE
  41. #define CHIPTYPE(bus) (BCMCHIPTYPE)
  42. #else
  43. #define CHIPTYPE(bus) (bus)
  44. #endif
  45. #if defined(BCMSPROMBUS)
  46. #define SPROMBUS (BCMSPROMBUS)
  47. #elif defined(SI_PCMCIA_SROM)
  48. #define SPROMBUS (PCMCIA_BUS)
  49. #else
  50. #define SPROMBUS (PCI_BUS)
  51. #endif
  52. #ifdef BCMCHIPID
  53. #define CHIPID(chip) (BCMCHIPID)
  54. #else
  55. #define CHIPID(chip) (chip)
  56. #endif
  57. #define DMADDR_MASK_32 0x0
  58. #define DMADDR_MASK_30 0xc0000000
  59. #define DMADDR_MASK_0 0xffffffff
  60. #define DMADDRWIDTH_30 30
  61. #define DMADDRWIDTH_32 32
  62. #define DMADDRWIDTH_63 63
  63. #define DMADDRWIDTH_64 64
  64. #define BCMEXTRAHDROOM 164
  65. #define BCMDONGLEHDRSZ 12
  66. #define BCMDONGLEPADSZ 16
  67. #define BCMDONGLEOVERHEAD (BCMDONGLEHDRSZ + BCMDONGLEPADSZ)
  68. #define BITFIELD_MASK(width) \
  69. (((unsigned)1 << (width)) - 1)
  70. #define GFIELD(val, field) \
  71. (((val) >> field ## _S) & field ## _M)
  72. #define SFIELD(val, field, bits) \
  73. (((val) & (~(field ## _M << field ## _S))) | \
  74. ((unsigned)(bits) << field ## _S))
  75. #ifdef BCMSMALL
  76. #undef BCMSPACE
  77. #define bcmspace FALSE
  78. #else
  79. #define BCMSPACE
  80. #define bcmspace TRUE
  81. #endif
  82. #define MAXSZ_NVRAM_VARS 4096
  83. #define LOCATOR_EXTERN static
  84. #endif