aboutsummaryrefslogtreecommitdiffstats
path: root/target
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
commitf17866d4d362a456b49cd61a4e6dc95fa070a7f1 (patch)
tree1cdcb19863f8f2b1d966c467aef4aa79c958ead5 /target
parent6eb901700cc9f94a8dfa6001d6a913f97d71d542 (diff)
downloadupstream-f17866d4d362a456b49cd61a4e6dc95fa070a7f1.tar.gz
upstream-f17866d4d362a456b49cd61a4e6dc95fa070a7f1.tar.bz2
upstream-f17866d4d362a456b49cd61a4e6dc95fa070a7f1.zip
avr32: add support for 3.10
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38173 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/avr32/config-3.10114
-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
3 files changed, 213 insertions, 0 deletions
diff --git a/target/linux/avr32/config-3.10 b/target/linux/avr32/config-3.10
new file mode 100644
index 0000000000..0ee78c3ec1
--- /dev/null
+++ b/target/linux/avr32/config-3.10
@@ -0,0 +1,114 @@
+CONFIG_AP700X_16_BIT_SMC=y
+# CONFIG_AP700X_32_BIT_SMC is not set
+# CONFIG_AP700X_8_BIT_SMC is not set
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
+CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
+# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
+CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+# CONFIG_ARCH_SPARSEMEM_ENABLE is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
+CONFIG_AT32AP700X_WDT=m
+CONFIG_ATMEL_TCB_CLKSRC=y
+CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
+CONFIG_ATMEL_TCLIB=y
+CONFIG_AVR32=y
+CONFIG_BOARD_ATNGW100_ADDON_NONE=y
+CONFIG_BOARD_ATNGW100_COMMON=y
+# CONFIG_BOARD_ATNGW100_EVKLCD10X is not set
+CONFIG_BOARD_ATNGW100_MKI=y
+# CONFIG_BOARD_ATNGW100_MKII is not set
+# CONFIG_BOARD_ATNGW100_MRMT is not set
+# CONFIG_BOARD_ATSTK1000 is not set
+# CONFIG_BOARD_FAVR_32 is not set
+# CONFIG_BOARD_HAMMERHEAD is not set
+# CONFIG_BOARD_MERISC is not set
+# CONFIG_BOARD_MIMC200 is not set
+CONFIG_CPU_AT32AP7000=y
+CONFIG_CPU_AT32AP700X=y
+CONFIG_DMADEVICES=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DW_DMAC=y
+CONFIG_DW_DMAC_BIG_ENDIAN_IO=y
+CONFIG_ENTRY_ADDRESS=0x90000000
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_GENERIC_IO=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_DEVRES=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
+# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_FB_ATMEL=y
+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
+CONFIG_HAVE_GENERIC_HARDIRQS=y
+CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
+CONFIG_HAVE_NET_DSA=y
+CONFIG_HAVE_OPROFILE=y
+CONFIG_I2C=m
+CONFIG_I2C_BOARDINFO=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_IRQ_WORK=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LOADER_U_BOOT=y
+CONFIG_LOAD_ADDRESS=0x10000000
+CONFIG_MACB=y
+CONFIG_MDIO_BOARDINFO=y
+CONFIG_MMC=m
+CONFIG_MMC_ATMELMCI=m
+CONFIG_MMC_BLOCK=m
+CONFIG_MODULES_USE_ELF_RELA=y
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_DATAFLASH=y
+# CONFIG_MTD_DATAFLASH_OTP is not set
+# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
+CONFIG_MTD_PHYSMAP=y
+# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
+CONFIG_NEED_PER_CPU_KM=y
+# CONFIG_NET_DMA is not set
+# CONFIG_NMI_DEBUGGING is not set
+CONFIG_NO_HZ=y
+CONFIG_NO_HZ_COMMON=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_NR_QUICK=2
+# CONFIG_OWNERSHIP_TRACE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_PERFORMANCE_COUNTERS=y
+CONFIG_PHYLIB=y
+CONFIG_PHYS_OFFSET=0x10000000
+CONFIG_PLATFORM_AT32AP=y
+# CONFIG_PREEMPT_RCU is not set
+CONFIG_QUICKLIST=y
+# CONFIG_RCU_STALL_COMMON is not set
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_AT32AP700X=y
+# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_SCHED_HRTICK=y
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SERIAL_8250 is not set
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+CONFIG_SERIAL_ATMEL_PDC=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
+CONFIG_SPI=y
+CONFIG_SPI_ATMEL=y
+CONFIG_SPI_MASTER=y
+CONFIG_SUBARCH_AVR32B=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_UIDGID_CONVERTED=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_XHCI is not set
+CONFIG_ZONE_DMA_FLAG=0
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 = {