smi_priv.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef __SMI_PRIV_H__
  2. #define __SMI_PRIV_H__
  3. #include "smi_reg.h"
  4. #define SMI_LARB_PORT_NR_MAX 21/* Max port num in current platform.*/
  5. struct mtk_smi_priv;
  6. struct mtk_smi_data {
  7. unsigned int larb_nr;
  8. struct device *larb[SMI_LARB_NR];
  9. struct device *smicommon;
  10. const struct mtk_smi_priv *smi_priv;
  11. unsigned long smi_common_base;
  12. unsigned long larb_base[SMI_LARB_NR];
  13. /*record the larb port register, please use the max value*/
  14. unsigned short int larb_port_backup[SMI_LARB_PORT_NR_MAX*SMI_LARB_NR];
  15. };
  16. struct mtk_smi_priv {
  17. unsigned int larb_port_num[SMI_LARB_NR];/* the port number in each larb */
  18. unsigned char larb_vc_setting[SMI_LARB_NR];
  19. void (*init_setting)(struct mtk_smi_data *, bool *,
  20. u32 *, unsigned int);
  21. void (*vp_setting)(struct mtk_smi_data *);
  22. void (*vr_setting)(struct mtk_smi_data *);
  23. void (*hdmi_setting)(struct mtk_smi_data *);
  24. void (*hdmi_4k_setting)(struct mtk_smi_data *);
  25. };
  26. extern const struct mtk_smi_priv smi_mt8173_priv;
  27. extern const struct mtk_smi_priv smi_mt8127_priv;
  28. #endif