111 lines
3.7 KiB
Plaintext
111 lines
3.7 KiB
Plaintext
Add extra debug for the q_d_w_o() when work fn is already active.
|
|
|
|
From: Paul Walmsley <paul@pwsan.com>
|
|
|
|
|
|
---
|
|
|
|
arch/arm/mach-omap2/timer-gp.c | 3 ++-
|
|
arch/arm/plat-omap/dmtimer.c | 20 ++++++++++++++++++++
|
|
include/asm-arm/arch-omap/dmtimer.h | 1 +
|
|
kernel/time/timer_list.c | 8 ++++++++
|
|
4 files changed, 31 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
|
|
index ce5c2b4..e3ed368 100644
|
|
--- a/arch/arm/mach-omap2/timer-gp.c
|
|
+++ b/arch/arm/mach-omap2/timer-gp.c
|
|
@@ -50,6 +50,7 @@
|
|
#define GPTIMER_MATCH_VAL (0xffffffff - (32768/2))
|
|
|
|
static struct omap_dm_timer *gptimer;
|
|
+struct omap_dm_timer *gptimer_pub;
|
|
static struct clock_event_device clockevent_gpt;
|
|
|
|
static u32 last_load;
|
|
@@ -111,7 +112,7 @@ static void __init omap2_gp_clockevent_init(void)
|
|
{
|
|
u32 tick_rate;
|
|
|
|
- gptimer = omap_dm_timer_request_specific(1);
|
|
+ gptimer = gptimer_pub = omap_dm_timer_request_specific(1);
|
|
BUG_ON(gptimer == NULL);
|
|
|
|
#if defined(CONFIG_OMAP_32K_TIMER)
|
|
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
|
|
index e38a11e..b10f8ac 100644
|
|
--- a/arch/arm/plat-omap/dmtimer.c
|
|
+++ b/arch/arm/plat-omap/dmtimer.c
|
|
@@ -614,6 +614,26 @@ void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer,
|
|
omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, value);
|
|
}
|
|
|
|
+void omap_dm_timer_dump_int_enable(struct omap_dm_timer *timer)
|
|
+{
|
|
+ u32 l;
|
|
+ l = omap_dm_timer_read_reg(timer, OMAP_TIMER_COUNTER_REG);
|
|
+ pr_err("GPT TCRR: %08x\n", l);
|
|
+ l = omap_dm_timer_read_reg(timer, OMAP_TIMER_MATCH_REG);
|
|
+ pr_err("GPT TMAT: %08x\n", l);
|
|
+ l = omap_dm_timer_read_reg(timer, OMAP_TIMER_STAT_REG);
|
|
+ pr_err("GPT TISR: %08x\n", l);
|
|
+ l = omap_dm_timer_read_reg(timer, OMAP_TIMER_INT_EN_REG);
|
|
+ pr_err("GPT TIER: %08x\n", l);
|
|
+ l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
|
|
+ pr_err("GPT TCLR: %08x\n", l);
|
|
+ l = omap_dm_timer_read_reg(timer, OMAP_TIMER_TICK_INT_MASK_SET_REG);
|
|
+ pr_err("GPT TOCR: %08x\n", l);
|
|
+ l = omap_dm_timer_read_reg(timer, OMAP_TIMER_TICK_INT_MASK_COUNT_REG);
|
|
+ pr_err("GPT TOWR: %08x\n", l);
|
|
+}
|
|
+
|
|
+
|
|
unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer)
|
|
{
|
|
unsigned int l;
|
|
diff --git a/include/asm-arm/arch-omap/dmtimer.h b/include/asm-arm/arch-omap/dmtimer.h
|
|
index 02b29e8..a8123e9 100644
|
|
--- a/include/asm-arm/arch-omap/dmtimer.h
|
|
+++ b/include/asm-arm/arch-omap/dmtimer.h
|
|
@@ -73,6 +73,7 @@ void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler);
|
|
|
|
void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value);
|
|
|
|
+void omap_dm_timer_dump_int_enable(struct omap_dm_timer *timer);
|
|
unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer);
|
|
void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value);
|
|
unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer);
|
|
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
|
|
index a40e20f..452eab7 100644
|
|
--- a/kernel/time/timer_list.c
|
|
+++ b/kernel/time/timer_list.c
|
|
@@ -18,6 +18,8 @@
|
|
#include <linux/kallsyms.h>
|
|
#include <linux/tick.h>
|
|
|
|
+#include <asm/arch/dmtimer.h>
|
|
+
|
|
#include <asm/uaccess.h>
|
|
|
|
typedef void (*print_fn_t)(struct seq_file *m, unsigned int *classes);
|
|
@@ -239,6 +241,8 @@ static void timer_list_show_tickdevices(struct seq_file *m)
|
|
static void timer_list_show_tickdevices(struct seq_file *m) { }
|
|
#endif
|
|
|
|
+extern struct omap_dm_timer *gptimer_pub;
|
|
+
|
|
static int timer_list_show(struct seq_file *m, void *v)
|
|
{
|
|
u64 now = ktime_to_ns(ktime_get());
|
|
@@ -254,6 +258,10 @@ static int timer_list_show(struct seq_file *m, void *v)
|
|
SEQ_printf(m, "\n");
|
|
timer_list_show_tickdevices(m);
|
|
|
|
+ SEQ_printf(m, "\n");
|
|
+
|
|
+ omap_dm_timer_dump_int_enable(gptimer_pub);
|
|
+
|
|
return 0;
|
|
}
|
|
|