ls2k1000.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef _LS2K1000_H__
  2. #define _LS2K1000_H__
  3. #include <mips.h>
  4. #include "interrupt.h"
  5. #include <rthw.h>
  6. #define APB_BASE CKSEG1ADDR(0xbfe00000)
  7. #define UART0_BASE_ADDR (0xbfe00000)
  8. #define UART0_OFF (0x0)
  9. #define UART0_BASE CKSEG1ADDR(UART0_BASE_ADDR + UART0_OFF)
  10. #define UARTx_BASE(x) ((APB_BASE | (0x0 << 12) | (x << 8)))
  11. #define LIOINTC0_BASE CKSEG1ADDR(0x1fe11400)
  12. #define CORE0_INTISR0 CKSEG1ADDR(0x1fe11040)
  13. #define LIOINTC1_BASE CKSEG1ADDR(0x1fe11440)
  14. #define CORE0_INTISR1 CKSEG1ADDR(0x1fe11048)
  15. #define GPIO_BASE (0xFFFFFFFFBFE10500)
  16. #define PLL_SYS_BASE (0xFFFFFFFFBFE10480)
  17. #define RTC_BASE (0xFFFFFFFFBFE07820)
  18. #define GEN_CONFIG0_REG (0xFFFFFFFFBfe10420)
  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_timer_handler(void);
  38. void rt_hw_uart_init(void);
  39. #endif