-#define IRQ_MASK 0xffff
-
-#define IRQ_SWI (0x1<<INT_LVL_SWI)
-#define IRQ_TIMERINT0 (0x1<<INT_LVL_TIMERINT0)
-#define IRQ_TIMERINT1 (0x1<<INT_LVL_TIMERINT1)
-#define IRQ_UART0 (0x1<<INT_LVL_UART0)
-#define IRQ_LAN (0x1<<INT_LVL_LAN)
-#define IRQ_WAN (0x1<<INT_LVL_WAN)
-#define IRQ_WLAN (0x1<<INT_LVL_WLAN)
-#define IRQ_GPIO (0x1<<INT_LVL_GPIO)
-#define IRQ_IDEINT (0x1<<INT_LVL_IDE)
-#define IRQ_PCI2 (0x1<<INT_LVL_PCI2)
-#define IRQ_PCI1 (0x1<<INT_LVL_PCI1)
-#define IRQ_PCI0 (0x1<<INT_LVL_PCI0)
-#define IRQ_USB (0x1<<INT_LVL_USB)
-
-
-/*=========================== UART Control Register ========================*/
-#define UART_DR_REG 0x00
-#define UART_RSR_REG 0x04
-#define UART_ECR_REG 0x04
-#define UART_LCR_H_REG 0x08
-#define UART_LCR_M_REG 0x0c
-#define UART_LCR_L_REG 0x10
-#define UART_CR_REG 0x14
-#define UART_FR_REG 0x18
-#define UART_IIR_REG 0x1c
-#define UART_ICR_REG 0x1C
-#define UART_ILPR_REG 0x20
-
-/* rsr/ecr reg */
-#define UART_OVERRUN_ERR 0x08
-#define UART_BREAK_ERR 0x04
-#define UART_PARITY_ERR 0x02
-#define UART_FRAMING_ERR 0x01
-#define UART_RX_STATUS_MASK 0x0f
-#define UART_RX_ERROR ( UART_BREAK_ERR \
- | UART_PARITY_ERR \
- | UART_FRAMING_ERR)
-
-/* lcr_h reg */
-#define UART_SEND_BREAK 0x01
-#define UART_PARITY_EN 0x02
-#define UART_EVEN_PARITY 0x04
-#define UART_TWO_STOP_BITS 0x08
-#define UART_ENABLE_FIFO 0x10
-
-#define UART_WLEN_5BITS 0x00
-#define UART_WLEN_6BITS 0x20
-#define UART_WLEN_7BITS 0x40
-#define UART_WLEN_8BITS 0x60
-#define UART_WLEN_MASK 0x60
-
-/* cr reg */
-#define UART_PORT_EN 0x01
-#define UART_SIREN 0x02
-#define UART_SIRLP 0x04
-#define UART_MODEM_STATUS_INT_EN 0x08
-#define UART_RX_INT_EN 0x10
-#define UART_TX_INT_EN 0x20
-#define UART_RX_TIMEOUT_INT_EN 0x40
-#define UART_LOOPBACK_EN 0x80
-
-/* fr reg */
-#define UART_CTS 0x01
-#define UART_DSR 0x02
-#define UART_DCD 0x04
-#define UART_BUSY 0x08
-#define UART_RX_FIFO_EMPTY 0x10
-#define UART_TX_FIFO_FULL 0x20
-#define UART_RX_FIFO_FULL 0x40
-#define UART_TX_FIFO_EMPTY 0x80
-
-/* iir/icr reg */
-#define UART_MODEM_STATUS_INT 0x01
-#define UART_RX_INT 0x02
-#define UART_TX_INT 0x04
-#define UART_RX_TIMEOUT_INT 0x08
-
-#define UART_INT_MASK 0x0f
-
-#ifdef _FPGA_
-#define ADM8668_UARTCLK_FREQ 3686400
-#else
-#define ADM8668_UARTCLK_FREQ 62500000
-#endif
-
-#define UART_BAUDDIV(_rate) \
- ((unsigned long)(ADM8668_UARTCLK_FREQ/(16*(_rate)) - 1))
-
-/* uart_baudrate */
-#define UART_230400bps_DIVISOR UART_BAUDDIV(230400)
-#define UART_115200bps_DIVISOR UART_BAUDDIV(115200)
-#define UART_76800bps_DIVISOR UART_BAUDDIV(76800)
-#define UART_57600bps_DIVISOR UART_BAUDDIV(57600)
-#define UART_38400bps_DIVISOR UART_BAUDDIV(38400)
-#define UART_19200bps_DIVISOR UART_BAUDDIV(19200)
-#define UART_14400bps_DIVISOR UART_BAUDDIV(14400)
-#define UART_9600bps_DIVISOR UART_BAUDDIV(9600)
-#define UART_2400bps_DIVISOR UART_BAUDDIV(2400)
-#define UART_1200bps_DIVISOR UART_BAUDDIV(1200)
-
-
-/*=========================== Counter Timer ==============================*/
-#define TIMER0_REG_BASE ADM8668_TMR_BASE
-#define TIMER1_REG_BASE ADM8668_TMR_BASE+0x20
-
-#define TIMER_LOAD_REG 0x00
-#define TIMER_VALUE_REG 0x04
-#define TIMER_CTRL_REG 0x08
-#define TIMER_CLR_REG 0x0c
-
-/* TIMER_LOAD_REG */
-#ifdef _FPGA_
-#define SYS_CLOCK 56000000
-#else
-#define SYS_CLOCK 175000000
-#endif
-
-#define SYS_PRESCALE 256
-
-#define TMR_10MS_TICKS (SYS_CLOCK/SYS_PRESCALE/100)
-
-/* TIMER_CTRL_REG */
-#define TMR_PRESCALE_1 0x00
-#define TMR_PRESCALE_16 0x04
-#define TMR_PRESCALE_256 0x08
-#define TMR_MODE_PERIODIC 0x40
-#define TMR_ENABLE 0x80
-
-/* TIMER_CLR_REG */
-#define TMR_CLEAR_BIT 1
-