andes_plmt.h 635 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * SPDX-License-Identifier: BSD-2-Clause
  3. *
  4. * Copyright (c) 2022 Andes Technology Corporation
  5. *
  6. * Authors:
  7. * Zong Li <zong@andestech.com>
  8. * Nylon Chen <nylon7@andestech.com>
  9. * Yu Chien Peter Lin <peterlin@andestech.com>
  10. */
  11. #ifndef __TIMER_ANDES_PLMT_H__
  12. #define __TIMER_ANDES_PLMT_H__
  13. #define DEFAULT_AE350_PLMT_FREQ 60000000
  14. #define PLMT_REGION_ALIGN 0x1000
  15. struct plmt_data {
  16. u32 hart_count;
  17. unsigned long size;
  18. unsigned long timer_freq;
  19. volatile u64 *time_val;
  20. volatile u64 *time_cmp;
  21. };
  22. int plmt_cold_timer_init(struct plmt_data *plmt);
  23. int plmt_warm_timer_init(void);
  24. #endif /* __TIMER_ANDES_PLMT_H__ */