ls2k1000.h 1.4 KB
Newer Older
B
bigmagic 已提交
1 2 3 4
#ifndef _LS2K1000_H__
#define _LS2K1000_H__

#include <mips.h>
B
bigamgic 已提交
5
#include "interrupt.h"
6
#include <rthw.h>
B
bigamgic 已提交
7 8

#define APB_BASE         CKSEG1ADDR(0xbfe00000)
B
bigmagic 已提交
9

B
bigmagic 已提交
10 11 12
#define UART0_BASE_ADDR  (0xbfe00000)
#define UART0_OFF        (0x0)
#define UART0_BASE       CKSEG1ADDR(UART0_BASE_ADDR + UART0_OFF)
B
bigmagic 已提交
13

B
bigmagic 已提交
14
#define UARTx_BASE(x)    ((APB_BASE | (0x0 << 12) | (x << 8)))
B
bigamgic 已提交
15 16 17 18 19 20 21

#define LIOINTC0_BASE    CKSEG1ADDR(0x1fe11400)
#define CORE0_INTISR0    CKSEG1ADDR(0x1fe11040)

#define LIOINTC1_BASE    CKSEG1ADDR(0x1fe11440)
#define CORE0_INTISR1    CKSEG1ADDR(0x1fe11048)

B
bigmagic 已提交
22 23 24
#define GPIO_BASE        (0xFFFFFFFFBFE10500)
#define PLL_SYS_BASE     (0xFFFFFFFFBFE10480)
#define RTC_BASE         (0xFFFFFFFFBFE07820)
25

B
bigmagic 已提交
26
#define GEN_CONFIG0_REG  (0xFFFFFFFFBfe10420)
D
Du Huanpeng 已提交
27

28 29 30 31 32 33 34 35 36 37 38 39 40

/*
 * 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)
41

42 43 44 45 46 47 48 49
/*
 * 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)

B
bigmagic 已提交
50 51 52
void rt_hw_timer_handler(void);
void rt_hw_uart_init(void);

53 54
#endif