si_fw_macros.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. SiI8348 Linux Driver
  3. Copyright (C) 2013 Silicon Image, Inc.
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License as
  6. published by the Free Software Foundation version 2.
  7. This program is distributed AS-IS WITHOUT ANY WARRANTY of any
  8. kind, whether express or implied; INCLUDING without the implied warranty
  9. of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE or NON-INFRINGEMENT. See
  10. the GNU General Public License for more details at http://www.gnu.org/licenses/gpl-2.0.html.
  11. */
  12. /*
  13. * Define Linux versions of macros used to cross compile some of
  14. * code of this driver as 8051 based starter kit firmware.
  15. * todo need to see if this can be cleaned up
  16. */
  17. #define PLACE_IN_CODE_SEG
  18. #define SI_PUSH_STRUCT_PACKING
  19. #define SI_POP_STRUCT_PACKING
  20. #define SI_PACK_THIS_STRUCT __attribute__((__packed__))
  21. #define SII_OFFSETOF offsetof
  22. #define SII_ASSERT(cond, ...) \
  23. do { \
  24. if (!(cond)) { \
  25. printk(__VA_ARGS__); \
  26. BUG(); \
  27. } \
  28. } while(0)