mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
Merge branch 'develop' of 10.10.10.29:/home/rockchip/kernel into develop
This commit is contained in:
@@ -35,13 +35,15 @@
|
||||
#define TIMER_ENABLE 3
|
||||
#define TIMER_ENABLE_FREE_RUNNING 5
|
||||
|
||||
#define timer_writel(v, addr) do { writel(v, addr); readl(addr); } while (0)
|
||||
|
||||
#if 1 /* by default, use periph sync timer */
|
||||
|
||||
#define RK_TIMER_ENABLE(n) writel(TIMER_ENABLE, RK29_TIMER2_BASE + 0x4000 * (n - 2) + TIMER_CONTROL_REG)
|
||||
#define RK_TIMER_ENABLE_FREE_RUNNING(n) writel(TIMER_ENABLE_FREE_RUNNING, RK29_TIMER2_BASE + 0x4000 * (n - 2) + TIMER_CONTROL_REG)
|
||||
#define RK_TIMER_DISABLE(n) writel(TIMER_DISABLE, RK29_TIMER2_BASE + 0x4000 * (n - 2) + TIMER_CONTROL_REG)
|
||||
#define RK_TIMER_ENABLE(n) timer_writel(TIMER_ENABLE, RK29_TIMER2_BASE + 0x4000 * (n - 2) + TIMER_CONTROL_REG)
|
||||
#define RK_TIMER_ENABLE_FREE_RUNNING(n) timer_writel(TIMER_ENABLE_FREE_RUNNING, RK29_TIMER2_BASE + 0x4000 * (n - 2) + TIMER_CONTROL_REG)
|
||||
#define RK_TIMER_DISABLE(n) timer_writel(TIMER_DISABLE, RK29_TIMER2_BASE + 0x4000 * (n - 2) + TIMER_CONTROL_REG)
|
||||
|
||||
#define RK_TIMER_SETCOUNT(n, count) writel(count, RK29_TIMER2_BASE + 0x4000 * (n - 2) + TIMER_LOAD_COUNT)
|
||||
#define RK_TIMER_SETCOUNT(n, count) timer_writel(count, RK29_TIMER2_BASE + 0x4000 * (n - 2) + TIMER_LOAD_COUNT)
|
||||
#define RK_TIMER_GETCOUNT(n) readl(RK29_TIMER2_BASE + 0x4000 * (n - 2) + TIMER_LOAD_COUNT)
|
||||
|
||||
#define RK_TIMER_READVALUE(n) readl(RK29_TIMER2_BASE + 0x4000 * (n - 2) + TIMER_CUR_VALUE)
|
||||
@@ -59,11 +61,11 @@
|
||||
|
||||
#else
|
||||
|
||||
#define RK_TIMER_ENABLE(n) writel(TIMER_ENABLE, RK29_TIMER0_BASE + 0x2000 * n + TIMER_CONTROL_REG)
|
||||
#define RK_TIMER_ENABLE_FREE_RUNNING(n) writel(TIMER_ENABLE_FREE_RUNNING, RK29_TIMER0_BASE + 0x2000 * n + TIMER_CONTROL_REG)
|
||||
#define RK_TIMER_DISABLE(n) writel(TIMER_DISABLE, RK29_TIMER0_BASE + 0x2000 * n + TIMER_CONTROL_REG)
|
||||
#define RK_TIMER_ENABLE(n) timer_writel(TIMER_ENABLE, RK29_TIMER0_BASE + 0x2000 * n + TIMER_CONTROL_REG)
|
||||
#define RK_TIMER_ENABLE_FREE_RUNNING(n) timer_writel(TIMER_ENABLE_FREE_RUNNING, RK29_TIMER0_BASE + 0x2000 * n + TIMER_CONTROL_REG)
|
||||
#define RK_TIMER_DISABLE(n) timer_writel(TIMER_DISABLE, RK29_TIMER0_BASE + 0x2000 * n + TIMER_CONTROL_REG)
|
||||
|
||||
#define RK_TIMER_SETCOUNT(n, count) writel(count, RK29_TIMER0_BASE + 0x2000 * n + TIMER_LOAD_COUNT)
|
||||
#define RK_TIMER_SETCOUNT(n, count) timer_writel(count, RK29_TIMER0_BASE + 0x2000 * n + TIMER_LOAD_COUNT)
|
||||
#define RK_TIMER_GETCOUNT(n) readl(RK29_TIMER0_BASE + 0x2000 * n + TIMER_LOAD_COUNT)
|
||||
|
||||
#define RK_TIMER_READVALUE(n) readl(RK29_TIMER0_BASE + 0x2000 * n + TIMER_CUR_VALUE)
|
||||
|
||||
Reference in New Issue
Block a user