tdx-cfg-block.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Copyright (c) 2016 Toradex, Inc.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef _TDX_CFG_BLOCK_H
  7. #define _TDX_CFG_BLOCK_H
  8. #include "tdx-common.h"
  9. struct toradex_hw {
  10. u16 ver_major;
  11. u16 ver_minor;
  12. u16 ver_assembly;
  13. u16 prodid;
  14. };
  15. struct toradex_eth_addr {
  16. u32 oui:24;
  17. u32 nic:24;
  18. } __attribute__((__packed__));
  19. enum {
  20. COLIBRI_PXA270_V1_312MHZ = 1,
  21. COLIBRI_PXA270_V1_520MHZ,
  22. COLIBRI_PXA320,
  23. COLIBRI_PXA300,
  24. COLIBRI_PXA310,
  25. COLIBRI_PXA320_IT,
  26. COLIBRI_PXA300_XT,
  27. COLIBRI_PXA270_312MHZ,
  28. COLIBRI_PXA270_520MHZ,
  29. COLIBRI_VF50, /* not currently on sale */
  30. COLIBRI_VF61,
  31. COLIBRI_VF61_IT,
  32. COLIBRI_VF50_IT,
  33. COLIBRI_IMX6S,
  34. COLIBRI_IMX6DL,
  35. COLIBRI_IMX6S_IT,
  36. COLIBRI_IMX6DL_IT,
  37. COLIBRI_T20_256MB = 20,
  38. COLIBRI_T20_512MB,
  39. COLIBRI_T20_512MB_IT,
  40. COLIBRI_T30,
  41. COLIBRI_T20_256MB_IT,
  42. APALIS_T30_2GB,
  43. APALIS_T30_1GB,
  44. APALIS_IMX6Q,
  45. APALIS_IMX6Q_IT,
  46. APALIS_IMX6D,
  47. COLIBRI_T30_IT,
  48. APALIS_T30_IT,
  49. COLIBRI_IMX7S,
  50. COLIBRI_IMX7D,
  51. APALIS_TK1_2GB,
  52. APALIS_IMX6D_IT,
  53. };
  54. extern const char * const toradex_modules[];
  55. extern bool valid_cfgblock;
  56. extern struct toradex_hw tdx_hw_tag;
  57. extern struct toradex_eth_addr tdx_eth_addr;
  58. extern u32 tdx_serial;
  59. int read_tdx_cfg_block(void);
  60. #endif /* _TDX_CFG_BLOCK_H */