boot_loader.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* Copyright (c) 2015 Qualcomm Atheros, Inc.
  2. * Copyright (c) 2018, The Linux Foundation. All rights reserved.
  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
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. /* This file contains the definitions for the boot loader
  17. * for the Qualcomm "Sparrow" 60 Gigabit wireless solution.
  18. */
  19. #ifndef BOOT_LOADER_EXPORT_H_
  20. #define BOOT_LOADER_EXPORT_H_
  21. struct bl_dedicated_registers_v1 {
  22. __le32 boot_loader_ready; /* 0x880A3C driver will poll
  23. * this Dword until BL will
  24. * set it to 1 (initial value
  25. * should be 0)
  26. */
  27. __le32 boot_loader_struct_version; /* 0x880A40 BL struct ver. */
  28. __le16 rf_type; /* 0x880A44 connected RF ID */
  29. __le16 rf_status; /* 0x880A46 RF status,
  30. * 0 is OK else error
  31. */
  32. __le32 baseband_type; /* 0x880A48 board type ID */
  33. u8 mac_address[6]; /* 0x880A4c BL mac address */
  34. u8 bl_version_major; /* 0x880A52 BL ver. major */
  35. u8 bl_version_minor; /* 0x880A53 BL ver. minor */
  36. __le16 bl_version_subminor; /* 0x880A54 BL ver. subminor */
  37. __le16 bl_version_build; /* 0x880A56 BL ver. build */
  38. /* valid only for version 2 and above */
  39. __le32 bl_assert_code; /* 0x880A58 BL Assert code */
  40. __le32 bl_assert_blink; /* 0x880A5C BL Assert Branch */
  41. __le32 bl_shutdown_handshake; /* 0x880A60 BL cleaner shutdown */
  42. __le32 bl_reserved[21]; /* 0x880A64 - 0x880AB4 */
  43. __le32 bl_magic_number; /* 0x880AB8 BL Magic number */
  44. } __packed;
  45. /* the following struct is the version 0 struct */
  46. struct bl_dedicated_registers_v0 {
  47. __le32 boot_loader_ready; /* 0x880A3C driver will poll
  48. * this Dword until BL will
  49. * set it to 1 (initial value
  50. * should be 0)
  51. */
  52. #define BL_READY (1) /* ready indication */
  53. __le32 boot_loader_struct_version; /* 0x880A40 BL struct ver. */
  54. __le32 rf_type; /* 0x880A44 connected RF ID */
  55. __le32 baseband_type; /* 0x880A48 board type ID */
  56. u8 mac_address[6]; /* 0x880A4c BL mac address */
  57. } __packed;
  58. /* bits for bl_shutdown_handshake */
  59. #define BL_SHUTDOWN_HS_GRTD BIT(0)
  60. #define BL_SHUTDOWN_HS_RTD BIT(1)
  61. #define BL_SHUTDOWN_HS_PROT_VER(x) WIL_GET_BITS(x, 28, 31)
  62. #endif /* BOOT_LOADER_EXPORT_H_ */