mt_chip_common.h 463 B

1234567891011121314151617181920
  1. #ifndef __MT_CHIP_COMMON_H__
  2. #define __MT_CHIP_COMMON_H__
  3. #include <mt-plat/mt_chip.h>
  4. #define CHIP_INFO_BIT(ID) (2 << ID)
  5. #define CHIP_INFO_SUP(MASK, ID) ((MASK & CHIP_INFO_BIT(ID)) ? (1) : (0))
  6. #define C_UNKNOWN_CHIP_ID (0x0000FFFF)
  7. struct mt_chip_drv {
  8. /* raw information */
  9. unsigned int info_bit_mask;
  10. unsigned int (*get_chip_info)(unsigned int id);
  11. };
  12. typedef unsigned int (*chip_info_cb)(void);
  13. struct mt_chip_drv *get_mt_chip_drv(void);
  14. #endif