diff options
author | Richard Purdie <richard@openedhand.com> | 2008-08-03 13:16:29 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-08-03 13:16:29 +0000 |
commit | 1ada01f13068766a44cb05d0868beab3a5d2d575 (patch) | |
tree | d6cf6187177698c90f9a3d2ace69f2482ec5deeb /meta/packages | |
parent | 5e4da782189840fb87bf4ff2ff689a7278cd75c1 (diff) | |
download | poky-1ada01f13068766a44cb05d0868beab3a5d2d575.tar.gz |
linux-omap2: More beagleboard updates from OE.dev
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5010 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages')
8 files changed, 436 insertions, 8 deletions
diff --git a/meta/packages/linux/linux-omap2-git/beagleboard/01-gptimer_clear_isrs_on_init b/meta/packages/linux/linux-omap2-git/beagleboard/01-gptimer_clear_isrs_on_init new file mode 100644 index 0000000000..5123bafe54 --- /dev/null +++ b/meta/packages/linux/linux-omap2-git/beagleboard/01-gptimer_clear_isrs_on_init | |||
@@ -0,0 +1,25 @@ | |||
1 | clear | ||
2 | |||
3 | From: Paul Walmsley <paul@pwsan.com> | ||
4 | |||
5 | |||
6 | --- | ||
7 | |||
8 | arch/arm/plat-omap/dmtimer.c | 4 ++++ | ||
9 | 1 files changed, 4 insertions(+), 0 deletions(-) | ||
10 | |||
11 | diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c | ||
12 | index f22506a..e38a11e 100644 | ||
13 | --- a/arch/arm/plat-omap/dmtimer.c | ||
14 | +++ b/arch/arm/plat-omap/dmtimer.c | ||
15 | @@ -703,6 +703,10 @@ int __init omap_dm_timer_init(void) | ||
16 | timer->fclk = clk_get(NULL, clk_name); | ||
17 | } | ||
18 | #endif | ||
19 | + omap_dm_timer_write_status(timer, OMAP_TIMER_INT_OVERFLOW | | ||
20 | + OMAP_TIMER_INT_MATCH | | ||
21 | + OMAP_TIMER_INT_CAPTURE); | ||
22 | + | ||
23 | } | ||
24 | |||
25 | return 0; | ||
diff --git a/meta/packages/linux/linux-omap2-git/beagleboard/02-gptimer_use_match_for_tick b/meta/packages/linux/linux-omap2-git/beagleboard/02-gptimer_use_match_for_tick new file mode 100644 index 0000000000..6eb6c9b477 --- /dev/null +++ b/meta/packages/linux/linux-omap2-git/beagleboard/02-gptimer_use_match_for_tick | |||
@@ -0,0 +1,97 @@ | |||
1 | OMAP2/3 system tick GPTIMER: use match interrupts rather than overflow interrupts | ||
2 | |||
3 | From: Paul Walmsley <paul@pwsan.com> | ||
4 | |||
5 | On some OMAP3 chips, GPTIMER1 will occasionally decline to interrupt | ||
6 | the MPU when a timer overflow event occurs. The timer stops running; | ||
7 | and TOCR is sometimes incremented; but the MPU apparently never receives | ||
8 | the interrupt. This patch was an experiment in using the GPTIMER | ||
9 | match interrupt to determine if it resolves the problem. | ||
10 | Unfortunately, it does not; the same problem occurs with match | ||
11 | interrupts; but this patch is preserved as the base for a | ||
12 | match+overflow interrupt workaround used in a following patch. | ||
13 | --- | ||
14 | |||
15 | arch/arm/mach-omap2/timer-gp.c | 32 ++++++++++---------------------- | ||
16 | 1 files changed, 10 insertions(+), 22 deletions(-) | ||
17 | |||
18 | diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c | ||
19 | index 557603f..51996ba 100644 | ||
20 | --- a/arch/arm/mach-omap2/timer-gp.c | ||
21 | +++ b/arch/arm/mach-omap2/timer-gp.c | ||
22 | @@ -36,6 +36,8 @@ | ||
23 | #include <asm/mach/time.h> | ||
24 | #include <asm/arch/dmtimer.h> | ||
25 | |||
26 | +#define GPTIMER_MATCH_VAL 0xffff0000 | ||
27 | + | ||
28 | static struct omap_dm_timer *gptimer; | ||
29 | static struct clock_event_device clockevent_gpt; | ||
30 | |||
31 | @@ -44,7 +46,7 @@ static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id) | ||
32 | struct omap_dm_timer *gpt = (struct omap_dm_timer *)dev_id; | ||
33 | struct clock_event_device *evt = &clockevent_gpt; | ||
34 | |||
35 | - omap_dm_timer_write_status(gpt, OMAP_TIMER_INT_OVERFLOW); | ||
36 | + omap_dm_timer_write_status(gpt, OMAP_TIMER_INT_MATCH); | ||
37 | |||
38 | evt->event_handler(evt); | ||
39 | return IRQ_HANDLED; | ||
40 | @@ -59,7 +61,7 @@ static struct irqaction omap2_gp_timer_irq = { | ||
41 | static int omap2_gp_timer_set_next_event(unsigned long cycles, | ||
42 | struct clock_event_device *evt) | ||
43 | { | ||
44 | - omap_dm_timer_set_load_start(gptimer, 0, 0xffffffff - cycles); | ||
45 | + omap_dm_timer_set_load_start(gptimer, 0, GPTIMER_MATCH_VAL - cycles); | ||
46 | |||
47 | return 0; | ||
48 | } | ||
49 | @@ -67,29 +69,12 @@ static int omap2_gp_timer_set_next_event(unsigned long cycles, | ||
50 | static void omap2_gp_timer_set_mode(enum clock_event_mode mode, | ||
51 | struct clock_event_device *evt) | ||
52 | { | ||
53 | - u32 period; | ||
54 | - | ||
55 | omap_dm_timer_stop(gptimer); | ||
56 | - | ||
57 | - switch (mode) { | ||
58 | - case CLOCK_EVT_MODE_PERIODIC: | ||
59 | - period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / HZ; | ||
60 | - period -= 1; | ||
61 | - | ||
62 | - omap_dm_timer_set_load_start(gptimer, 1, 0xffffffff - period); | ||
63 | - break; | ||
64 | - case CLOCK_EVT_MODE_ONESHOT: | ||
65 | - break; | ||
66 | - case CLOCK_EVT_MODE_UNUSED: | ||
67 | - case CLOCK_EVT_MODE_SHUTDOWN: | ||
68 | - case CLOCK_EVT_MODE_RESUME: | ||
69 | - break; | ||
70 | - } | ||
71 | } | ||
72 | |||
73 | static struct clock_event_device clockevent_gpt = { | ||
74 | .name = "gp timer", | ||
75 | - .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | ||
76 | + .features = CLOCK_EVT_FEAT_ONESHOT, | ||
77 | .shift = 32, | ||
78 | .set_next_event = omap2_gp_timer_set_next_event, | ||
79 | .set_mode = omap2_gp_timer_set_mode, | ||
80 | @@ -111,12 +96,15 @@ static void __init omap2_gp_clockevent_init(void) | ||
81 | |||
82 | omap2_gp_timer_irq.dev_id = (void *)gptimer; | ||
83 | setup_irq(omap_dm_timer_get_irq(gptimer), &omap2_gp_timer_irq); | ||
84 | - omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW); | ||
85 | + omap_dm_timer_stop(gptimer); | ||
86 | + /* omap_dm_timer_set_load(gptimer, 0, 0);*/ | ||
87 | + omap_dm_timer_set_match(gptimer, 1, GPTIMER_MATCH_VAL); | ||
88 | + omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_MATCH); | ||
89 | |||
90 | clockevent_gpt.mult = div_sc(tick_rate, NSEC_PER_SEC, | ||
91 | clockevent_gpt.shift); | ||
92 | clockevent_gpt.max_delta_ns = | ||
93 | - clockevent_delta2ns(0xffffffff, &clockevent_gpt); | ||
94 | + clockevent_delta2ns(GPTIMER_MATCH_VAL, &clockevent_gpt); | ||
95 | clockevent_gpt.min_delta_ns = | ||
96 | clockevent_delta2ns(1, &clockevent_gpt); | ||
97 | |||
diff --git a/meta/packages/linux/linux-omap2-git/beagleboard/03-gptimer_match_plus_ovf b/meta/packages/linux/linux-omap2-git/beagleboard/03-gptimer_match_plus_ovf new file mode 100644 index 0000000000..3de6e05042 --- /dev/null +++ b/meta/packages/linux/linux-omap2-git/beagleboard/03-gptimer_match_plus_ovf | |||
@@ -0,0 +1,94 @@ | |||
1 | OMAP2/3 system tick GPTIMER: use overflow interrupts to detect missing match interrupts | ||
2 | |||
3 | From: Paul Walmsley <paul@pwsan.com> | ||
4 | |||
5 | GPTIMER1 on some OMAP3 chips occasionally misses match conditions | ||
6 | between the timer counter and the target register value, and does not | ||
7 | interrupt to the MPU. This patch adds another line of defense by | ||
8 | setting the timer to generate an overflow interrupt 0.5 seconds after the | ||
9 | timer passes the original comparison value. | ||
10 | |||
11 | If interrupts are masked for a long period of time, one would expect | ||
12 | both a match and an overflow interrupt to be logged. This is considered | ||
13 | a normal condition. However, if only an overflow interrupt is logged, | ||
14 | this is considered evidence of a hardware bug and the kernel will issue | ||
15 | a warning. | ||
16 | |||
17 | This workaround is unlikely to be 100% effective, since GPTIMER1 has | ||
18 | also been observed to lose overflow interrupts occasionally. It is | ||
19 | hoped that the probability of losing both will be significantly lower | ||
20 | than the probability of losing either one. | ||
21 | --- | ||
22 | |||
23 | arch/arm/mach-omap2/timer-gp.c | 36 ++++++++++++++++++++++++++++++++---- | ||
24 | 1 files changed, 32 insertions(+), 4 deletions(-) | ||
25 | |||
26 | diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c | ||
27 | index 51996ba..ce5c2b4 100644 | ||
28 | --- a/arch/arm/mach-omap2/timer-gp.c | ||
29 | +++ b/arch/arm/mach-omap2/timer-gp.c | ||
30 | @@ -36,17 +36,43 @@ | ||
31 | #include <asm/mach/time.h> | ||
32 | #include <asm/arch/dmtimer.h> | ||
33 | |||
34 | -#define GPTIMER_MATCH_VAL 0xffff0000 | ||
35 | +/* | ||
36 | + * The number of timer ticks to delay will be subtracted from | ||
37 | + * GPTIMER_MATCH_VAL before loading into the timer. So GPTIMER_MATCH_VAL | ||
38 | + * constrains the longest delay that can be generated with the timer. | ||
39 | + * Since the current code uses overflow interrupts as protection against | ||
40 | + * missed comparison interrupts, this value should also be sufficiently | ||
41 | + * large such that there is not an excessively long delay between ticks | ||
42 | + * if the comparison interrupt fails to arrive. The 0xfffff800 value | ||
43 | + * below results in a half-second delay in such a case when using | ||
44 | + * the 32kHz timer as source. | ||
45 | + */ | ||
46 | +#define GPTIMER_MATCH_VAL (0xffffffff - (32768/2)) | ||
47 | |||
48 | static struct omap_dm_timer *gptimer; | ||
49 | static struct clock_event_device clockevent_gpt; | ||
50 | |||
51 | +static u32 last_load; | ||
52 | + | ||
53 | static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id) | ||
54 | { | ||
55 | struct omap_dm_timer *gpt = (struct omap_dm_timer *)dev_id; | ||
56 | struct clock_event_device *evt = &clockevent_gpt; | ||
57 | - | ||
58 | - omap_dm_timer_write_status(gpt, OMAP_TIMER_INT_MATCH); | ||
59 | + u32 v; | ||
60 | + | ||
61 | + v = omap_dm_timer_read_status(gpt); | ||
62 | + if ((v & OMAP_TIMER_INT_OVERFLOW) && !(v & OMAP_TIMER_INT_MATCH)) { | ||
63 | + /* | ||
64 | + * Should never happen. Current belief is that this is | ||
65 | + * due to a hardware bug in the GPTIMER block on some | ||
66 | + * OMAP3 revisions. | ||
67 | + */ | ||
68 | + pr_err("*** GPTIMER missed match interrupt! last load: %08x\n", | ||
69 | + last_load); | ||
70 | + WARN_ON(1); | ||
71 | + } | ||
72 | + | ||
73 | + omap_dm_timer_write_status(gpt, v); | ||
74 | |||
75 | evt->event_handler(evt); | ||
76 | return IRQ_HANDLED; | ||
77 | @@ -61,6 +87,7 @@ static struct irqaction omap2_gp_timer_irq = { | ||
78 | static int omap2_gp_timer_set_next_event(unsigned long cycles, | ||
79 | struct clock_event_device *evt) | ||
80 | { | ||
81 | + last_load = GPTIMER_MATCH_VAL - cycles; | ||
82 | omap_dm_timer_set_load_start(gptimer, 0, GPTIMER_MATCH_VAL - cycles); | ||
83 | |||
84 | return 0; | ||
85 | @@ -99,7 +126,8 @@ static void __init omap2_gp_clockevent_init(void) | ||
86 | omap_dm_timer_stop(gptimer); | ||
87 | /* omap_dm_timer_set_load(gptimer, 0, 0);*/ | ||
88 | omap_dm_timer_set_match(gptimer, 1, GPTIMER_MATCH_VAL); | ||
89 | - omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_MATCH); | ||
90 | + omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_MATCH | | ||
91 | + OMAP_TIMER_INT_OVERFLOW); | ||
92 | |||
93 | clockevent_gpt.mult = div_sc(tick_rate, NSEC_PER_SEC, | ||
94 | clockevent_gpt.shift); | ||
diff --git a/meta/packages/linux/linux-omap2-git/beagleboard/04-gptimer_add_debug_to_sysrq_q b/meta/packages/linux/linux-omap2-git/beagleboard/04-gptimer_add_debug_to_sysrq_q new file mode 100644 index 0000000000..aa9f09811a --- /dev/null +++ b/meta/packages/linux/linux-omap2-git/beagleboard/04-gptimer_add_debug_to_sysrq_q | |||
@@ -0,0 +1,110 @@ | |||
1 | Add extra debug for the q_d_w_o() when work fn is already active. | ||
2 | |||
3 | From: Paul Walmsley <paul@pwsan.com> | ||
4 | |||
5 | |||
6 | --- | ||
7 | |||
8 | arch/arm/mach-omap2/timer-gp.c | 3 ++- | ||
9 | arch/arm/plat-omap/dmtimer.c | 20 ++++++++++++++++++++ | ||
10 | include/asm-arm/arch-omap/dmtimer.h | 1 + | ||
11 | kernel/time/timer_list.c | 8 ++++++++ | ||
12 | 4 files changed, 31 insertions(+), 1 deletions(-) | ||
13 | |||
14 | diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c | ||
15 | index ce5c2b4..e3ed368 100644 | ||
16 | --- a/arch/arm/mach-omap2/timer-gp.c | ||
17 | +++ b/arch/arm/mach-omap2/timer-gp.c | ||
18 | @@ -50,6 +50,7 @@ | ||
19 | #define GPTIMER_MATCH_VAL (0xffffffff - (32768/2)) | ||
20 | |||
21 | static struct omap_dm_timer *gptimer; | ||
22 | +struct omap_dm_timer *gptimer_pub; | ||
23 | static struct clock_event_device clockevent_gpt; | ||
24 | |||
25 | static u32 last_load; | ||
26 | @@ -111,7 +112,7 @@ static void __init omap2_gp_clockevent_init(void) | ||
27 | { | ||
28 | u32 tick_rate; | ||
29 | |||
30 | - gptimer = omap_dm_timer_request_specific(1); | ||
31 | + gptimer = gptimer_pub = omap_dm_timer_request_specific(1); | ||
32 | BUG_ON(gptimer == NULL); | ||
33 | |||
34 | #if defined(CONFIG_OMAP_32K_TIMER) | ||
35 | diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c | ||
36 | index e38a11e..b10f8ac 100644 | ||
37 | --- a/arch/arm/plat-omap/dmtimer.c | ||
38 | +++ b/arch/arm/plat-omap/dmtimer.c | ||
39 | @@ -614,6 +614,26 @@ void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, | ||
40 | omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, value); | ||
41 | } | ||
42 | |||
43 | +void omap_dm_timer_dump_int_enable(struct omap_dm_timer *timer) | ||
44 | +{ | ||
45 | + u32 l; | ||
46 | + l = omap_dm_timer_read_reg(timer, OMAP_TIMER_COUNTER_REG); | ||
47 | + pr_err("GPT TCRR: %08x\n", l); | ||
48 | + l = omap_dm_timer_read_reg(timer, OMAP_TIMER_MATCH_REG); | ||
49 | + pr_err("GPT TMAT: %08x\n", l); | ||
50 | + l = omap_dm_timer_read_reg(timer, OMAP_TIMER_STAT_REG); | ||
51 | + pr_err("GPT TISR: %08x\n", l); | ||
52 | + l = omap_dm_timer_read_reg(timer, OMAP_TIMER_INT_EN_REG); | ||
53 | + pr_err("GPT TIER: %08x\n", l); | ||
54 | + l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); | ||
55 | + pr_err("GPT TCLR: %08x\n", l); | ||
56 | + l = omap_dm_timer_read_reg(timer, OMAP_TIMER_TICK_INT_MASK_SET_REG); | ||
57 | + pr_err("GPT TOCR: %08x\n", l); | ||
58 | + l = omap_dm_timer_read_reg(timer, OMAP_TIMER_TICK_INT_MASK_COUNT_REG); | ||
59 | + pr_err("GPT TOWR: %08x\n", l); | ||
60 | +} | ||
61 | + | ||
62 | + | ||
63 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer) | ||
64 | { | ||
65 | unsigned int l; | ||
66 | diff --git a/include/asm-arm/arch-omap/dmtimer.h b/include/asm-arm/arch-omap/dmtimer.h | ||
67 | index 02b29e8..a8123e9 100644 | ||
68 | --- a/include/asm-arm/arch-omap/dmtimer.h | ||
69 | +++ b/include/asm-arm/arch-omap/dmtimer.h | ||
70 | @@ -73,6 +73,7 @@ void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler); | ||
71 | |||
72 | void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value); | ||
73 | |||
74 | +void omap_dm_timer_dump_int_enable(struct omap_dm_timer *timer); | ||
75 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer); | ||
76 | void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value); | ||
77 | unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer); | ||
78 | diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c | ||
79 | index a40e20f..452eab7 100644 | ||
80 | --- a/kernel/time/timer_list.c | ||
81 | +++ b/kernel/time/timer_list.c | ||
82 | @@ -18,6 +18,8 @@ | ||
83 | #include <linux/kallsyms.h> | ||
84 | #include <linux/tick.h> | ||
85 | |||
86 | +#include <asm/arch/dmtimer.h> | ||
87 | + | ||
88 | #include <asm/uaccess.h> | ||
89 | |||
90 | typedef void (*print_fn_t)(struct seq_file *m, unsigned int *classes); | ||
91 | @@ -239,6 +241,8 @@ static void timer_list_show_tickdevices(struct seq_file *m) | ||
92 | static void timer_list_show_tickdevices(struct seq_file *m) { } | ||
93 | #endif | ||
94 | |||
95 | +extern struct omap_dm_timer *gptimer_pub; | ||
96 | + | ||
97 | static int timer_list_show(struct seq_file *m, void *v) | ||
98 | { | ||
99 | u64 now = ktime_to_ns(ktime_get()); | ||
100 | @@ -254,6 +258,10 @@ static int timer_list_show(struct seq_file *m, void *v) | ||
101 | SEQ_printf(m, "\n"); | ||
102 | timer_list_show_tickdevices(m); | ||
103 | |||
104 | + SEQ_printf(m, "\n"); | ||
105 | + | ||
106 | + omap_dm_timer_dump_int_enable(gptimer_pub); | ||
107 | + | ||
108 | return 0; | ||
109 | } | ||
110 | |||
diff --git a/meta/packages/linux/linux-omap2-git/beagleboard/defconfig b/meta/packages/linux/linux-omap2-git/beagleboard/defconfig index 6381271cf9..0adc452746 100644 --- a/meta/packages/linux/linux-omap2-git/beagleboard/defconfig +++ b/meta/packages/linux/linux-omap2-git/beagleboard/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc9-omap1 | 3 | # Linux kernel version: 2.6.26-omap1 |
4 | # Tue Jul 8 15:36:02 2008 | 4 | # Wed Jul 30 14:28:15 2008 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | 7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y |
@@ -331,6 +331,7 @@ CONFIG_CPU_FREQ_GOV_ONDEMAND=y | |||
331 | CONFIG_VFP=y | 331 | CONFIG_VFP=y |
332 | CONFIG_VFPv3=y | 332 | CONFIG_VFPv3=y |
333 | CONFIG_NEON=y | 333 | CONFIG_NEON=y |
334 | CONFIG_NEON_CACHE_BUG=y | ||
334 | 335 | ||
335 | # | 336 | # |
336 | # Userspace binary formats | 337 | # Userspace binary formats |
@@ -1406,9 +1407,7 @@ CONFIG_USB_MUSB_SOC=y | |||
1406 | CONFIG_USB_MUSB_OTG=y | 1407 | CONFIG_USB_MUSB_OTG=y |
1407 | CONFIG_USB_GADGET_MUSB_HDRC=y | 1408 | CONFIG_USB_GADGET_MUSB_HDRC=y |
1408 | CONFIG_USB_MUSB_HDRC_HCD=y | 1409 | CONFIG_USB_MUSB_HDRC_HCD=y |
1409 | # CONFIG_MUSB_PIO_ONLY is not set | 1410 | CONFIG_MUSB_PIO_ONLY=y |
1410 | CONFIG_USB_INVENTRA_DMA=y | ||
1411 | # CONFIG_USB_TI_CPPI_DMA is not set | ||
1412 | CONFIG_USB_MUSB_LOGLEVEL=0 | 1411 | CONFIG_USB_MUSB_LOGLEVEL=0 |
1413 | 1412 | ||
1414 | # | 1413 | # |
diff --git a/meta/packages/linux/linux-omap2-git/beagleboard/no-cortex-deadlock.patch b/meta/packages/linux/linux-omap2-git/beagleboard/no-cortex-deadlock.patch new file mode 100644 index 0000000000..32ec4c2d33 --- /dev/null +++ b/meta/packages/linux/linux-omap2-git/beagleboard/no-cortex-deadlock.patch | |||
@@ -0,0 +1,75 @@ | |||
1 | From: Mans Rullgard <mans@mansr.com> | ||
2 | Date: Wed, 30 Jul 2008 08:25:51 +0000 (+0100) | ||
3 | Subject: ARM: NEON L1 cache bug workaround (erratum 451034) | ||
4 | X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=26023493baf13e0a67fd6cf08d87be5ff6f7c56d | ||
5 | |||
6 | ARM: NEON L1 cache bug workaround (erratum 451034) | ||
7 | |||
8 | On Cortex-A8 r1p0 and r1p1, executing a NEON store with an integer | ||
9 | store in the store buffer, can cause a processor deadlock under | ||
10 | certain conditions. | ||
11 | |||
12 | Executing a DMB instruction before saving NEON/VFP registers and before | ||
13 | return to userspace makes it safe to run code which includes similar | ||
14 | counter-measures. Userspace code can still trigger the deadlock, so | ||
15 | a different workaround is required to safely run untrusted code. | ||
16 | |||
17 | See ARM Cortex-A8 Errata Notice (PR120-PRDC-008070) for full details. | ||
18 | --- | ||
19 | |||
20 | diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig | ||
21 | index 8c75840..1172e14 100644 | ||
22 | --- a/arch/arm/Kconfig | ||
23 | +++ b/arch/arm/Kconfig | ||
24 | @@ -1071,6 +1071,22 @@ config NEON | ||
25 | Say Y to include support code for NEON, the ARMv7 Advanced SIMD | ||
26 | Extension. | ||
27 | |||
28 | +config NEON_CACHE_BUG | ||
29 | + bool "NEON L1 cache bug workaround (erratum 451034)" | ||
30 | + depends on VFPv3 | ||
31 | + help | ||
32 | + On Cortex-A8 r1p0 and r1p1, executing a NEON store with an integer | ||
33 | + store in the store buffer, can cause a processor deadlock under | ||
34 | + certain conditions. | ||
35 | + | ||
36 | + See ARM Cortex-A8 Errata Notice (PR120-PRDC-008070) for full details. | ||
37 | + | ||
38 | + Say Y to include a workaround. | ||
39 | + | ||
40 | + WARNING: Even with this option enabled, userspace code can trigger | ||
41 | + the deadlock. To safely run untrusted code, a different fix is | ||
42 | + required. | ||
43 | + | ||
44 | endmenu | ||
45 | |||
46 | menu "Userspace binary formats" | ||
47 | diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S | ||
48 | index 597ed00..e50094e 100644 | ||
49 | --- a/arch/arm/kernel/entry-common.S | ||
50 | +++ b/arch/arm/kernel/entry-common.S | ||
51 | @@ -68,6 +68,10 @@ no_work_pending: | ||
52 | /* perform architecture specific actions before user return */ | ||
53 | arch_ret_to_user r1, lr | ||
54 | |||
55 | +#ifdef CONFIG_NEON_CACHE_BUG | ||
56 | + dmb | ||
57 | +#endif | ||
58 | + | ||
59 | @ slow_restore_user_regs | ||
60 | ldr r1, [sp, #S_PSR] @ get calling cpsr | ||
61 | ldr lr, [sp, #S_PC]! @ get pc | ||
62 | diff --git a/include/asm-arm/vfpmacros.h b/include/asm-arm/vfpmacros.h | ||
63 | index cccb389..c9d2976 100644 | ||
64 | --- a/include/asm-arm/vfpmacros.h | ||
65 | +++ b/include/asm-arm/vfpmacros.h | ||
66 | @@ -32,6 +32,9 @@ | ||
67 | |||
68 | @ write all the working registers out of the VFP | ||
69 | .macro VFPFSTMIA, base, tmp | ||
70 | +#ifdef CONFIG_NEON_CACHE_BUG | ||
71 | + dmb | ||
72 | +#endif | ||
73 | #if __LINUX_ARM_ARCH__ < 6 | ||
74 | STC p11, cr0, [\base],#33*4 @ FSTMIAX \base!, {d0-d15} | ||
75 | #else | ||
diff --git a/meta/packages/linux/linux-omap2-git/beagleboard/read_die_ids.patch b/meta/packages/linux/linux-omap2-git/beagleboard/read_die_ids.patch new file mode 100644 index 0000000000..3f6c930cc1 --- /dev/null +++ b/meta/packages/linux/linux-omap2-git/beagleboard/read_die_ids.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | OMAP2/3 TAP: enable debug messages | ||
2 | |||
3 | From: Paul Walmsley <paul@pwsan.com> | ||
4 | |||
5 | This patch causes the OMAP2/3 chip ID code to display the full DIE_ID registers at boot. | ||
6 | |||
7 | --- | ||
8 | |||
9 | arch/arm/mach-omap2/id.c | 1 + | ||
10 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
11 | |||
12 | diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c | ||
13 | index c7f9ab7..a154b5e 100644 | ||
14 | --- a/arch/arm/mach-omap2/id.c | ||
15 | +++ b/arch/arm/mach-omap2/id.c | ||
16 | @@ -10,6 +10,7 @@ | ||
17 | * it under the terms of the GNU General Public License version 2 as | ||
18 | * published by the Free Software Foundation. | ||
19 | */ | ||
20 | +#define DEBUG | ||
21 | |||
22 | #include <linux/module.h> | ||
23 | #include <linux/kernel.h> | ||
diff --git a/meta/packages/linux/linux-omap2_git.bb b/meta/packages/linux/linux-omap2_git.bb index 983678aaad..4d4692dbb2 100644 --- a/meta/packages/linux/linux-omap2_git.bb +++ b/meta/packages/linux/linux-omap2_git.bb | |||
@@ -5,8 +5,8 @@ FILESPATH = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-omap2-git/${M | |||
5 | SRCREV = "d3b3ae0fe6c71641da19c8de466ec366d39847e3" | 5 | SRCREV = "d3b3ae0fe6c71641da19c8de466ec366d39847e3" |
6 | 6 | ||
7 | PV = "2.6.26" | 7 | PV = "2.6.26" |
8 | #PV = "2.6.25+2.6.26-rc9+${PR}+git${SRCREV}" | 8 | #PV = "2.6.26+2.6.27-rc1+${PR}+git${SRCREV}" |
9 | PR = "r49" | 9 | PR = "r53" |
10 | 10 | ||
11 | SRC_URI = "git://source.mvista.com/git/linux-omap-2.6.git;protocol=git \ | 11 | SRC_URI = "git://source.mvista.com/git/linux-omap-2.6.git;protocol=git \ |
12 | file://fixes.patch;patch=1 \ | 12 | file://fixes.patch;patch=1 \ |
@@ -30,7 +30,6 @@ SRC_URI_append_beagleboard = " file://no-harry-potter.diff;patch=1 \ | |||
30 | file://06-ensure-fclk.diff;patch=1 \ | 30 | file://06-ensure-fclk.diff;patch=1 \ |
31 | file://07-set-burst-size.diff;patch=1 \ | 31 | file://07-set-burst-size.diff;patch=1 \ |
32 | file://cache-display-fix.patch;patch=1 \ | 32 | file://cache-display-fix.patch;patch=1 \ |
33 | file://serialfix.diff;patch=1 \ | ||
34 | file://i2c-omap-race-fix.diff;patch=1 \ | 33 | file://i2c-omap-race-fix.diff;patch=1 \ |
35 | file://TWL4030-01.patch;patch=1 \ | 34 | file://TWL4030-01.patch;patch=1 \ |
36 | file://TWL4030-02.patch;patch=1 \ | 35 | file://TWL4030-02.patch;patch=1 \ |
@@ -46,6 +45,12 @@ SRC_URI_append_beagleboard = " file://no-harry-potter.diff;patch=1 \ | |||
46 | file://mru-clocks3.diff;patch=1 \ | 45 | file://mru-clocks3.diff;patch=1 \ |
47 | file://4bitmmc.diff;patch=1 \ | 46 | file://4bitmmc.diff;patch=1 \ |
48 | file://400khz-i2c.diff;patch=1 \ | 47 | file://400khz-i2c.diff;patch=1 \ |
48 | file://no-cortex-deadlock.patch;patch=1 \ | ||
49 | file://01-gptimer_clear_isrs_on_init;patch=1 \ | ||
50 | file://02-gptimer_use_match_for_tick;patch=1 \ | ||
51 | file://03-gptimer_match_plus_ovf;patch=1 \ | ||
52 | file://04-gptimer_add_debug_to_sysrq_q;patch=1 \ | ||
53 | file://read_die_ids.patch;patch=1 \ | ||
49 | " | 54 | " |
50 | 55 | ||
51 | SRC_URI_append_omap3evm = " file://no-harry-potter.diff;patch=1 \ | 56 | SRC_URI_append_omap3evm = " file://no-harry-potter.diff;patch=1 \ |