wmfw.h 952 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * wmfw.h - Wolfson firmware format information
  3. *
  4. * Copyright 2012 Wolfson Microelectronics plc
  5. *
  6. * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef __WMFW_H
  13. #define __WMFW_H
  14. #include <linux/types.h>
  15. struct wmfw_header {
  16. char magic[4];
  17. __le32 len;
  18. __le16 rev;
  19. u8 core;
  20. u8 ver;
  21. } __packed;
  22. struct wmfw_footer {
  23. __le64 timestamp;
  24. __le32 checksum;
  25. } __packed;
  26. struct wmfw_adsp1_sizes {
  27. __le32 dm;
  28. __le32 pm;
  29. __le32 zm;
  30. } __packed;
  31. struct wmfw_region {
  32. union {
  33. __be32 type;
  34. __le32 offset;
  35. };
  36. __le32 len;
  37. u8 data[];
  38. } __packed;
  39. #define WMFW_ADSP1 1
  40. #define WMFW_ABSOLUTE 0xf0
  41. #define WMFW_NAME_TEXT 0xfe
  42. #define WMFW_INFO_TEXT 0xff
  43. #define WMFW_ADSP1_PM 2
  44. #define WMFW_ADSP1_DM 3
  45. #define WMFW_ADSP1_ZM 4
  46. #endif