ucode_loader.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright (c) 2010 Broadcom Corporation
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  11. * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  13. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  14. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifndef _BRCM_UCODE_H_
  17. #define _BRCM_UCODE_H_
  18. #include "types.h" /* forward structure declarations */
  19. #define MIN_FW_SIZE 40000 /* minimum firmware file size in bytes */
  20. #define MAX_FW_SIZE 150000
  21. #define UCODE_LOADER_API_VER 0
  22. struct d11init;
  23. struct brcms_ucode {
  24. struct d11init *d11lcn0bsinitvals24;
  25. struct d11init *d11lcn0initvals24;
  26. struct d11init *d11lcn1bsinitvals24;
  27. struct d11init *d11lcn1initvals24;
  28. struct d11init *d11lcn2bsinitvals24;
  29. struct d11init *d11lcn2initvals24;
  30. struct d11init *d11n0absinitvals16;
  31. struct d11init *d11n0bsinitvals16;
  32. struct d11init *d11n0initvals16;
  33. __le32 *bcm43xx_16_mimo;
  34. size_t bcm43xx_16_mimosz;
  35. __le32 *bcm43xx_24_lcn;
  36. size_t bcm43xx_24_lcnsz;
  37. u32 *bcm43xx_bommajor;
  38. u32 *bcm43xx_bomminor;
  39. };
  40. int brcms_ucode_data_init(struct brcms_info *wl, struct brcms_ucode *ucode);
  41. void brcms_ucode_data_free(struct brcms_ucode *ucode);
  42. int brcms_ucode_init_buf(struct brcms_info *wl, void **pbuf, unsigned int idx);
  43. int brcms_ucode_init_uint(struct brcms_info *wl, size_t *n_bytes,
  44. unsigned int idx);
  45. void brcms_ucode_free_buf(void *);
  46. int brcms_check_firmwares(struct brcms_info *wl);
  47. #endif /* _BRCM_UCODE_H_ */