board.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (c) 2006-2020, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2020-04-05 bigmagic the first version
  9. */
  10. #ifndef BOARD_H__
  11. #define BOARD_H__
  12. #include <stdint.h>
  13. #include <rthw.h>
  14. #include "ls2k1000.h"
  15. extern unsigned char __bss_end;
  16. #define CPU_HZ (1000 * 1000 * 1000) //QEMU 200*1000*1000
  17. #define RT_HW_HEAP_BEGIN (void*)&__bss_end
  18. #define RT_HW_HEAP_END (void*)(RT_HW_HEAP_BEGIN + 64 * 1024 * 1024)
  19. /*
  20. * General PM Configuration Register
  21. */
  22. #define PMCON_BASE (APB_BASE | (0x7 << 12))
  23. /*
  24. * Power Management1 Configuration Registers
  25. */
  26. #define PM1_BASE (PMCON_BASE + 0x0C)
  27. #define PM1_STS HWREG32(PM1_BASE)
  28. #define PM1_EN HWREG32(PM1_BASE + 0x04)
  29. #define PM1_CNT HWREG32(PM1_BASE + 0x08)
  30. /*
  31. * Watch Dog Configuration Registers
  32. */
  33. #define WDT_BASE (PMCON_BASE + 0x30)
  34. #define WDT_EN HWREG32(WDT_BASE)
  35. #define WDT_SET HWREG32(WDT_BASE + 0x04)
  36. #define WDT_TIMER HWREG32(WDT_BASE + 0x08)
  37. void rt_hw_board_init(void);
  38. #endif