summaryrefslogtreecommitdiffstats
path: root/target/linux/avr32/patches-3.10
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-09-25 13:33:49 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-09-25 13:33:49 +0000
commitb8d09278a18ed732d183cb1eaf70b7d462ea5125 (patch)
treefaaa3c37cb7abf6fd0b155ddd4d4e282f6888f42 /target/linux/avr32/patches-3.10
parent49722e7dcb19b4a70f455c689988bbb4bea89170 (diff)
downloadmaster-31e0f0ae-b8d09278a18ed732d183cb1eaf70b7d462ea5125.tar.gz
master-31e0f0ae-b8d09278a18ed732d183cb1eaf70b7d462ea5125.tar.bz2
master-31e0f0ae-b8d09278a18ed732d183cb1eaf70b7d462ea5125.zip
avr32: add support for 3.10
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 38173
Diffstat (limited to 'target/linux/avr32/patches-3.10')
-rw-r--r--target/linux/avr32/patches-3.10/100-avr32-balance-cpu_idle_poll_ctrl-calls.patch68
-rw-r--r--target/linux/avr32/patches-3.10/110-openwrt_flashmap.patch31
2 files changed, 99 insertions, 0 deletions
diff --git a/target/linux/avr32/patches-3.10/100-avr32-balance-cpu_idle_poll_ctrl-calls.patch b/target/linux/avr32/patches-3.10/100-avr32-balance-cpu_idle_poll_ctrl-calls.patch
new file mode 100644
index 0000000000..15918d623f
--- /dev/null
+++ b/target/linux/avr32/patches-3.10/100-avr32-balance-cpu_idle_poll_ctrl-calls.patch
@@ -0,0 +1,68 @@
+From 1b2bdd19742d4a336a4865d9b352c7a0ca7028ee Mon Sep 17 00:00:00 2001
+From: Gabor Juhos <juhosg@openwrt.org>
+Date: Wed, 25 Sep 2013 10:00:10 +0200
+Subject: [PATCH] avr32: balance cpu_idle_poll_ctrl calls
+
+Since commit 01426478df3a8791ff5c8b6b82d409e699cfaf38
+(avr32: Use generic idle loop) the kernel throws the
+following warning on avr32:
+
+ WARNING: at 900322e4 [verbose debug info unavailable]
+ Modules linked in:
+ CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.0-rc2 #117
+ task: 901c3ecc ti: 901c0000 task.ti: 901c0000
+ PC is at cpu_idle_poll_ctrl+0x1c/0x38
+ LR is at comparator_mode+0x3e/0x40
+ pc : [<900322e4>] lr : [<90014882>] Not tainted
+ sp : 901c1f74 r12: 00000000 r11: 901c74a0
+ r10: 901d2510 r9 : 00000001 r8 : 901db4de
+ r7 : 901c74a0 r6 : 00000001 r5 : 00410020 r4 : 901db574
+ r3 : 00410024 r2 : 90206fe0 r1 : 00000000 r0 : 007f0000
+ Flags: qvnzc
+ Mode bits: hjmde....G
+ CPU Mode: Supervisor
+ Call trace:
+ [<90039ede>] clockevents_set_mode+0x16/0x2e
+ [<90039f00>] clockevents_shutdown+0xa/0x1e
+ [<9003a078>] clockevents_exchange_device+0x58/0x70
+ [<9003a78c>] tick_check_new_device+0x38/0x54
+ [<9003a1a2>] clockevents_register_device+0x32/0x90
+ [<900035c4>] time_init+0xa8/0x108
+ [<90000520>] start_kernel+0x128/0x23c
+
+When the 'avr32_comparator' clockevent device is registered,
+the clockevent core sets the mode of that clockevent device
+to CLOCK_EVT_MODE_SHUTDOWN. Due to this, the 'comparator_mode'
+function calls the 'cpu_idle_poll_ctrl' to disables idle poll.
+This results in the aforementioned warning because the polling
+is not enabled yet.
+
+Change the code to only disable idle poll if it is enabled by
+the same function to avoid the warning.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+---
+Note: the patch is against v3.12-rc2.
+---
+ arch/avr32/kernel/time.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/arch/avr32/kernel/time.c
++++ b/arch/avr32/kernel/time.c
+@@ -98,7 +98,14 @@ static void comparator_mode(enum clock_e
+ case CLOCK_EVT_MODE_SHUTDOWN:
+ sysreg_write(COMPARE, 0);
+ pr_debug("%s: stop\n", evdev->name);
+- cpu_idle_poll_ctrl(false);
++ if (evdev->mode == CLOCK_EVT_MODE_ONESHOT ||
++ evdev->mode == CLOCK_EVT_MODE_RESUME) {
++ /*
++ * Only disable idle poll if we have forced that
++ * in a previous call.
++ */
++ cpu_idle_poll_ctrl(false);
++ }
+ break;
+ default:
+ BUG();
diff --git a/target/linux/avr32/patches-3.10/110-openwrt_flashmap.patch b/target/linux/avr32/patches-3.10/110-openwrt_flashmap.patch
new file mode 100644
index 0000000000..3f87699b04
--- /dev/null
+++ b/target/linux/avr32/patches-3.10/110-openwrt_flashmap.patch
@@ -0,0 +1,31 @@
+--- a/arch/avr32/boards/atngw100/flash.c
++++ b/arch/avr32/boards/atngw100/flash.c
+@@ -45,9 +45,14 @@ static struct mtd_partition flash_parts[
+ .mask_flags = MTD_WRITEABLE,
+ },
+ {
+- .name = "root",
++ .name = "kernel",
+ .offset = 0x00020000,
+- .size = 0x007d0000,
++ .size = 0x00100000,
++ },
++ {
++ .name = "rootfs",
++ .offset = 0x00120000,
++ .size = 0x006d0000,
+ },
+ {
+ .name = "env",
+@@ -55,6 +60,11 @@ static struct mtd_partition flash_parts[
+ .size = 0x00010000,
+ .mask_flags = MTD_WRITEABLE,
+ },
++ {
++ .name = "firmware",
++ .offset = 0x00020000,
++ .size = 0x007d0000,
++ },
+ };
+
+ static struct physmap_flash_data flash_data = {