|
@@ -3,6 +3,7 @@
|
|
|
|
|
|
#include <mips.h>
|
|
|
#include "interrupt.h"
|
|
|
+#include <rthw.h>
|
|
|
|
|
|
#define APB_BASE CKSEG1ADDR(0xbfe00000)
|
|
|
|
|
@@ -24,6 +25,28 @@
|
|
|
|
|
|
#define GEN_CONFIG0_REG (0xFFFFFFFFBfe10420)
|
|
|
|
|
|
+
|
|
|
+/*
|
|
|
+ * General PM Configuration Register
|
|
|
+ */
|
|
|
+#define PMCON_BASE (APB_BASE | (0x7 << 12))
|
|
|
+
|
|
|
+/*
|
|
|
+ * Power Management1 Configuration Registers
|
|
|
+ */
|
|
|
+#define PM1_BASE (PMCON_BASE + 0x0C)
|
|
|
+#define PM1_STS HWREG32(PM1_BASE)
|
|
|
+#define PM1_EN HWREG32(PM1_BASE + 0x04)
|
|
|
+#define PM1_CNT HWREG32(PM1_BASE + 0x08)
|
|
|
+
|
|
|
+/*
|
|
|
+ * Watch Dog Configuration Registers
|
|
|
+ */
|
|
|
+#define WDT_BASE (PMCON_BASE + 0x30)
|
|
|
+#define WDT_EN HWREG32(WDT_BASE)
|
|
|
+#define WDT_SET HWREG32(WDT_BASE + 0x04)
|
|
|
+#define WDT_TIMER HWREG32(WDT_BASE + 0x08)
|
|
|
+
|
|
|
void rt_hw_timer_handler(void);
|
|
|
void rt_hw_uart_init(void);
|
|
|
|