boot_loader.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* SPDX-License-Identifier: ISC */
  2. /* Copyright (c) 2015 Qualcomm Atheros, Inc.
  3. * Copyright (c) 2018, The Linux Foundation. All rights reserved.
  4. */
  5. /* This file contains the definitions for the boot loader
  6. * for the Qualcomm "Sparrow" 60 Gigabit wireless solution.
  7. */
  8. #ifndef BOOT_LOADER_EXPORT_H_
  9. #define BOOT_LOADER_EXPORT_H_
  10. struct bl_dedicated_registers_v1 {
  11. __le32 boot_loader_ready; /* 0x880A3C driver will poll
  12. * this Dword until BL will
  13. * set it to 1 (initial value
  14. * should be 0)
  15. */
  16. __le32 boot_loader_struct_version; /* 0x880A40 BL struct ver. */
  17. __le16 rf_type; /* 0x880A44 connected RF ID */
  18. __le16 rf_status; /* 0x880A46 RF status,
  19. * 0 is OK else error
  20. */
  21. __le32 baseband_type; /* 0x880A48 board type ID */
  22. u8 mac_address[6]; /* 0x880A4c BL mac address */
  23. u8 bl_version_major; /* 0x880A52 BL ver. major */
  24. u8 bl_version_minor; /* 0x880A53 BL ver. minor */
  25. __le16 bl_version_subminor; /* 0x880A54 BL ver. subminor */
  26. __le16 bl_version_build; /* 0x880A56 BL ver. build */
  27. /* valid only for version 2 and above */
  28. __le32 bl_assert_code; /* 0x880A58 BL Assert code */
  29. __le32 bl_assert_blink; /* 0x880A5C BL Assert Branch */
  30. __le32 bl_shutdown_handshake; /* 0x880A60 BL cleaner shutdown */
  31. __le32 bl_reserved[21]; /* 0x880A64 - 0x880AB4 */
  32. __le32 bl_magic_number; /* 0x880AB8 BL Magic number */
  33. } __packed;
  34. /* the following struct is the version 0 struct */
  35. struct bl_dedicated_registers_v0 {
  36. __le32 boot_loader_ready; /* 0x880A3C driver will poll
  37. * this Dword until BL will
  38. * set it to 1 (initial value
  39. * should be 0)
  40. */
  41. #define BL_READY (1) /* ready indication */
  42. __le32 boot_loader_struct_version; /* 0x880A40 BL struct ver. */
  43. __le32 rf_type; /* 0x880A44 connected RF ID */
  44. __le32 baseband_type; /* 0x880A48 board type ID */
  45. u8 mac_address[6]; /* 0x880A4c BL mac address */
  46. } __packed;
  47. /* bits for bl_shutdown_handshake */
  48. #define BL_SHUTDOWN_HS_GRTD BIT(0)
  49. #define BL_SHUTDOWN_HS_RTD BIT(1)
  50. #define BL_SHUTDOWN_HS_PROT_VER(x) WIL_GET_BITS(x, 28, 31)
  51. #endif /* BOOT_LOADER_EXPORT_H_ */