summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <uwe@kleine-koenig.org>2013-01-31 22:19:23 +0100
committerUwe Kleine-König <uwe@kleine-koenig.org>2013-01-31 22:19:23 +0100
commit9d60ea13b2254064f23cdb139fafab857f5f2366 (patch)
treec0516d19e7f60ceec6c94ac9acb3b9731b14a51b
parent16a8414fcb0c95ddf1fd16714098c3229ed709fb (diff)
downloadOSELAS.BSP-EnergyMicro-Gecko-9d60ea13b2254064f23cdb139fafab857f5f2366.tar.gz
OSELAS.BSP-EnergyMicro-Gecko-9d60ea13b2254064f23cdb139fafab857f5f2366.tar.xz
platform-energymicro-efm32gg-dk3750: port to Linux 3.8-rc
-rw-r--r--kernelconfig-3.8-rc5 (renamed from kernelconfig-3.6)111
-rw-r--r--patches/linux-3.6/0008-HACK-ARM-no-we-don-t-enter-in-ARM.patch39
-rw-r--r--patches/linux-3.6/0009-mtd-maps-uclinux-fix-sparse-warnings-and-codingstyle.patch162
-rw-r--r--patches/linux-3.6/0010-mtd-maps-uclinux-add-support-for-romfs-in-RAM-or-ROM.patch175
-rw-r--r--patches/linux-3.6/series22
-rw-r--r--patches/linux-3.8-rc5/0001-ARM-make-cr_alignment-read-only-ifndef-CONFIG_CPU_CP.patch (renamed from patches/linux-3.6/0003-ARM-make-cr_alignment-read-only-ifndef-CONFIG_CPU_CP.patch)33
-rw-r--r--patches/linux-3.8-rc5/0002-ARM-let-CPUs-not-being-able-to-run-in-ARM-mode-enter.patch90
-rw-r--r--patches/linux-3.8-rc5/0003-ARM-sync-comments-about-available-data-abort-models-.patch83
-rw-r--r--patches/linux-3.8-rc5/0004-ARM-use-read_cpuid_id-instead-of-read_cpuid-CPUID_ID.patch86
-rw-r--r--patches/linux-3.8-rc5/0005-ARM-stub-out-read_cpuid-and-read_cpuid_ext-for-CPU_C.patch79
-rw-r--r--patches/linux-3.8-rc5/0006-mtd-uclinux-support-ROM-and-allow-passing-the-base-a.patch99
-rw-r--r--patches/linux-3.8-rc5/0007-mtd-uclinux-add-a-comment-about-why-uclinux_ram_map-.patch38
-rw-r--r--patches/linux-3.8-rc5/0008-serial-efm32-parse-location-property.patch119
-rw-r--r--patches/linux-3.8-rc5/0009-Cortex-M3-Add-base-support-for-Cortex-M3.patch (renamed from patches/linux-3.6/0004-Cortex-M3-Add-base-support-for-Cortex-M3.patch)255
-rw-r--r--patches/linux-3.8-rc5/0010-Cortex-M3-Add-support-for-exception-handling.patch (renamed from patches/linux-3.6/0005-Cortex-M3-Add-support-for-exception-handling.patch)59
-rw-r--r--patches/linux-3.8-rc5/0011-hwmon-efm32-adc-new-driver.patch (renamed from patches/linux-3.6/0001-hwmon-efm32-adc-new-driver.patch)26
-rw-r--r--patches/linux-3.8-rc5/0012-spi-new-controller-driver-for-efm32-SoCs.patch (renamed from patches/linux-3.6/0002-spi-new-controller-driver-for-efm32-SoCs.patch)27
-rw-r--r--patches/linux-3.8-rc5/0013-Cortex-M3-Add-NVIC-support.patch (renamed from patches/linux-3.6/0006-Cortex-M3-Add-NVIC-support.patch)174
-rw-r--r--patches/linux-3.8-rc5/0014-Cortex-M3-Allow-the-building-of-Cortex-M3-kernel-por.patch (renamed from patches/linux-3.6/0007-Cortex-M3-Allow-the-building-of-Cortex-M3-kernel-por.patch)77
-rw-r--r--patches/linux-3.8-rc5/0015-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch (renamed from patches/linux-3.6/0011-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch)59
-rw-r--r--patches/linux-3.8-rc5/0016-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch (renamed from patches/linux-3.6/0012-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch)60
-rw-r--r--patches/linux-3.8-rc5/0017-pinctrl-add-a-driver-for-Energy-Micro-s-efm32-SoCs.patch (renamed from patches/linux-3.6/0013-pinctrl-add-a-driver-for-Energy-Micro-s-efm32-SoCs.patch)40
-rw-r--r--patches/linux-3.8-rc5/0018-HACK-ARM-allow-a-bootloader-to-be-embedded-and-do-it.patch (renamed from patches/linux-3.6/0014-HACK-ARM-allow-a-bootloader-to-be-embedded-and-do-it.patch)8
-rw-r--r--patches/linux-3.8-rc5/0019-HACK-don-t-reserve-memory-for-device-tree-if-it-s-be.patch (renamed from patches/linux-3.6/0015-HACK-don-t-reserve-memory-for-device-tree-if-it-s-be.patch)4
-rw-r--r--patches/linux-3.8-rc5/0020-HACK-make-stack-dumps-provoked-by-BUG-a-bit-more-hel.patch (renamed from patches/linux-3.6/0016-HACK-make-stack-dumps-provoked-by-BUG-a-bit-more-hel.patch)2
-rw-r--r--patches/linux-3.8-rc5/0021-ARM-v7m-add-trivial-suspend-support.patch (renamed from patches/linux-3.6/0017-ARM-v7m-add-trivial-suspend-support.patch)18
-rw-r--r--patches/linux-3.8-rc5/0022-ARM-efm32-add-trivial-suspend-support.patch (renamed from patches/linux-3.6/0018-ARM-efm32-add-trivial-suspend-support.patch)0
-rw-r--r--patches/linux-3.8-rc5/0023-HACK-ARM-increase-TASK_SIZE-for-MMU.patch (renamed from patches/linux-3.6/0019-HACK-ARM-increase-TASK_SIZE-for-MMU.patch)2
-rw-r--r--patches/linux-3.8-rc5/series26
-rw-r--r--platformconfig4
30 files changed, 1151 insertions, 826 deletions
diff --git a/kernelconfig-3.6 b/kernelconfig-3.8-rc5
index 8dd8102..5093ac7 100644
--- a/kernelconfig-3.6
+++ b/kernelconfig-3.8-rc5
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/arm 3.6.0 Kernel Configuration
+# Linux/arm 3.8.0-rc5 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -39,7 +39,6 @@ CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_LZO is not set
CONFIG_DEFAULT_HOSTNAME="(none)"
# CONFIG_SYSVIPC is not set
-# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_FHANDLE is not set
CONFIG_HAVE_GENERIC_HARDIRQS=y
@@ -50,6 +49,7 @@ CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_IRQ_DOMAIN=y
CONFIG_KTIME_SCALAR=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
@@ -62,6 +62,12 @@ CONFIG_TICK_ONESHOT=y
CONFIG_HIGH_RES_TIMERS=y
#
+# CPU/Task time and stats accounting
+#
+CONFIG_TICK_CPU_ACCOUNTING=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+
+#
# RCU Subsystem
#
CONFIG_TINY_RCU=y
@@ -71,6 +77,8 @@ CONFIG_TINY_RCU=y
CONFIG_LOG_BUF_SHIFT=12
# CONFIG_CHECKPOINT_RESTORE is not set
# CONFIG_NAMESPACES is not set
+CONFIG_UIDGID_CONVERTED=y
+# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set
# CONFIG_SCHED_AUTOGROUP is not set
# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_RELAY is not set
@@ -78,12 +86,13 @@ CONFIG_LOG_BUF_SHIFT=12
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_ANON_INODES=y
CONFIG_EXPERT=y
+CONFIG_HAVE_UID16=y
# CONFIG_UID16 is not set
-# CONFIG_KALLSYMS is not set
-# CONFIG_HOTPLUG is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
-# CONFIG_ELF_CORE is not set
# CONFIG_BASE_FULL is not set
# CONFIG_FUTEX is not set
# CONFIG_EPOLL is not set
@@ -115,6 +124,10 @@ CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_CLK=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
+CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
+CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_CLONE_BACKWARDS=y
#
# GCOV-based kernel profiling
@@ -133,6 +146,7 @@ CONFIG_BLOCK=y
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
+CONFIG_EFI_PARTITION=y
#
# IO Schedulers
@@ -142,69 +156,40 @@ CONFIG_IOSCHED_NOOP=y
# CONFIG_IOSCHED_CFQ is not set
CONFIG_DEFAULT_NOOP=y
CONFIG_DEFAULT_IOSCHED="noop"
-# CONFIG_INLINE_SPIN_TRYLOCK is not set
-# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
-# CONFIG_INLINE_SPIN_LOCK is not set
-# CONFIG_INLINE_SPIN_LOCK_BH is not set
-# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
-# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
-# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
-# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
-# CONFIG_INLINE_READ_TRYLOCK is not set
-# CONFIG_INLINE_READ_LOCK is not set
-# CONFIG_INLINE_READ_LOCK_BH is not set
-# CONFIG_INLINE_READ_LOCK_IRQ is not set
-# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
CONFIG_INLINE_READ_UNLOCK=y
-# CONFIG_INLINE_READ_UNLOCK_BH is not set
CONFIG_INLINE_READ_UNLOCK_IRQ=y
-# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
-# CONFIG_INLINE_WRITE_TRYLOCK is not set
-# CONFIG_INLINE_WRITE_LOCK is not set
-# CONFIG_INLINE_WRITE_LOCK_BH is not set
-# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
-# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
CONFIG_INLINE_WRITE_UNLOCK=y
-# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
-# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
-# CONFIG_MUTEX_SPIN_ON_OWNER is not set
CONFIG_FREEZER=y
#
# System Type
#
# CONFIG_MMU is not set
-# CONFIG_ARCH_SOCFPGA is not set
# CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_REALVIEW is not set
# CONFIG_ARCH_VERSATILE is not set
-# CONFIG_ARCH_VEXPRESS is not set
# CONFIG_ARCH_AT91 is not set
-# CONFIG_ARCH_HIGHBANK is not set
-# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_BCM2835 is not set
# CONFIG_ARCH_CNS3XXX is not set
+# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_GEMINI is not set
-# CONFIG_ARCH_PRIMA2 is not set
+# CONFIG_ARCH_SIRF is not set
# CONFIG_ARCH_EBSA110 is not set
CONFIG_ARCH_EFM32=y
# CONFIG_ARCH_EP93XX is not set
# CONFIG_ARCH_FOOTBRIDGE is not set
-# CONFIG_ARCH_MXC is not set
# CONFIG_ARCH_MXS is not set
# CONFIG_ARCH_NETX is not set
# CONFIG_ARCH_H720X is not set
-# CONFIG_ARCH_MVEBU is not set
# CONFIG_ARCH_DOVE is not set
# CONFIG_ARCH_KIRKWOOD is not set
-# CONFIG_ARCH_LPC32XX is not set
# CONFIG_ARCH_MV78XX0 is not set
# CONFIG_ARCH_KS8695 is not set
# CONFIG_ARCH_W90X900 is not set
+# CONFIG_ARCH_LPC32XX is not set
# CONFIG_ARCH_TEGRA is not set
-# CONFIG_ARCH_PICOXCELL is not set
-# CONFIG_ARCH_PNX4008 is not set
# CONFIG_ARCH_MSM is not set
# CONFIG_ARCH_SHMOBILE is not set
# CONFIG_ARCH_RPC is not set
@@ -217,12 +202,12 @@ CONFIG_ARCH_EFM32=y
# CONFIG_ARCH_EXYNOS is not set
# CONFIG_ARCH_SHARK is not set
# CONFIG_ARCH_NOMADIK is not set
-# CONFIG_ARCH_DAVINCI is not set
# CONFIG_PLAT_SPEAR is not set
-# CONFIG_ARCH_VT8500 is not set
-# CONFIG_ARCH_ZYNQ is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_VT8500_SINGLE is not set
CONFIG_MACH_EFM32GG_DK3750=y
# CONFIG_EFM32GG_DK3750_FPGA is not set
+# CONFIG_ARCH_VT8500 is not set
#
# Processor Type
@@ -230,7 +215,7 @@ CONFIG_MACH_EFM32GG_DK3750=y
# CONFIG_CPU_ARM7TDMI is not set
# CONFIG_CPU_ARM9TDMI is not set
CONFIG_CPU_V7M=y
-CONFIG_CPU_32v6K=y
+CONFIG_CPU_THUMBONLY=y
CONFIG_CPU_32v7M=y
CONFIG_CPU_ABRT_NOMMU=y
CONFIG_CPU_PABRT_LEGACY=y
@@ -256,7 +241,7 @@ CONFIG_ARM_NVIC=y
# Bus support
#
# CONFIG_PCI_SYSCALL is not set
-# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
#
# Kernel Features
@@ -292,12 +277,13 @@ CONFIG_NEED_PER_CPU_KM=y
CONFIG_FORCE_MAX_ZONEORDER=9
# CONFIG_SECCOMP is not set
# CONFIG_CC_STACKPROTECTOR is not set
-# CONFIG_DEPRECATED_PARAM_STRUCT is not set
#
# Boot options
#
# CONFIG_USE_OF is not set
+CONFIG_ATAGS=y
+# CONFIG_DEPRECATED_PARAM_STRUCT is not set
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_CMDLINE=""
@@ -331,6 +317,7 @@ CONFIG_BINFMT_SHARED_FLAT=y
CONFIG_HAVE_AOUT=y
# CONFIG_BINFMT_AOUT is not set
# CONFIG_BINFMT_MISC is not set
+# CONFIG_COREDUMP is not set
#
# Power management options
@@ -358,6 +345,8 @@ CONFIG_HAVE_BPF_JIT=y
#
# Generic Driver Options
#
+CONFIG_UEVENT_HELPER_PATH=""
+# CONFIG_DEVTMPFS is not set
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FW_LOADER is not set
@@ -366,6 +355,10 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_GENERIC_CPU_DEVICES is not set
# CONFIG_DMA_SHARED_BUFFER is not set
+
+#
+# Bus devices
+#
CONFIG_MTD=y
# CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
@@ -412,9 +405,6 @@ CONFIG_MTD_ROM=y
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
# CONFIG_MTD_PHYSMAP is not set
CONFIG_MTD_UCLINUX=y
-# CONFIG_MTD_UCLINUX_EBSS is not set
-CONFIG_MTD_UCLINUX_ADDRESS=0x8c000000
-CONFIG_MTD_UCLINUX_ROM=y
# CONFIG_MTD_PLATRAM is not set
#
@@ -511,16 +501,17 @@ CONFIG_SERIAL_NONSTANDARD=y
# Non-8250 serial port support
#
# CONFIG_SERIAL_MAX3100 is not set
-# CONFIG_SERIAL_MAX3107 is not set
+# CONFIG_SERIAL_MAX310X is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_SCCNXP is not set
# CONFIG_SERIAL_TIMBERDALE is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not set
# CONFIG_SERIAL_IFX6X60 is not set
-# CONFIG_SERIAL_XILINX_PS_UART is not set
CONFIG_SERIAL_EFM32_UART=y
CONFIG_SERIAL_EFM32_UART_CONSOLE=y
+# CONFIG_SERIAL_ARC is not set
# CONFIG_TTY_PRINTK is not set
# CONFIG_HVC_DCC is not set
# CONFIG_IPMI_HANDLER is not set
@@ -564,10 +555,12 @@ CONFIG_SPI_EFM32=y
#
# PTP clock support
#
+# CONFIG_PTP_1588_CLOCK is not set
#
-# Enable Device Drivers -> PPS to see the PTP clock options.
+# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.
#
+# CONFIG_PTP_1588_CLOCK_PCH is not set
CONFIG_PINCTRL=y
#
@@ -577,6 +570,7 @@ CONFIG_PINMUX=y
CONFIG_PINCONF=y
# CONFIG_DEBUG_PINCTRL is not set
CONFIG_PINCTRL_EFM32=y
+# CONFIG_PINCTRL_EXYNOS5440 is not set
CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
CONFIG_ARCH_REQUIRE_GPIOLIB=y
CONFIG_GPIOLIB=y
@@ -588,6 +582,7 @@ CONFIG_GPIO_SYSFS=y
#
# CONFIG_GPIO_GENERIC_PLATFORM is not set
# CONFIG_GPIO_EM is not set
+# CONFIG_GPIO_TS5500 is not set
#
# I2C GPIO expanders:
@@ -612,6 +607,10 @@ CONFIG_GPIO_SYSFS=y
#
# MODULbus GPIO expanders:
#
+
+#
+# USB GPIO expanders:
+#
# CONFIG_W1 is not set
# CONFIG_POWER_SUPPLY is not set
# CONFIG_POWER_AVS is not set
@@ -631,6 +630,7 @@ CONFIG_SENSORS_EFM32_ADC=y
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_LM70 is not set
# CONFIG_SENSORS_MAX1111 is not set
+# CONFIG_SENSORS_MAX197 is not set
# CONFIG_SENSORS_NTC_THERMISTOR is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
@@ -663,6 +663,7 @@ CONFIG_BCMA_POSSIBLE=y
# CONFIG_MFD_CORE is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_MFD_ASIC3 is not set
+# CONFIG_MFD_TI_AM335X_TSCADC is not set
# CONFIG_HTC_EGPIO is not set
# CONFIG_HTC_PASIC3 is not set
# CONFIG_MFD_TPS65912_SPI is not set
@@ -707,7 +708,6 @@ CONFIG_RTC_LIB=y
#
# Virtio drivers
#
-# CONFIG_VIRTIO_BALLOON is not set
# CONFIG_VIRTIO_MMIO is not set
#
@@ -724,6 +724,7 @@ CONFIG_CLKSRC_MMIO=y
#
# Remoteproc drivers (EXPERIMENTAL)
#
+# CONFIG_STE_MODEM_RPROC is not set
#
# Rpmsg drivers (EXPERIMENTAL)
@@ -734,6 +735,7 @@ CONFIG_CLKSRC_MMIO=y
# CONFIG_MEMORY is not set
# CONFIG_IIO is not set
# CONFIG_PWM is not set
+# CONFIG_IPACK_BUS is not set
#
# File systems
@@ -808,6 +810,7 @@ CONFIG_ROMFS_ON_MTD=y
# CONFIG_PSTORE is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
+# CONFIG_F2FS_FS is not set
# CONFIG_NLS is not set
#
@@ -828,12 +831,12 @@ CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SHIRQ is not set
# CONFIG_LOCKUP_DETECTOR is not set
-# CONFIG_HARDLOCKUP_DETECTOR is not set
# CONFIG_PANIC_ON_OOPS is not set
CONFIG_PANIC_ON_OOPS_VALUE=0
# CONFIG_DETECT_HUNG_TASK is not set
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_SLUB_STATS is not set
+CONFIG_HAVE_DEBUG_KMEMLEAK=y
# CONFIG_DEBUG_KMEMLEAK is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_MUTEXES is not set
@@ -866,6 +869,7 @@ CONFIG_DEBUG_INFO=y
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_DEBUG_PAGEALLOC is not set
+CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_TRACING_SUPPORT=y
# CONFIG_FTRACE is not set
@@ -878,6 +882,7 @@ CONFIG_HAVE_ARCH_KGDB=y
CONFIG_ARM_UNWIND=y
# CONFIG_DEBUG_USER is not set
# CONFIG_DEBUG_LL is not set
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
#
# Security options
@@ -899,6 +904,7 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y
CONFIG_GENERIC_STRNLEN_USER=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_IO=y
+CONFIG_PERCPU_RWSEM=y
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
# CONFIG_CRC_T10DIF is not set
@@ -916,6 +922,7 @@ CONFIG_CRC32_SLICEBY8=y
# CONFIG_XZ_DEC_BCJ is not set
CONFIG_HAS_IOMEM=y
CONFIG_HAS_DMA=y
+CONFIG_GENERIC_ATOMIC64=y
CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
# CONFIG_AVERAGE is not set
# CONFIG_CORDIC is not set
diff --git a/patches/linux-3.6/0008-HACK-ARM-no-we-don-t-enter-in-ARM.patch b/patches/linux-3.6/0008-HACK-ARM-no-we-don-t-enter-in-ARM.patch
deleted file mode 100644
index 428dc04..0000000
--- a/patches/linux-3.6/0008-HACK-ARM-no-we-don-t-enter-in-ARM.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
-Date: Fri, 9 Dec 2011 20:52:10 +0100
-Subject: [PATCH] HACK! ARM: no, we don't enter in ARM
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-... as a Cortex-M3 can only do Thumb-2 ...
-
-Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
----
-This probably needs a new Kconfig symbol as THUMB2_KERNEL doesn't have
-the right meaning. Something like "CPU_THUMB_ONLY"?
----
- arch/arm/kernel/head-nommu.S | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
-index c391c05..b27af61 100644
---- a/arch/arm/kernel/head-nommu.S
-+++ b/arch/arm/kernel/head-nommu.S
-@@ -32,13 +32,14 @@
- * numbers for r1.
- *
- */
-- .arm
-+
-+ @.arm
-
- __HEAD
- ENTRY(stext)
-
-- THUMB( adr r9, BSYM(1f) ) @ Kernel is always entered in ARM.
-- THUMB( bx r9 ) @ If this is a Thumb-2 kernel,
-+ @THUMB( adr r9, BSYM(1f) ) @ Kernel is always entered in ARM.
-+ @THUMB( bx r9 ) @ If this is a Thumb-2 kernel,
- THUMB( .thumb ) @ switch to Thumb now.
- THUMB(1: )
-
diff --git a/patches/linux-3.6/0009-mtd-maps-uclinux-fix-sparse-warnings-and-codingstyle.patch b/patches/linux-3.6/0009-mtd-maps-uclinux-fix-sparse-warnings-and-codingstyle.patch
deleted file mode 100644
index 1728d74..0000000
--- a/patches/linux-3.6/0009-mtd-maps-uclinux-fix-sparse-warnings-and-codingstyle.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Mon, 7 Nov 2011 09:39:32 +0100
-Subject: [PATCH] mtd/maps: uclinux: fix sparse warnings and codingstyle
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
----
- drivers/mtd/maps/uclinux.c | 73 ++++++++++++++++++--------------------------
- 1 file changed, 29 insertions(+), 44 deletions(-)
-
-diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c
-index c3bb304..3e39318 100644
---- a/drivers/mtd/maps/uclinux.c
-+++ b/drivers/mtd/maps/uclinux.c
-@@ -1,12 +1,15 @@
--/****************************************************************************/
--
- /*
-- * uclinux.c -- generic memory mapped MTD driver for uclinux
-+ * uclinux.c -- generic memory mapped MTD driver for uclinux
-+ *
-+ * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License version
-+ * 2 as published by the Free Software Foundation.
- *
-- * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
- */
-
--/****************************************************************************/
-+#define pr_fmt(fmt) "uclinux[mtd]: " fmt
-
- #include <linux/module.h>
- #include <linux/types.h>
-@@ -18,69 +21,57 @@
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/map.h>
- #include <linux/mtd/partitions.h>
--#include <asm/io.h>
-+#include <linux/io.h>
- #include <asm/sections.h>
-
--/****************************************************************************/
--
--struct map_info uclinux_ram_map = {
-+static struct map_info uclinux_ram_map = {
- .name = "RAM",
-- .phys = (unsigned long)__bss_stop,
-- .size = 0,
-+ .phys = (resource_size_t)__bss_stop,
-+ .bankwidth = 4,
- };
-
- static struct mtd_info *uclinux_ram_mtdinfo;
-
--/****************************************************************************/
--
- static struct mtd_partition uclinux_romfs[] = {
- { .name = "ROMfs" }
- };
-
--#define NUM_PARTITIONS ARRAY_SIZE(uclinux_romfs)
--
--/****************************************************************************/
--
- static int uclinux_point(struct mtd_info *mtd, loff_t from, size_t len,
-- size_t *retlen, void **virt, resource_size_t *phys)
-+ size_t *retlen, void **virt, resource_size_t *phys)
- {
- struct map_info *map = mtd->priv;
-- *virt = map->virt + from;
-+ *virt = (__force void *)(map->virt + from);
- if (phys)
- *phys = map->phys + from;
- *retlen = len;
-- return(0);
-+ return 0;
- }
-
--/****************************************************************************/
--
- static int __init uclinux_mtd_init(void)
- {
- struct mtd_info *mtd;
-- struct map_info *mapp;
-+ struct map_info *mapp = &uclinux_ram_map;
-
-- mapp = &uclinux_ram_map;
- if (!mapp->size)
-- mapp->size = PAGE_ALIGN(ntohl(*((unsigned long *)(mapp->phys + 8))));
-- mapp->bankwidth = 4;
-+ mapp->size =
-+ PAGE_ALIGN(be32_to_cpup((__be32 *)(mapp->phys + 8)));
-
-- printk("uclinux[mtd]: RAM probe address=0x%x size=0x%x\n",
-- (int) mapp->phys, (int) mapp->size);
-+ pr_info("RAM probe address=0x%x size=0x%x\n",
-+ (int) mapp->phys, (int) mapp->size);
-
- mapp->virt = ioremap_nocache(mapp->phys, mapp->size);
--
-- if (mapp->virt == 0) {
-- printk("uclinux[mtd]: ioremap_nocache() failed\n");
-- return(-EIO);
-+ if (!mapp->virt) {
-+ pr_err("ioremap_nocache() failed\n");
-+ return -EIO;
- }
-
- simple_map_init(mapp);
-
- mtd = do_map_probe("map_ram", mapp);
- if (!mtd) {
-- printk("uclinux[mtd]: failed to find a mapping?\n");
-+ pr_err("failed to find a mapping?\n");
- iounmap(mapp->virt);
-- return(-ENXIO);
-+ return -ENXIO;
- }
-
- mtd->owner = THIS_MODULE;
-@@ -88,13 +79,11 @@ static int __init uclinux_mtd_init(void)
- mtd->priv = mapp;
-
- uclinux_ram_mtdinfo = mtd;
-- mtd_device_register(mtd, uclinux_romfs, NUM_PARTITIONS);
-+ mtd_device_register(mtd, uclinux_romfs, ARRAY_SIZE(uclinux_romfs));
-
-- return(0);
-+ return 0;
- }
-
--/****************************************************************************/
--
- static void __exit uclinux_mtd_cleanup(void)
- {
- if (uclinux_ram_mtdinfo) {
-@@ -103,18 +92,14 @@ static void __exit uclinux_mtd_cleanup(void)
- uclinux_ram_mtdinfo = NULL;
- }
- if (uclinux_ram_map.virt) {
-- iounmap((void *) uclinux_ram_map.virt);
-- uclinux_ram_map.virt = 0;
-+ iounmap(uclinux_ram_map.virt);
-+ uclinux_ram_map.virt = NULL;
- }
- }
-
--/****************************************************************************/
--
- module_init(uclinux_mtd_init);
- module_exit(uclinux_mtd_cleanup);
-
- MODULE_LICENSE("GPL");
- MODULE_AUTHOR("Greg Ungerer <gerg@snapgear.com>");
- MODULE_DESCRIPTION("Generic RAM based MTD for uClinux");
--
--/****************************************************************************/
diff --git a/patches/linux-3.6/0010-mtd-maps-uclinux-add-support-for-romfs-in-RAM-or-ROM.patch b/patches/linux-3.6/0010-mtd-maps-uclinux-add-support-for-romfs-in-RAM-or-ROM.patch
deleted file mode 100644
index b32ef23..0000000
--- a/patches/linux-3.6/0010-mtd-maps-uclinux-add-support-for-romfs-in-RAM-or-ROM.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-From: Marc Kleine-Budde <mkl@pengutronix.de>
-Date: Mon, 7 Nov 2011 11:01:32 +0100
-Subject: [PATCH] mtd/maps: uclinux: add support for romfs in RAM or ROM
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-based on patch from uClinux_on_stm32
-
-Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
----
- drivers/mtd/maps/Kconfig | 33 ++++++++++++++++++++++++-
- drivers/mtd/maps/uclinux.c | 58 +++++++++++++++++++++++++++++---------------
- 2 files changed, 71 insertions(+), 20 deletions(-)
-
-diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
-index 5ba2458..27d22f5 100644
---- a/drivers/mtd/maps/Kconfig
-+++ b/drivers/mtd/maps/Kconfig
-@@ -443,10 +443,41 @@ config MTD_GPIO_ADDR
-
- config MTD_UCLINUX
- bool "Generic uClinux RAM/ROM filesystem support"
-- depends on MTD_RAM=y && !MMU
-+ depends on (MTD_RAM=y || MTD_ROM=y) && !MMU
- help
- Map driver to support image based filesystems for uClinux.
-
-+if MTD_UCLINUX
-+
-+config MTD_UCLINUX_EBSS
-+ bool "uClinux RAM/ROM filesystem is located at ebss"
-+ default y
-+ help
-+ The filesystem is located directly after the kernel in memory.
-+
-+config MTD_UCLINUX_ADDRESS
-+ hex "uClinux RAM/ROM filesystem address"
-+ default 0x1400000
-+ depends on !MTD_UCLINUX_EBSS
-+ help
-+ The filesystem is located at the given address.
-+
-+choice
-+ prompt "uClinux RAM/ROM is located in ROM/RAM"
-+ depends on !MTD_UCLINUX_EBSS
-+
-+config MTD_UCLINUX_RAM
-+ bool "RAM"
-+ depends on MTD_RAM
-+
-+config MTD_UCLINUX_ROM
-+ bool "ROM"
-+ depends on MTD_ROM
-+
-+endchoice
-+
-+endif
-+
- config MTD_WRSBC8260
- tristate "Map driver for WindRiver PowerQUICC II MPC82xx board"
- depends on (SBC82xx || SBC8560)
-diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c
-index 3e39318..b287cfc 100644
---- a/drivers/mtd/maps/uclinux.c
-+++ b/drivers/mtd/maps/uclinux.c
-@@ -18,22 +18,36 @@
- #include <linux/fs.h>
- #include <linux/mm.h>
- #include <linux/major.h>
-+#include <linux/root_dev.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/map.h>
- #include <linux/mtd/partitions.h>
- #include <linux/io.h>
- #include <asm/sections.h>
-
--static struct map_info uclinux_ram_map = {
-- .name = "RAM",
-- .phys = (resource_size_t)__bss_stop,
-+#ifdef CONFIG_MTD_UCLINUX_EBSS
-+#define MAP_TYPE "map_ram"
-+#define MAP_NAME "RAM"
-+#define CONFIG_MTD_UCLINUX_ADDRESS __bss_stop
-+#elif defined CONFIG_MTD_UCLINUX_RAM
-+#define MAP_TYPE "map_ram"
-+#define MAP_NAME "RAM"
-+#elif defined CONFIG_MTD_UCLINUX_ROM
-+#define MAP_TYPE "map_rom"
-+#define MAP_NAME "ROM"
-+#else
-+#error "Unknown uClinux map type"
-+#endif
-+
-+static struct map_info uclinux_map = {
-+ .name = MAP_NAME,
- .bankwidth = 4,
- };
-
--static struct mtd_info *uclinux_ram_mtdinfo;
-+static struct mtd_info *uclinux_mtdinfo;
-
--static struct mtd_partition uclinux_romfs[] = {
-- { .name = "ROMfs" }
-+static struct mtd_partition uclinux_fs[] = {
-+ { .name = MAP_NAME }
- };
-
- static int uclinux_point(struct mtd_info *mtd, loff_t from, size_t len,
-@@ -50,14 +64,16 @@ static int uclinux_point(struct mtd_info *mtd, loff_t from, size_t len,
- static int __init uclinux_mtd_init(void)
- {
- struct mtd_info *mtd;
-- struct map_info *mapp = &uclinux_ram_map;
-+ struct map_info *mapp = &uclinux_map;
-
-+ if (!mapp->phys)
-+ mapp->phys = (resource_size_t)CONFIG_MTD_UCLINUX_ADDRESS;
- if (!mapp->size)
- mapp->size =
- PAGE_ALIGN(be32_to_cpup((__be32 *)(mapp->phys + 8)));
-
-- pr_info("RAM probe address=0x%x size=0x%x\n",
-- (int) mapp->phys, (int) mapp->size);
-+ pr_info("%s probe address=0x%x size=0x%x\n",
-+ MAP_TYPE, (int)mapp->phys, (int)mapp->size);
-
- mapp->virt = ioremap_nocache(mapp->phys, mapp->size);
- if (!mapp->virt) {
-@@ -67,7 +83,7 @@ static int __init uclinux_mtd_init(void)
-
- simple_map_init(mapp);
-
-- mtd = do_map_probe("map_ram", mapp);
-+ mtd = do_map_probe(MAP_TYPE, mapp);
- if (!mtd) {
- pr_err("failed to find a mapping?\n");
- iounmap(mapp->virt);
-@@ -78,22 +94,26 @@ static int __init uclinux_mtd_init(void)
- mtd->_point = uclinux_point;
- mtd->priv = mapp;
-
-- uclinux_ram_mtdinfo = mtd;
-- mtd_device_register(mtd, uclinux_romfs, ARRAY_SIZE(uclinux_romfs));
-+ uclinux_mtdinfo = mtd;
-+ mtd_device_register(mtd, uclinux_fs, ARRAY_SIZE(uclinux_fs));
-+
-+ pr_info("set %s to be root filesystem\n",
-+ uclinux_fs[0].name);
-+ ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, 0);
-
- return 0;
- }
-
- static void __exit uclinux_mtd_cleanup(void)
- {
-- if (uclinux_ram_mtdinfo) {
-- mtd_device_unregister(uclinux_ram_mtdinfo);
-- map_destroy(uclinux_ram_mtdinfo);
-- uclinux_ram_mtdinfo = NULL;
-+ if (uclinux_mtdinfo) {
-+ mtd_device_unregister(uclinux_mtdinfo);
-+ map_destroy(uclinux_mtdinfo);
-+ uclinux_mtdinfo = NULL;
- }
-- if (uclinux_ram_map.virt) {
-- iounmap(uclinux_ram_map.virt);
-- uclinux_ram_map.virt = NULL;
-+ if (uclinux_map.virt) {
-+ iounmap(uclinux_map.virt);
-+ uclinux_map.virt = NULL;
- }
- }
-
diff --git a/patches/linux-3.6/series b/patches/linux-3.6/series
deleted file mode 100644
index 4e1cd15..0000000
--- a/patches/linux-3.6/series
+++ /dev/null
@@ -1,22 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-0001-hwmon-efm32-adc-new-driver.patch
-0002-spi-new-controller-driver-for-efm32-SoCs.patch
-0003-ARM-make-cr_alignment-read-only-ifndef-CONFIG_CPU_CP.patch
-0004-Cortex-M3-Add-base-support-for-Cortex-M3.patch
-0005-Cortex-M3-Add-support-for-exception-handling.patch
-0006-Cortex-M3-Add-NVIC-support.patch
-0007-Cortex-M3-Allow-the-building-of-Cortex-M3-kernel-por.patch
-0008-HACK-ARM-no-we-don-t-enter-in-ARM.patch
-0009-mtd-maps-uclinux-fix-sparse-warnings-and-codingstyle.patch
-0010-mtd-maps-uclinux-add-support-for-romfs-in-RAM-or-ROM.patch
-0011-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch
-0012-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch
-0013-pinctrl-add-a-driver-for-Energy-Micro-s-efm32-SoCs.patch
-0014-HACK-ARM-allow-a-bootloader-to-be-embedded-and-do-it.patch
-0015-HACK-don-t-reserve-memory-for-device-tree-if-it-s-be.patch
-0016-HACK-make-stack-dumps-provoked-by-BUG-a-bit-more-hel.patch
-0017-ARM-v7m-add-trivial-suspend-support.patch
-0018-ARM-efm32-add-trivial-suspend-support.patch
-0019-HACK-ARM-increase-TASK_SIZE-for-MMU.patch
-# 30205d7ea89c4c1756e0e2ef96a6e220 - git-ptx-patches magic
diff --git a/patches/linux-3.6/0003-ARM-make-cr_alignment-read-only-ifndef-CONFIG_CPU_CP.patch b/patches/linux-3.8-rc5/0001-ARM-make-cr_alignment-read-only-ifndef-CONFIG_CPU_CP.patch
index 33f3731..a6d86ce 100644
--- a/patches/linux-3.6/0003-ARM-make-cr_alignment-read-only-ifndef-CONFIG_CPU_CP.patch
+++ b/patches/linux-3.8-rc5/0001-ARM-make-cr_alignment-read-only-ifndef-CONFIG_CPU_CP.patch
@@ -11,16 +11,16 @@ CONFIG_CPU_CP15 isn't defined. For code that is only reading the value 0
is more or less a fine value to report.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-Forwarded: id:1333573807-23709-1-git-send-email-u.kleine-koenig@pengutronix.de
+Message-Id: 1358413196-5609-2-git-send-email-u.kleine-koenig@pengutronix.de (v8)
---
- arch/arm/include/asm/cp15.h | 11 ++++++++++-
+ arch/arm/include/asm/cp15.h | 16 +++++++++++++++-
arch/arm/kernel/head-common.S | 9 +++++++--
arch/arm/mm/alignment.c | 2 ++
arch/arm/mm/mmu.c | 17 +++++++++++++++++
- 4 files changed, 36 insertions(+), 3 deletions(-)
+ 4 files changed, 41 insertions(+), 3 deletions(-)
diff --git a/arch/arm/include/asm/cp15.h b/arch/arm/include/asm/cp15.h
-index 5ef4d80..d814435 100644
+index 5ef4d80..1f3262e 100644
--- a/arch/arm/include/asm/cp15.h
+++ b/arch/arm/include/asm/cp15.h
@@ -42,6 +42,8 @@
@@ -32,13 +32,18 @@ index 5ef4d80..d814435 100644
extern unsigned long cr_no_alignment; /* defined in entry-armv.S */
extern unsigned long cr_alignment; /* defined in entry-armv.S */
-@@ -82,6 +84,13 @@ static inline void set_copro_access(unsigned int val)
+@@ -82,6 +84,18 @@ static inline void set_copro_access(unsigned int val)
isb();
}
-#endif
+#else /* ifdef CONFIG_CPU_CP15 */
+
++/*
++ * cr_alignment and cr_no_alignment are tightly coupled to cp15 (at least in the
++ * minds of the developers). Yielding 0 for machines without a cp15 (and making
++ * it read-only) is fine for most cases and saves quite some #ifdeffery.
++ */
+#define cr_no_alignment UL(0)
+#define cr_alignment UL(0)
+
@@ -48,7 +53,7 @@ index 5ef4d80..d814435 100644
#endif
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
-index 854bd22..2f560c5 100644
+index 854bd22..5b391a6 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -98,8 +98,9 @@ __mmap_switched:
@@ -70,16 +75,16 @@ index 854bd22..2f560c5 100644
+#ifdef CONFIG_CPU_CP15
.long cr_alignment @ r7
+#else
-+ .long 0
++ .long 0 @ r7
+#endif
.long init_thread_union + THREAD_START_SP @ sp
.size __mmap_switched_data, . - __mmap_switched_data
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
-index 9107231..7df07d1 100644
+index b820eda..feeb3ea 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
-@@ -962,12 +962,14 @@ static int __init alignment_init(void)
+@@ -964,12 +964,14 @@ static int __init alignment_init(void)
return -ENOMEM;
#endif
@@ -95,10 +100,10 @@ index 9107231..7df07d1 100644
hook_fault_code(FAULT_CODE_ALIGNMENT, do_alignment, SIGBUS, BUS_ADRALN,
"alignment exception");
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
-index c2fa21d..07d19a6 100644
+index ce328c7..7c347bc 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
-@@ -96,6 +96,7 @@ static struct cachepolicy cache_policies[] __initdata = {
+@@ -97,6 +97,7 @@ static struct cachepolicy cache_policies[] __initdata = {
}
};
@@ -106,11 +111,11 @@ index c2fa21d..07d19a6 100644
/*
* These are useful for identifying cache coherency
* problems by allowing the cache or the cache and
-@@ -194,6 +195,22 @@ void adjust_cr(unsigned long mask, unsigned long set)
+@@ -195,6 +196,22 @@ void adjust_cr(unsigned long mask, unsigned long set)
}
#endif
-+#else
++#else /* ifdef CONFIG_CPU_CP15 */
+
+static int __init early_cachepolicy(char *p)
+{
@@ -124,7 +129,7 @@ index c2fa21d..07d19a6 100644
+}
+__setup("noalign", noalign_setup);
+
-+#endif
++#endif /* ifdef CONFIG_CPU_CP15 / else */
+
#define PROT_PTE_DEVICE L_PTE_PRESENT|L_PTE_YOUNG|L_PTE_DIRTY|L_PTE_XN
#define PROT_SECT_DEVICE PMD_TYPE_SECT|PMD_SECT_AP_WRITE
diff --git a/patches/linux-3.8-rc5/0002-ARM-let-CPUs-not-being-able-to-run-in-ARM-mode-enter.patch b/patches/linux-3.8-rc5/0002-ARM-let-CPUs-not-being-able-to-run-in-ARM-mode-enter.patch
new file mode 100644
index 0000000..67fc0d9
--- /dev/null
+++ b/patches/linux-3.8-rc5/0002-ARM-let-CPUs-not-being-able-to-run-in-ARM-mode-enter.patch
@@ -0,0 +1,90 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Fri, 9 Dec 2011 20:52:10 +0100
+Subject: [PATCH] ARM: let CPUs not being able to run in ARM mode enter in
+ THUMB mode
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Some ARM cores are not capable to run in ARM mode (e.g. Cortex-M3). So
+obviously these cannot enter the kernel in ARM mode. Make an exception
+for them and let them enter in THUMB mode.
+
+Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Message-Id: 1358162123-30113-1-git-send-email-u.kleine-koenig@pengutronix.de
+Acked-by: Nicolas Pitre <nico@linaro.org>
+---
+ arch/arm/Kconfig | 3 ++-
+ arch/arm/kernel/head-nommu.S | 8 +++++++-
+ arch/arm/mm/Kconfig | 9 ++++++++-
+ 3 files changed, 17 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 67874b8..e04c779 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -1656,8 +1656,9 @@ config HZ
+ default 100
+
+ config THUMB2_KERNEL
+- bool "Compile the kernel in Thumb-2 mode"
++ bool "Compile the kernel in Thumb-2 mode" if !CPU_THUMBONLY
+ depends on CPU_V7 && !CPU_V6 && !CPU_V6K
++ default y if CPU_THUMBONLY
+ select AEABI
+ select ARM_ASM_UNIFIED
+ select ARM_UNWIND
+diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
+index 2c228a0..6a2e09c 100644
+--- a/arch/arm/kernel/head-nommu.S
++++ b/arch/arm/kernel/head-nommu.S
+@@ -32,15 +32,21 @@
+ * numbers for r1.
+ *
+ */
+- .arm
+
+ __HEAD
++
++#ifdef CONFIG_CPU_THUMBONLY
++ .thumb
++ENTRY(stext)
++#else
++ .arm
+ ENTRY(stext)
+
+ THUMB( adr r9, BSYM(1f) ) @ Kernel is always entered in ARM.
+ THUMB( bx r9 ) @ If this is a Thumb-2 kernel,
+ THUMB( .thumb ) @ switch to Thumb now.
+ THUMB(1: )
++#endif
+
+ setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, r9 @ ensure svc mode
+ @ and irqs disabled
+diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
+index 3fd629d..8defd63 100644
+--- a/arch/arm/mm/Kconfig
++++ b/arch/arm/mm/Kconfig
+@@ -397,6 +397,13 @@ config CPU_V7
+ select CPU_PABRT_V7
+ select CPU_TLB_V7 if MMU
+
++config CPU_THUMBONLY
++ bool
++ # There are no CPUs available with MMU that don't implement an ARM ISA:
++ depends on !MMU
++ help
++ Select this if your CPU doesn't support the 32 bit ARM instructions.
++
+ # Figure out what processor architecture version we should be using.
+ # This defines the compiler instruction set which depends on the machine type.
+ config CPU_32v3
+@@ -608,7 +615,7 @@ config ARCH_DMA_ADDR_T_64BIT
+ bool
+
+ config ARM_THUMB
+- bool "Support Thumb user binaries"
++ bool "Support Thumb user binaries" if !CPU_THUMBONLY
+ depends on CPU_ARM720T || CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_V6 || CPU_V6K || CPU_V7 || CPU_FEROCEON
+ default y
+ help
diff --git a/patches/linux-3.8-rc5/0003-ARM-sync-comments-about-available-data-abort-models-.patch b/patches/linux-3.8-rc5/0003-ARM-sync-comments-about-available-data-abort-models-.patch
new file mode 100644
index 0000000..0d141a6
--- /dev/null
+++ b/patches/linux-3.8-rc5/0003-ARM-sync-comments-about-available-data-abort-models-.patch
@@ -0,0 +1,83 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Wed, 30 Jan 2013 12:07:14 +0100
+Subject: [PATCH] ARM: sync comments about available data abort models with
+ the code
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+While at it bring both in the same increasing order.
+
+Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Message-Id: 1359544151-26744-1-git-send-email-u.kleine-koenig@pengutronix.de
+---
+ arch/arm/include/asm/glue-df.h | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/arch/arm/include/asm/glue-df.h b/arch/arm/include/asm/glue-df.h
+index 8cacbcd..b6e9f2c 100644
+--- a/arch/arm/include/asm/glue-df.h
++++ b/arch/arm/include/asm/glue-df.h
+@@ -18,12 +18,12 @@
+ * ================
+ *
+ * We have the following to choose from:
+- * arm6 - ARM6 style
+ * arm7 - ARM7 style
+ * v4_early - ARMv4 without Thumb early abort handler
+ * v4t_late - ARMv4 with Thumb late abort handler
+ * v4t_early - ARMv4 with Thumb early abort handler
+- * v5tej_early - ARMv5 with Thumb and Java early abort handler
++ * v5t_early - ARMv5 with Thumb early abort handler
++ * v5tj_early - ARMv5 with Thumb and Java early abort handler
+ * xscale - ARMv5 with Thumb with Xscale extensions
+ * v6_early - ARMv6 generic early abort handler
+ * v7_early - ARMv7 generic early abort handler
+@@ -39,19 +39,19 @@
+ # endif
+ #endif
+
+-#ifdef CONFIG_CPU_ABRT_LV4T
++#ifdef CONFIG_CPU_ABRT_EV4
+ # ifdef CPU_DABORT_HANDLER
+ # define MULTI_DABORT 1
+ # else
+-# define CPU_DABORT_HANDLER v4t_late_abort
++# define CPU_DABORT_HANDLER v4_early_abort
+ # endif
+ #endif
+
+-#ifdef CONFIG_CPU_ABRT_EV4
++#ifdef CONFIG_CPU_ABRT_LV4T
+ # ifdef CPU_DABORT_HANDLER
+ # define MULTI_DABORT 1
+ # else
+-# define CPU_DABORT_HANDLER v4_early_abort
++# define CPU_DABORT_HANDLER v4t_late_abort
+ # endif
+ #endif
+
+@@ -63,19 +63,19 @@
+ # endif
+ #endif
+
+-#ifdef CONFIG_CPU_ABRT_EV5TJ
++#ifdef CONFIG_CPU_ABRT_EV5T
+ # ifdef CPU_DABORT_HANDLER
+ # define MULTI_DABORT 1
+ # else
+-# define CPU_DABORT_HANDLER v5tj_early_abort
++# define CPU_DABORT_HANDLER v5t_early_abort
+ # endif
+ #endif
+
+-#ifdef CONFIG_CPU_ABRT_EV5T
++#ifdef CONFIG_CPU_ABRT_EV5TJ
+ # ifdef CPU_DABORT_HANDLER
+ # define MULTI_DABORT 1
+ # else
+-# define CPU_DABORT_HANDLER v5t_early_abort
++# define CPU_DABORT_HANDLER v5tj_early_abort
+ # endif
+ #endif
+
diff --git a/patches/linux-3.8-rc5/0004-ARM-use-read_cpuid_id-instead-of-read_cpuid-CPUID_ID.patch b/patches/linux-3.8-rc5/0004-ARM-use-read_cpuid_id-instead-of-read_cpuid-CPUID_ID.patch
new file mode 100644
index 0000000..c10f38b
--- /dev/null
+++ b/patches/linux-3.8-rc5/0004-ARM-use-read_cpuid_id-instead-of-read_cpuid-CPUID_ID.patch
@@ -0,0 +1,86 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Wed, 30 Jan 2013 17:38:21 +0100
+Subject: [PATCH] ARM: use read_cpuid_id() instead of read_cpuid(CPUID_ID)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Both calls are identical currently. This patch prepares to deprecate
+read_cpuid on machines without cp15.
+
+Also move an unconditional usage of read_cpuid_cachetype to a more local
+scope as read_cpuid_cachetype uses read_cpuid, too.
+
+Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Message-Id: 1359646587-1788-1-git-send-email-u.kleine-koenig@pengutronix.de
+---
+ arch/arm/kernel/setup.c | 2 +-
+ arch/arm/kernel/smp_scu.c | 2 +-
+ arch/arm/mach-omap2/id.c | 4 ++--
+ arch/arm/mach-omap2/omap-smp.c | 2 +-
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
+index 3f6cbb2..1cc9e17 100644
+--- a/arch/arm/kernel/setup.c
++++ b/arch/arm/kernel/setup.c
+@@ -291,10 +291,10 @@ static int cpu_has_aliasing_icache(unsigned int arch)
+
+ static void __init cacheid_init(void)
+ {
+- unsigned int cachetype = read_cpuid_cachetype();
+ unsigned int arch = cpu_architecture();
+
+ if (arch >= CPU_ARCH_ARMv6) {
++ unsigned int cachetype = read_cpuid_cachetype();
+ if ((cachetype & (7 << 29)) == 4 << 29) {
+ /* ARMv7 register format */
+ arch = CPU_ARCH_ARMv7;
+diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c
+index b9f015e..743a3bf 100644
+--- a/arch/arm/kernel/smp_scu.c
++++ b/arch/arm/kernel/smp_scu.c
+@@ -41,7 +41,7 @@ void scu_enable(void __iomem *scu_base)
+
+ #ifdef CONFIG_ARM_ERRATA_764369
+ /* Cortex-A9 only */
+- if ((read_cpuid(CPUID_ID) & 0xff0ffff0) == 0x410fc090) {
++ if ((read_cpuid_id() & 0xff0ffff0) == 0x410fc090) {
+ scu_ctrl = __raw_readl(scu_base + 0x30);
+ if (!(scu_ctrl & 1))
+ __raw_writel(scu_ctrl | 0x1, scu_base + 0x30);
+diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
+index 45cc7ed4..1377c36 100644
+--- a/arch/arm/mach-omap2/id.c
++++ b/arch/arm/mach-omap2/id.c
+@@ -300,7 +300,7 @@ void __init omap3xxx_check_revision(void)
+ * If the processor type is Cortex-A8 and the revision is 0x0
+ * it means its Cortex r0p0 which is 3430 ES1.0.
+ */
+- cpuid = read_cpuid(CPUID_ID);
++ cpuid = read_cpuid_id();
+ if ((((cpuid >> 4) & 0xfff) == 0xc08) && ((cpuid & 0xf) == 0x0)) {
+ omap_revision = OMAP3430_REV_ES1_0;
+ cpu_rev = "1.0";
+@@ -450,7 +450,7 @@ void __init omap4xxx_check_revision(void)
+ * Use ARM register to detect the correct ES version
+ */
+ if (!rev && (hawkeye != 0xb94e) && (hawkeye != 0xb975)) {
+- idcode = read_cpuid(CPUID_ID);
++ idcode = read_cpuid_id();
+ rev = (idcode & 0xf) - 1;
+ }
+
+diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
+index cd42d92..707098e 100644
+--- a/arch/arm/mach-omap2/omap-smp.c
++++ b/arch/arm/mach-omap2/omap-smp.c
+@@ -209,7 +209,7 @@ static void __init omap4_smp_init_cpus(void)
+ unsigned int i = 0, ncores = 1, cpu_id;
+
+ /* Use ARM cpuid check here, as SoC detection will not work so early */
+- cpu_id = read_cpuid(CPUID_ID) & CPU_MASK;
++ cpu_id = read_cpuid_id() & CPU_MASK;
+ if (cpu_id == CPU_CORTEX_A9) {
+ /*
+ * Currently we can't call ioremap here because
diff --git a/patches/linux-3.8-rc5/0005-ARM-stub-out-read_cpuid-and-read_cpuid_ext-for-CPU_C.patch b/patches/linux-3.8-rc5/0005-ARM-stub-out-read_cpuid-and-read_cpuid_ext-for-CPU_C.patch
new file mode 100644
index 0000000..5bd8b21
--- /dev/null
+++ b/patches/linux-3.8-rc5/0005-ARM-stub-out-read_cpuid-and-read_cpuid_ext-for-CPU_C.patch
@@ -0,0 +1,79 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Thu, 31 Jan 2013 11:08:03 +0100
+Subject: [PATCH] ARM: stub out read_cpuid and read_cpuid_ext for CPU_CP15=n
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Traditionally for !CPU_CP15 read_cpuid and read_cpuid_ext returned the
+processor id independent of the parameter passed in. This is wrong of
+course but theoretically this doesn't harm because it's only called on
+machines having a cp15.
+
+Instead return 0 unconditionally which might make unused code paths be
+better optimizable and so smaller and warn about unexpected usage.
+
+Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Message-Id: 1359646587-1788-2-git-send-email-u.kleine-koenig@pengutronix.de
+---
+ arch/arm/include/asm/cputype.h | 31 +++++++++++++++++++++++++++----
+ 1 file changed, 27 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
+index a59dcb5..574269e 100644
+--- a/arch/arm/include/asm/cputype.h
++++ b/arch/arm/include/asm/cputype.h
+@@ -50,6 +50,7 @@ extern unsigned int processor_id;
+ : "cc"); \
+ __val; \
+ })
++
+ #define read_cpuid_ext(ext_reg) \
+ ({ \
+ unsigned int __val; \
+@@ -59,12 +60,25 @@ extern unsigned int processor_id;
+ : "cc"); \
+ __val; \
+ })
+-#else
+-#define read_cpuid(reg) (processor_id)
+-#define read_cpuid_ext(reg) 0
+-#endif
++
++#else /* ifdef CONFIG_CPU_CP15 */
+
+ /*
++ * read_cpuid and read_cpuid_ext should only ever be called on machines that
++ * have cp15 so warn on other usages.
++ */
++#define read_cpuid(reg) \
++ ({ \
++ WARN_ON_ONCE(1); \
++ 0; \
++ })
++
++#define read_cpuid_ext(reg) read_cpuid(reg)
++
++#endif /* ifdef CONFIG_CPU_CP15 / else */
++
++#ifdef CONFIG_CPU_CP15
++/*
+ * The CPU ID never changes at run time, so we might as well tell the
+ * compiler that it's constant. Use this function to read the CPU ID
+ * rather than directly reading processor_id or read_cpuid() directly.
+@@ -74,6 +88,15 @@ static inline unsigned int __attribute_const__ read_cpuid_id(void)
+ return read_cpuid(CPUID_ID);
+ }
+
++#else /* ifdef CONFIG_CPU_CP15 */
++
++static inline unsigned int __attribute_const__ read_cpuid_id(void)
++{
++ return processor_id;
++}
++
++#endif /* ifdef CONFIG_CPU_CP15 / else */
++
+ static inline unsigned int __attribute_const__ read_cpuid_cachetype(void)
+ {
+ return read_cpuid(CPUID_CACHETYPE);
diff --git a/patches/linux-3.8-rc5/0006-mtd-uclinux-support-ROM-and-allow-passing-the-base-a.patch b/patches/linux-3.8-rc5/0006-mtd-uclinux-support-ROM-and-allow-passing-the-base-a.patch
new file mode 100644
index 0000000..06e5e8c
--- /dev/null
+++ b/patches/linux-3.8-rc5/0006-mtd-uclinux-support-ROM-and-allow-passing-the-base-a.patch
@@ -0,0 +1,99 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Mon, 8 Oct 2012 17:05:40 +0200
+Subject: [PATCH] mtd/uclinux: support ROM and allow passing the base address
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This allows to put the filesystem at a defined address in ROM allowing
+to save more precious RAM.
+
+I think it's safe to default to ROM because the intention of using the
+uclinux map is to use a romfs and so mtd-ram doesn't give you anything
+that mtd-rom doesn't.
+
+Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Acked-by: Greg Ungerer <gerg@uclinux.org>
+Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+Applied-Upstream: next-20130128, commit:e30db13c97b61d7c3cb21e8009a8e18f2878a201
+---
+ drivers/mtd/maps/Kconfig | 2 +-
+ drivers/mtd/maps/uclinux.c | 24 +++++++++++++++++++-----
+ 2 files changed, 20 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
+index 62ba82c..3ed17c4 100644
+--- a/drivers/mtd/maps/Kconfig
++++ b/drivers/mtd/maps/Kconfig
+@@ -429,7 +429,7 @@ config MTD_GPIO_ADDR
+
+ config MTD_UCLINUX
+ bool "Generic uClinux RAM/ROM filesystem support"
+- depends on MTD_RAM=y && (!MMU || COLDFIRE)
++ depends on (MTD_RAM=y || MTD_ROM=y) && (!MMU || COLDFIRE)
+ help
+ Map driver to support image based filesystems for uClinux.
+
+diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c
+index 299bf88..f56d0aa 100644
+--- a/drivers/mtd/maps/uclinux.c
++++ b/drivers/mtd/maps/uclinux.c
+@@ -23,12 +23,20 @@
+
+ /****************************************************************************/
+
++#ifdef CONFIG_MTD_ROM
++#define MAP_NAME "rom"
++#else
++#define MAP_NAME "ram"
++#endif
++
+ struct map_info uclinux_ram_map = {
+- .name = "RAM",
+- .phys = (unsigned long)__bss_stop,
++ .name = MAP_NAME,
+ .size = 0,
+ };
+
++static unsigned long physaddr = -1;
++module_param(physaddr, ulong, S_IRUGO);
++
+ static struct mtd_info *uclinux_ram_mtdinfo;
+
+ /****************************************************************************/
+@@ -60,11 +68,17 @@ static int __init uclinux_mtd_init(void)
+ struct map_info *mapp;
+
+ mapp = &uclinux_ram_map;
++
++ if (physaddr == -1)
++ mapp->phys = (resource_size_t)__bss_stop;
++ else
++ mapp->phys = physaddr;
++
+ if (!mapp->size)
+ mapp->size = PAGE_ALIGN(ntohl(*((unsigned long *)(mapp->phys + 8))));
+ mapp->bankwidth = 4;
+
+- printk("uclinux[mtd]: RAM probe address=0x%x size=0x%x\n",
++ printk("uclinux[mtd]: probe address=0x%x size=0x%x\n",
+ (int) mapp->phys, (int) mapp->size);
+
+ /*
+@@ -82,7 +96,7 @@ static int __init uclinux_mtd_init(void)
+
+ simple_map_init(mapp);
+
+- mtd = do_map_probe("map_ram", mapp);
++ mtd = do_map_probe("map_" MAP_NAME, mapp);
+ if (!mtd) {
+ printk("uclinux[mtd]: failed to find a mapping?\n");
+ return(-ENXIO);
+@@ -118,6 +132,6 @@ module_exit(uclinux_mtd_cleanup);
+
+ MODULE_LICENSE("GPL");
+ MODULE_AUTHOR("Greg Ungerer <gerg@snapgear.com>");
+-MODULE_DESCRIPTION("Generic RAM based MTD for uClinux");
++MODULE_DESCRIPTION("Generic MTD for uClinux");
+
+ /****************************************************************************/
diff --git a/patches/linux-3.8-rc5/0007-mtd-uclinux-add-a-comment-about-why-uclinux_ram_map-.patch b/patches/linux-3.8-rc5/0007-mtd-uclinux-add-a-comment-about-why-uclinux_ram_map-.patch
new file mode 100644
index 0000000..8d6b3ed
--- /dev/null
+++ b/patches/linux-3.8-rc5/0007-mtd-uclinux-add-a-comment-about-why-uclinux_ram_map-.patch
@@ -0,0 +1,38 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Fri, 12 Oct 2012 09:34:29 +0200
+Subject: [PATCH] mtd/uclinux: add a comment about why uclinux_ram_map must
+ not be static
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+I was (at least) the second person trying to fix a warning by sparse, so
+document in the code why this is a bad idea and add an extern declaration to
+make sparse happy.
+
+Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Acked-by: Mike Frysinger <vapier@gentoo.org>
+Acked-by: Greg Ungerer <gerg@uclinux.org>
+Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
+Applied-Upstream: next-20130128, commit:526a84dc58fc8bf6bca9a5c722cc06ae9d1a6313
+---
+ drivers/mtd/maps/uclinux.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c
+index f56d0aa..c1af83d 100644
+--- a/drivers/mtd/maps/uclinux.c
++++ b/drivers/mtd/maps/uclinux.c
+@@ -29,6 +29,12 @@
+ #define MAP_NAME "ram"
+ #endif
+
++/*
++ * Blackfin uses uclinux_ram_map during startup, so it must not be static.
++ * Provide a dummy declaration to make sparse happy.
++ */
++extern struct map_info uclinux_ram_map;
++
+ struct map_info uclinux_ram_map = {
+ .name = MAP_NAME,
+ .size = 0,
diff --git a/patches/linux-3.8-rc5/0008-serial-efm32-parse-location-property.patch b/patches/linux-3.8-rc5/0008-serial-efm32-parse-location-property.patch
new file mode 100644
index 0000000..76bf1c1
--- /dev/null
+++ b/patches/linux-3.8-rc5/0008-serial-efm32-parse-location-property.patch
@@ -0,0 +1,119 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Mon, 21 Jan 2013 14:04:47 +0100
+Subject: [PATCH] serial/efm32: parse location property
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The non-dt probing allowed passing the location via platform data from
+the beginning. So make up leeway for device tree probing.
+
+Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Applied-Upstream: next-20130128, commit:c098020d0368ded1c6ba8d7b612feffe067509a6
+---
+ .../devicetree/bindings/tty/serial/efm32-uart.txt | 6 ++++
+ drivers/tty/serial/efm32-uart.c | 31 +++++++++++++++-----
+ 2 files changed, 30 insertions(+), 7 deletions(-)
+
+diff --git a/Documentation/devicetree/bindings/tty/serial/efm32-uart.txt b/Documentation/devicetree/bindings/tty/serial/efm32-uart.txt
+index 6588b69..8e080b8 100644
+--- a/Documentation/devicetree/bindings/tty/serial/efm32-uart.txt
++++ b/Documentation/devicetree/bindings/tty/serial/efm32-uart.txt
+@@ -5,10 +5,16 @@ Required properties:
+ - reg : Address and length of the register set
+ - interrupts : Should contain uart interrupt
+
++Optional properties:
++- location : Decides the location of the USART I/O pins.
++ Allowed range : [0 .. 5]
++ Default: 0
++
+ Example:
+
+ uart@0x4000c400 {
+ compatible = "efm32,uart";
+ reg = <0x4000c400 0x400>;
+ interrupts = <15>;
++ location = <0>;
+ };
+diff --git a/drivers/tty/serial/efm32-uart.c b/drivers/tty/serial/efm32-uart.c
+index a8cbb26..67ff23b 100644
+--- a/drivers/tty/serial/efm32-uart.c
++++ b/drivers/tty/serial/efm32-uart.c
+@@ -81,6 +81,7 @@ struct efm32_uart_port {
+ struct uart_port port;
+ unsigned int txirq;
+ struct clk *clk;
++ struct efm32_uart_pdata pdata;
+ };
+ #define to_efm_port(_port) container_of(_port, struct efm32_uart_port, port)
+ #define efm_debug(efm_port, format, arg...) \
+@@ -300,13 +301,8 @@ static irqreturn_t efm32_uart_txirq(int irq, void *data)
+ static int efm32_uart_startup(struct uart_port *port)
+ {
+ struct efm32_uart_port *efm_port = to_efm_port(port);
+- u32 location = 0;
+- struct efm32_uart_pdata *pdata = dev_get_platdata(port->dev);
+ int ret;
+
+- if (pdata)
+- location = UARTn_ROUTE_LOCATION(pdata->location);
+-
+ ret = clk_enable(efm_port->clk);
+ if (ret) {
+ efm_debug(efm_port, "failed to enable clk\n");
+@@ -315,7 +311,9 @@ static int efm32_uart_startup(struct uart_port *port)
+ port->uartclk = clk_get_rate(efm_port->clk);
+
+ /* Enable pins at configured location */
+- efm32_uart_write32(efm_port, location | UARTn_ROUTE_RXPEN | UARTn_ROUTE_TXPEN,
++ efm32_uart_write32(efm_port,
++ UARTn_ROUTE_LOCATION(efm_port->pdata.location) |
++ UARTn_ROUTE_RXPEN | UARTn_ROUTE_TXPEN,
+ UARTn_ROUTE);
+
+ ret = request_irq(port->irq, efm32_uart_rxirq, 0,
+@@ -674,11 +672,24 @@ static int efm32_uart_probe_dt(struct platform_device *pdev,
+ struct efm32_uart_port *efm_port)
+ {
+ struct device_node *np = pdev->dev.of_node;
++ u32 location;
+ int ret;
+
+ if (!np)
+ return 1;
+
++ ret = of_property_read_u32(np, "location", &location);
++ if (!ret) {
++ if (location > 5) {
++ dev_err(&pdev->dev, "invalid location\n");
++ return -EINVAL;
++ }
++ efm_debug(efm_port, "using location %u\n", location);
++ efm_port->pdata.location = location;
++ } else {
++ efm_debug(efm_port, "fall back to location 0\n");
++ }
++
+ ret = of_alias_get_id(np, "serial");
+ if (ret < 0) {
+ dev_err(&pdev->dev, "failed to get alias id: %d\n", ret);
+@@ -738,10 +749,16 @@ static int efm32_uart_probe(struct platform_device *pdev)
+ efm_port->port.flags = UPF_BOOT_AUTOCONF;
+
+ ret = efm32_uart_probe_dt(pdev, efm_port);
+- if (ret > 0)
++ if (ret > 0) {
+ /* not created by device tree */
++ const struct efm32_uart_pdata *pdata = dev_get_platdata(&pdev->dev);
++
+ efm_port->port.line = pdev->id;
+
++ if (pdata)
++ efm_port->pdata = *pdata;
++ }
++
+ if (efm_port->port.line >= 0 &&
+ efm_port->port.line < ARRAY_SIZE(efm32_uart_ports))
+ efm32_uart_ports[efm_port->port.line] = efm_port;
diff --git a/patches/linux-3.6/0004-Cortex-M3-Add-base-support-for-Cortex-M3.patch b/patches/linux-3.8-rc5/0009-Cortex-M3-Add-base-support-for-Cortex-M3.patch
index 0dbb461..edd02e3 100644
--- a/patches/linux-3.6/0004-Cortex-M3-Add-base-support-for-Cortex-M3.patch
+++ b/patches/linux-3.8-rc5/0009-Cortex-M3-Add-base-support-for-Cortex-M3.patch
@@ -14,41 +14,46 @@ a subsequent patch.
b5717ba (Cortex-M3: Add support for the Microcontroller Prototyping System)
-from the v2.6.33-arm1 patch stack, port to post 3.4, drop zImage
+from the v2.6.33-arm1 patch stack, port to post 3.6, drop zImage
support, drop reorganisation of pt_regs, assert CONFIG_V7M doesn't leak
into installed headers and a few cosmetic changes]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
-Changes since v4, id:1333573807-23709-2-git-send-email-u.kleine-koenig@pengutronix.de
- - simplify irq enable/disable ops as suggested by Russell
- - don't leak kernel config symbols into userspace headers and add some
- comments
+Changes since v8,
+id:1358413196-5609-3-git-send-email-u.kleine-koenig@pengutronix.de:
+
+ - rebase
+ - use more named constants
+ - add comment about setmode being empty
---
- arch/arm/include/asm/assembler.h | 13 ++-
- arch/arm/include/asm/cputype.h | 3 +
- arch/arm/include/asm/glue-cache.h | 24 ++++++
+ arch/arm/include/asm/assembler.h | 17 +++-
+ arch/arm/include/asm/cputype.h | 12 ++-
+ arch/arm/include/asm/glue-cache.h | 25 ++++++
arch/arm/include/asm/glue-df.h | 8 ++
arch/arm/include/asm/glue-proc.h | 9 ++
arch/arm/include/asm/irqflags.h | 22 +++--
arch/arm/include/asm/processor.h | 7 ++
- arch/arm/include/asm/ptrace.h | 44 ++++++++--
+ arch/arm/include/asm/ptrace.h | 8 ++
arch/arm/include/asm/system_info.h | 1 +
+ arch/arm/include/asm/v7m.h | 11 +++
+ arch/arm/include/uapi/asm/ptrace.h | 36 ++++++--
arch/arm/kernel/asm-offsets.c | 3 +
- arch/arm/kernel/head-nommu.S | 9 +-
- arch/arm/kernel/setup.c | 13 ++-
+ arch/arm/kernel/head-nommu.S | 10 ++-
+ arch/arm/kernel/setup.c | 17 +++-
arch/arm/kernel/traps.c | 2 +
arch/arm/mm/nommu.c | 2 +
- arch/arm/mm/proc-v7m.S | 161 ++++++++++++++++++++++++++++++++++++
- 15 files changed, 302 insertions(+), 19 deletions(-)
+ arch/arm/mm/proc-v7m.S | 162 ++++++++++++++++++++++++++++++++++++
+ 17 files changed, 331 insertions(+), 21 deletions(-)
+ create mode 100644 arch/arm/include/asm/v7m.h
create mode 100644 arch/arm/mm/proc-v7m.S
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
-index 5c8b3bf..6ce005b 100644
+index eb87200..ac11cbc 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
-@@ -135,7 +135,11 @@
+@@ -136,7 +136,11 @@
* assumes FIQs are enabled, and that the processor is in SVC mode.
*/
.macro save_and_disable_irqs, oldcpsr
@@ -60,7 +65,7 @@ index 5c8b3bf..6ce005b 100644
disable_irq
.endm
-@@ -149,7 +153,11 @@
+@@ -150,7 +154,11 @@
* guarantee that this will preserve the flags.
*/
.macro restore_irqs_notrace, oldcpsr
@@ -72,12 +77,16 @@ index 5c8b3bf..6ce005b 100644
.endm
.macro restore_irqs, oldcpsr
-@@ -228,7 +236,10 @@
+@@ -229,7 +237,14 @@
#endif
.endm
-#ifdef CONFIG_THUMB2_KERNEL
+#if defined(CONFIG_CPU_V7M)
++ /*
++ * setmode is used to assert to be in svc mode during boot. For v7-M
++ * this is done in __v7m_setup, so setmode can be empty here.
++ */
+ .macro setmode, mode, reg
+ .endm
+#elif defined(CONFIG_THUMB2_KERNEL)
@@ -85,25 +94,34 @@ index 5c8b3bf..6ce005b 100644
mov \reg, #\mode
msr cpsr_c, \reg
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
-index cb47d28..5bd8cb6 100644
+index 574269e..0952904 100644
--- a/arch/arm/include/asm/cputype.h
+++ b/arch/arm/include/asm/cputype.h
-@@ -46,6 +46,9 @@ extern unsigned int processor_id;
- : "cc"); \
- __val; \
- })
+@@ -88,7 +88,17 @@ static inline unsigned int __attribute_const__ read_cpuid_id(void)
+ return read_cpuid(CPUID_ID);
+ }
+
+-#else /* ifdef CONFIG_CPU_CP15 */
+#elif defined(CONFIG_CPU_V7M)
-+#define read_cpuid(reg) (*(unsigned int *)0xe000ed00)
-+#define read_cpuid_ext(reg) 0
- #else
- #define read_cpuid(reg) (processor_id)
- #define read_cpuid_ext(reg) 0
++
++#include <asm/io.h>
++#include <asm/v7m.h>
++
++static inline unsigned int __attribute_const__ read_cpuid_id(void)
++{
++ return readl(V7M_SCS_CPUID);
++}
++
++#else /* ifdef CONFIG_CPU_CP15 / elif defined(CONFIG_CPU_V7M) */
+
+ static inline unsigned int __attribute_const__ read_cpuid_id(void)
+ {
diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h
-index 7e30874..a02fd01 100644
+index cca9f15..ea98658 100644
--- a/arch/arm/include/asm/glue-cache.h
+++ b/arch/arm/include/asm/glue-cache.h
-@@ -125,10 +125,34 @@
- //# endif
+@@ -125,10 +125,35 @@
+ # endif
#endif
+#if defined(CONFIG_CPU_V7M)
@@ -121,6 +139,7 @@ index 7e30874..a02fd01 100644
+#ifndef __ASSEMBLER__
+static inline void nop_flush_icache_all(void) { }
+static inline void nop_flush_kern_cache_all(void) { }
++static inline void nop_flush_kern_cache_louis(void) { }
+static inline void nop_flush_user_cache_all(void) { }
+static inline void nop_flush_user_cache_range(unsigned long a, unsigned long b, unsigned int c) { }
+
@@ -138,7 +157,7 @@ index 7e30874..a02fd01 100644
#define __cpuc_flush_icache_all __glue(_CACHE,_flush_icache_all)
#define __cpuc_flush_kern_all __glue(_CACHE,_flush_kern_cache_all)
diff --git a/arch/arm/include/asm/glue-df.h b/arch/arm/include/asm/glue-df.h
-index 8cacbcd..1f2339c 100644
+index b6e9f2c..6b70f1b 100644
--- a/arch/arm/include/asm/glue-df.h
+++ b/arch/arm/include/asm/glue-df.h
@@ -95,6 +95,14 @@
@@ -237,7 +256,7 @@ index 1e6cca5..3b763d6 100644
+#endif /* ifdef __KERNEL__ */
+#endif /* ifndef __ASM_ARM_IRQFLAGS_H */
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h
-index 99afa74..dc82aa0 100644
+index 06e7d50..5e61b88 100644
--- a/arch/arm/include/asm/processor.h
+++ b/arch/arm/include/asm/processor.h
@@ -49,7 +49,14 @@ struct thread_struct {
@@ -256,10 +275,73 @@ index 99afa74..dc82aa0 100644
#define start_thread(regs,pc,sp) \
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h
-index 355ece5..090fea7 100644
+index 3d52ee1..67661e8 100644
--- a/arch/arm/include/asm/ptrace.h
+++ b/arch/arm/include/asm/ptrace.h
-@@ -34,27 +34,46 @@
+@@ -14,7 +14,11 @@
+
+ #ifndef __ASSEMBLY__
+ struct pt_regs {
++#ifdef CONFIG_CPU_V7M
++ unsigned long uregs[20];
++#else
+ unsigned long uregs[18];
++#endif
+ };
+
+ #define user_mode(regs) \
+@@ -45,6 +49,7 @@ struct pt_regs {
+ */
+ static inline int valid_user_regs(struct pt_regs *regs)
+ {
++#ifndef CONFIG_CPU_V7M
+ unsigned long mode = regs->ARM_cpsr & MODE_MASK;
+
+ /*
+@@ -67,6 +72,9 @@ static inline int valid_user_regs(struct pt_regs *regs)
+ regs->ARM_cpsr |= USR_MODE;
+
+ return 0;
++#else /* ifndef CONFIG_CPU_V7M */
++ return 1;
++#endif
+ }
+
+ static inline long regs_return_value(struct pt_regs *regs)
+diff --git a/arch/arm/include/asm/system_info.h b/arch/arm/include/asm/system_info.h
+index dfd386d..720ea03 100644
+--- a/arch/arm/include/asm/system_info.h
++++ b/arch/arm/include/asm/system_info.h
+@@ -11,6 +11,7 @@
+ #define CPU_ARCH_ARMv5TEJ 7
+ #define CPU_ARCH_ARMv6 8
+ #define CPU_ARCH_ARMv7 9
++#define CPU_ARCH_ARMv7M 10
+
+ #ifndef __ASSEMBLY__
+
+diff --git a/arch/arm/include/asm/v7m.h b/arch/arm/include/asm/v7m.h
+new file mode 100644
+index 0000000..350c18f
+--- /dev/null
++++ b/arch/arm/include/asm/v7m.h
+@@ -0,0 +1,11 @@
++/*
++ * Common defines for v7m cpus
++ */
++#define V7M_SCS_CPUID IOMEM(0xe000ed00)
++#define V7M_SCS_VTOR IOMEM(0xe000ed08)
++
++#define V7M_SCS_CCR IOMEM(0xe000ed14)
++#define V7M_SCS_CCR_STKALIGN (1 << 9)
++
++#define V7M_SCS_SHPR2 IOMEM(0xe000ed1c)
++#define V7M_SCS_SHPR3 IOMEM(0xe000ed20)
+diff --git a/arch/arm/include/uapi/asm/ptrace.h b/arch/arm/include/uapi/asm/ptrace.h
+index 96ee092..d3be66e 100644
+--- a/arch/arm/include/uapi/asm/ptrace.h
++++ b/arch/arm/include/uapi/asm/ptrace.h
+@@ -34,28 +34,47 @@
/*
* PSR bits
@@ -272,7 +354,7 @@ index 355ece5..090fea7 100644
+#if defined(__KERNEL__) && defined(CONFIG_CPU_V7M)
+/*
+ * Use 0 here to get code right that creates a userspace
-+ * or kernel space thread
++ * or kernel space thread.
+ */
+#define USR_MODE 0x00000000
+#define SVC_MODE 0x00000000
@@ -284,6 +366,7 @@ index 355ece5..090fea7 100644
#define IRQ_MODE 0x00000012
-#define SVC_MODE 0x00000013
#define ABT_MODE 0x00000017
+ #define HYP_MODE 0x0000001a
#define UND_MODE 0x0000001b
#define SYSTEM_MODE 0x0000001f
#define MODE32_BIT 0x00000010
@@ -314,19 +397,7 @@ index 355ece5..090fea7 100644
#define PSR_V_BIT 0x10000000
#define PSR_C_BIT 0x20000000
#define PSR_Z_BIT 0x40000000
-@@ -106,7 +125,11 @@ struct pt_regs {
- };
- #else /* __KERNEL__ */
- struct pt_regs {
-+#ifdef CONFIG_CPU_V7M
-+ unsigned long uregs[20];
-+#else
- unsigned long uregs[18];
-+#endif
- };
- #endif /* __KERNEL__ */
-
-@@ -128,6 +151,7 @@ struct pt_regs {
+@@ -125,6 +144,7 @@ struct pt_regs {
#define ARM_r1 uregs[1]
#define ARM_r0 uregs[0]
#define ARM_ORIG_r0 uregs[17]
@@ -334,41 +405,11 @@ index 355ece5..090fea7 100644
/*
* The size of the user-visible VFP state as seen by PTRACE_GET/SETVFPREGS
-@@ -165,6 +189,7 @@ struct pt_regs {
- */
- static inline int valid_user_regs(struct pt_regs *regs)
- {
-+#ifndef CONFIG_CPU_V7M
- unsigned long mode = regs->ARM_cpsr & MODE_MASK;
-
- /*
-@@ -187,6 +212,9 @@ static inline int valid_user_regs(struct pt_regs *regs)
- regs->ARM_cpsr |= USR_MODE;
-
- return 0;
-+#else /* ifndef CONFIG_CPU_V7M */
-+ return 1;
-+#endif
- }
-
- static inline long regs_return_value(struct pt_regs *regs)
-diff --git a/arch/arm/include/asm/system_info.h b/arch/arm/include/asm/system_info.h
-index dfd386d..720ea03 100644
---- a/arch/arm/include/asm/system_info.h
-+++ b/arch/arm/include/asm/system_info.h
-@@ -11,6 +11,7 @@
- #define CPU_ARCH_ARMv5TEJ 7
- #define CPU_ARCH_ARMv6 8
- #define CPU_ARCH_ARMv7 9
-+#define CPU_ARCH_ARMv7M 10
-
- #ifndef __ASSEMBLY__
-
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c
-index 1429d89..6f6b5b6 100644
+index c985b48..5fe9ace 100644
--- a/arch/arm/kernel/asm-offsets.c
+++ b/arch/arm/kernel/asm-offsets.c
-@@ -91,6 +91,9 @@ int main(void)
+@@ -93,6 +93,9 @@ int main(void)
DEFINE(S_PC, offsetof(struct pt_regs, ARM_pc));
DEFINE(S_PSR, offsetof(struct pt_regs, ARM_cpsr));
DEFINE(S_OLD_R0, offsetof(struct pt_regs, ARM_ORIG_r0));
@@ -379,10 +420,18 @@ index 1429d89..6f6b5b6 100644
BLANK();
#ifdef CONFIG_CACHE_L2X0
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
-index 278cfc1..c391c05 100644
+index 6a2e09c..e2988bb 100644
--- a/arch/arm/kernel/head-nommu.S
+++ b/arch/arm/kernel/head-nommu.S
-@@ -44,10 +44,13 @@ ENTRY(stext)
+@@ -19,6 +19,7 @@
+ #include <asm/asm-offsets.h>
+ #include <asm/cp15.h>
+ #include <asm/thread_info.h>
++#include <asm/v7m.h>
+
+ /*
+ * Kernel startup entry point.
+@@ -50,10 +51,13 @@ ENTRY(stext)
setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, r9 @ ensure svc mode
@ and irqs disabled
@@ -392,7 +441,7 @@ index 278cfc1..c391c05 100644
+#if defined(CONFIG_CPU_CP15)
mrc p15, 0, r9, c0, c0 @ get processor id
+#elif defined(CONFIG_CPU_V7M)
-+ ldr r9, =0xe000ed00 @ CPUID register address
++ ldr r9, =V7M_SCS_CPUID
+ ldr r9, [r9]
+#else
+ ldr r9, =CONFIG_PROCESSOR_ID
@@ -400,10 +449,10 @@ index 278cfc1..c391c05 100644
bl __lookup_processor_type @ r5=procinfo r9=cpuid
movs r10, r5 @ invalid processor (r5=0)?
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
-index a81dcec..4dda5ca 100644
+index 1cc9e17..8291245 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
-@@ -135,7 +135,9 @@ struct stack {
+@@ -128,7 +128,9 @@ struct stack {
u32 und[3];
} ____cacheline_aligned;
@@ -413,7 +462,7 @@ index a81dcec..4dda5ca 100644
char elf_platform[ELF_PLATFORM_SIZE];
EXPORT_SYMBOL(elf_platform);
-@@ -215,7 +217,7 @@ static const char *proc_arch[] = {
+@@ -207,7 +209,7 @@ static const char *proc_arch[] = {
"5TEJ",
"6TEJ",
"7",
@@ -422,7 +471,7 @@ index a81dcec..4dda5ca 100644
"?(12)",
"?(13)",
"?(14)",
-@@ -224,6 +226,12 @@ static const char *proc_arch[] = {
+@@ -216,6 +218,12 @@ static const char *proc_arch[] = {
"?(17)",
};
@@ -435,7 +484,7 @@ index a81dcec..4dda5ca 100644
static int __get_cpu_architecture(void)
{
int cpu_arch;
-@@ -256,6 +264,7 @@ static int __get_cpu_architecture(void)
+@@ -248,6 +256,7 @@ static int __get_cpu_architecture(void)
return cpu_arch;
}
@@ -443,7 +492,18 @@ index a81dcec..4dda5ca 100644
int __pure cpu_architecture(void)
{
-@@ -383,6 +392,7 @@ static void __init feat_v6_fixup(void)
+@@ -293,7 +302,9 @@ static void __init cacheid_init(void)
+ {
+ unsigned int arch = cpu_architecture();
+
+- if (arch >= CPU_ARCH_ARMv6) {
++ if (arch == CPU_ARCH_ARMv7M) {
++ cacheid = 0;
++ } else if (arch >= CPU_ARCH_ARMv6) {
+ unsigned int cachetype = read_cpuid_cachetype();
+ if ((cachetype & (7 << 29)) == 4 << 29) {
+ /* ARMv7 register format */
+@@ -375,6 +386,7 @@ static void __init feat_v6_fixup(void)
*/
void cpu_init(void)
{
@@ -451,7 +511,7 @@ index a81dcec..4dda5ca 100644
unsigned int cpu = smp_processor_id();
struct stack *stk = &stacks[cpu];
-@@ -427,6 +437,7 @@ void cpu_init(void)
+@@ -425,6 +437,7 @@ void cpu_init(void)
"I" (offsetof(struct stack, und[0])),
PLC (PSR_F_BIT | PSR_I_BIT | SVC_MODE)
: "r14");
@@ -498,10 +558,10 @@ index d51225f..4bc8ae5 100644
void __init sanity_check_meminfo(void)
diff --git a/arch/arm/mm/proc-v7m.S b/arch/arm/mm/proc-v7m.S
new file mode 100644
-index 0000000..2b8eb97
+index 0000000..72ba7c3
--- /dev/null
+++ b/arch/arm/mm/proc-v7m.S
-@@ -0,0 +1,161 @@
+@@ -0,0 +1,162 @@
+/*
+ * linux/arch/arm/mm/proc-v7m.S
+ *
@@ -516,6 +576,7 @@ index 0000000..2b8eb97
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
++#include <asm/v7m.h>
+
+ENTRY(cpu_v7m_proc_init)
+ mov pc, lr
@@ -575,15 +636,15 @@ index 0000000..2b8eb97
+ */
+__v7m_setup:
+ @ Configure the vector table base address
-+ ldr r0, =0xe000ed08 @ vector table base address
++ ldr r0, =V7M_SCS_VTOR @ vector table base address
+ ldr r12, =vector_table
+ str r12, [r0]
+
+ @ Lower the priority of the SVC and PendSV exceptions
-+ ldr r0, =0xe000ed1c
++ ldr r0, =V7M_SCS_SHPR2
+ mov r5, #0x80000000
+ str r5, [r0] @ set SVC priority
-+ ldr r0, =0xe000ed20
++ ldr r0, =V7M_SCS_SHPR3
+ mov r5, #0x00800000
+ str r5, [r0] @ set PendSV priority
+
@@ -606,9 +667,9 @@ index 0000000..2b8eb97
+ msr control, r0 @ Thread mode has unpriviledged access
+
+ @ Configure the System Control Register
-+ ldr r0, =0xe000ed14 @ system control register
++ ldr r0, =V7M_SCS_CCR @ system control register
+ ldr r12, [r0]
-+ orr r12, #1 << 9 @ STKALIGN
++ orr r12, #V7M_SCS_CCR_STKALIGN
+ str r12, [r0]
+ mov pc, lr
+ENDPROC(__v7m_setup)
diff --git a/patches/linux-3.6/0005-Cortex-M3-Add-support-for-exception-handling.patch b/patches/linux-3.8-rc5/0010-Cortex-M3-Add-support-for-exception-handling.patch
index 1394799..64c1b3e 100644
--- a/patches/linux-3.6/0005-Cortex-M3-Add-support-for-exception-handling.patch
+++ b/patches/linux-3.8-rc5/0010-Cortex-M3-Add-support-for-exception-handling.patch
@@ -14,21 +14,21 @@ profile.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-Forwarded: id:1333573807-23709-3-git-send-email-u.kleine-koenig@pengutronix.de
+Forwarded: id:1358413196-5609-4-git-send-email-u.kleine-koenig@pengutronix.de (v8)
---
arch/arm/kernel/entry-common.S | 4 ++
arch/arm/kernel/entry-header.S | 148 ++++++++++++++++++++++++++++++++++++++++
- arch/arm/kernel/entry-v7m.S | 134 ++++++++++++++++++++++++++++++++++++
- arch/arm/kernel/process.c | 8 +++
+ arch/arm/kernel/entry-v7m.S | 133 ++++++++++++++++++++++++++++++++++++
+ arch/arm/kernel/process.c | 4 ++
arch/arm/kernel/ptrace.c | 3 +
- 5 files changed, 297 insertions(+)
+ 5 files changed, 292 insertions(+)
create mode 100644 arch/arm/kernel/entry-v7m.S
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
-index 978eac5..a93eed3 100644
+index a6c301e..d5e5462 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
-@@ -327,6 +327,9 @@ ENDPROC(ftrace_stub)
+@@ -339,6 +339,9 @@ ENDPROC(ftrace_stub)
.align 5
ENTRY(vector_swi)
@@ -38,7 +38,7 @@ index 978eac5..a93eed3 100644
sub sp, sp, #S_FRAME_SIZE
stmia sp, {r0 - r12} @ Calling r0 - r12
ARM( add r8, sp, #S_PC )
-@@ -337,6 +340,7 @@ ENTRY(vector_swi)
+@@ -349,6 +352,7 @@ ENTRY(vector_swi)
str lr, [sp, #S_PC] @ Save calling PC
str r8, [sp, #S_PSR] @ Save CPSR
str r0, [sp, #S_OLD_R0] @ Save OLD_R0
@@ -221,10 +221,10 @@ index 9a8531e..33d9900 100644
mov \rd, sp
diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S
new file mode 100644
-index 0000000..a0991dc
+index 0000000..bc9be32
--- /dev/null
+++ b/arch/arm/kernel/entry-v7m.S
-@@ -0,0 +1,134 @@
+@@ -0,0 +1,133 @@
+/*
+ * linux/arch/arm/kernel/entry-v7m.S
+ *
@@ -273,7 +273,6 @@ index 0000000..a0991dc
+ @
+ mrs r0, ipsr
+ and r0, #0xff
-+ sub r0, #16 @ IRQ number
+ mov r1, sp
+ @ routine called with r0 = irq number, r1 = struct pt_regs *
+ bl asm_do_IRQ
@@ -329,8 +328,8 @@ index 0000000..a0991dc
+ mov ip, r4
+ mov r0, r5
+ ldmia ip!, {r4 - r11} @ Load all regs saved previously
-+ ldr sp, [ip], #4
-+ ldr pc, [ip]
++ ldr sp, [ip]
++ ldr pc, [ip, #4]!
+ .fnend
+ENDPROC(__switch_to)
+
@@ -360,37 +359,25 @@ index 0000000..a0991dc
+ .long __irq_entry @ 16..64 - External Interrupts
+ .endr
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
-index 693b744..c45099a 100644
+index c6dec5f..f79dd1e 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
-@@ -436,7 +436,11 @@ asm( ".pushsection .text\n"
- #ifdef CONFIG_TRACE_IRQFLAGS
- " bl trace_hardirqs_on\n"
- #endif
-+#ifdef CONFIG_CPU_V7M
-+" msr primask, r7\n"
-+#else
- " msr cpsr_c, r7\n"
-+#endif
- " mov r0, r4\n"
- " mov lr, r6\n"
- " mov pc, r5\n"
-@@ -475,6 +479,10 @@ pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
- regs.ARM_r7 = SVC_MODE | PSR_ENDSTATE | PSR_ISETSTATE;
- regs.ARM_pc = (unsigned long)kernel_thread_helper;
- regs.ARM_cpsr = regs.ARM_r7 | PSR_I_BIT;
+@@ -388,6 +388,10 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start,
+ childregs->ARM_r0 = 0;
+ if (stack_start)
+ childregs->ARM_sp = stack_start;
+#if defined CONFIG_CPU_V7M
-+ /* Return to Handler mode */
-+ regs.ARM_EXC_RET = 0xfffffff1L;
++ /* Return to Thread mode with Process stack */
++ childregs->ARM_EXC_RET = 0xfffffffdUL;
+#endif
-
- return do_fork(flags|CLONE_VM|CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
- }
+ } else {
+ memset(childregs, 0, sizeof(struct pt_regs));
+ thread->cpu_context.r4 = stk_sz;
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
-index 3e0fc5f..43f7afe 100644
+index 03deeff..540d384 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
-@@ -84,6 +84,9 @@ static const struct pt_regs_offset regoffset_table[] = {
+@@ -87,6 +87,9 @@ static const struct pt_regs_offset regoffset_table[] = {
REG_OFFSET_NAME(pc),
REG_OFFSET_NAME(cpsr),
REG_OFFSET_NAME(ORIG_r0),
diff --git a/patches/linux-3.6/0001-hwmon-efm32-adc-new-driver.patch b/patches/linux-3.8-rc5/0011-hwmon-efm32-adc-new-driver.patch
index 56e38db..b8258c9 100644
--- a/patches/linux-3.6/0001-hwmon-efm32-adc-new-driver.patch
+++ b/patches/linux-3.8-rc5/0011-hwmon-efm32-adc-new-driver.patch
@@ -14,12 +14,12 @@ Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
create mode 100644 drivers/hwmon/efm32-adc.c
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
-index b0a2e4c..2286e68 100644
+index 32f238f..d502bd0 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
-@@ -324,6 +324,16 @@ config SENSORS_DA9052_ADC
- This driver can also be built as module. If so, the module
- will be called da9052-hwmon.
+@@ -344,6 +344,16 @@ config SENSORS_DA9055
+ This driver can also be built as a module. If so, the module
+ will be called da9055-hwmon.
+config SENSORS_EFM32_ADC
+ tristate "Energy Micro EFM32 ADC"
@@ -31,14 +31,14 @@ index b0a2e4c..2286e68 100644
+ This driver can also be built as a module. If so, the module
+ will be called efm32-adc.
+
- config SENSORS_EXYNOS4_TMU
- tristate "Temperature sensor on Samsung EXYNOS4"
- depends on ARCH_EXYNOS4
+ config SENSORS_I5K_AMB
+ tristate "FB-DIMM AMB temperature sensor on Intel 5000 series chipsets"
+ depends on PCI
diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
-index 7aa9811..dc14fc4 100644
+index 5da2874..7a3a1b8 100644
--- a/drivers/hwmon/Makefile
+++ b/drivers/hwmon/Makefile
-@@ -46,6 +46,7 @@ obj-$(CONFIG_SENSORS_DA9052_ADC)+= da9052-hwmon.o
+@@ -48,6 +48,7 @@ obj-$(CONFIG_SENSORS_DA9055)+= da9055-hwmon.o
obj-$(CONFIG_SENSORS_DME1737) += dme1737.o
obj-$(CONFIG_SENSORS_DS620) += ds620.o
obj-$(CONFIG_SENSORS_DS1621) += ds1621.o
@@ -48,7 +48,7 @@ index 7aa9811..dc14fc4 100644
obj-$(CONFIG_SENSORS_EMC6W201) += emc6w201.o
diff --git a/drivers/hwmon/efm32-adc.c b/drivers/hwmon/efm32-adc.c
new file mode 100644
-index 0000000..cc9c3d8
+index 0000000..c8abd0f
--- /dev/null
+++ b/drivers/hwmon/efm32-adc.c
@@ -0,0 +1,293 @@
@@ -249,7 +249,7 @@ index 0000000..cc9c3d8
+ .attrs = efm32_adc_attr,
+};
+
-+static int __devinit efm32_adc_probe(struct platform_device *pdev)
++static int efm32_adc_probe(struct platform_device *pdev)
+{
+ struct efm32_adc_ddata *ddata;
+ struct resource *res;
@@ -317,7 +317,7 @@ index 0000000..cc9c3d8
+ return ret;
+}
+
-+static int __devexit efm32_adc_remove(struct platform_device *pdev)
++static int efm32_adc_remove(struct platform_device *pdev)
+{
+ struct efm32_adc_ddata *ddata = platform_get_drvdata(pdev);
+
@@ -333,7 +333,7 @@ index 0000000..cc9c3d8
+
+static struct platform_driver efm32_adc_driver = {
+ .probe = efm32_adc_probe,
-+ .remove = __devexit_p(efm32_adc_remove),
++ .remove = efm32_adc_remove,
+ .driver = {
+ .name = DRIVER_NAME,
+ .owner = THIS_MODULE,
diff --git a/patches/linux-3.6/0002-spi-new-controller-driver-for-efm32-SoCs.patch b/patches/linux-3.8-rc5/0012-spi-new-controller-driver-for-efm32-SoCs.patch
index bf85cf7..e5b2579 100644
--- a/patches/linux-3.6/0002-spi-new-controller-driver-for-efm32-SoCs.patch
+++ b/patches/linux-3.8-rc5/0012-spi-new-controller-driver-for-efm32-SoCs.patch
@@ -5,19 +5,22 @@ MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
+known issues:
+ efm32-spi efm32-spi.1: master is unqueued, this is deprecated
+
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/spi/Kconfig | 5 +
drivers/spi/Makefile | 1 +
- drivers/spi/spi-efm32.c | 456 +++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 462 insertions(+)
+ drivers/spi/spi-efm32.c | 458 +++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 464 insertions(+)
create mode 100644 drivers/spi/spi-efm32.c
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
-index 5f84b55..053ee60 100644
+index 2e188e1..a92311d 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
-@@ -137,6 +137,11 @@ config SPI_DAVINCI
+@@ -145,6 +145,11 @@ config SPI_DAVINCI
help
SPI master controller for DaVinci/DA8x/OMAP-L/AM1x SPI modules.
@@ -30,10 +33,10 @@ index 5f84b55..053ee60 100644
tristate "Cirrus Logic EP93xx SPI controller"
depends on ARCH_EP93XX
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
-index 3920dcf..da1243e 100644
+index 64e970b..d115638 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
-@@ -25,6 +25,7 @@ obj-$(CONFIG_SPI_DESIGNWARE) += spi-dw.o
+@@ -26,6 +26,7 @@ obj-$(CONFIG_SPI_DESIGNWARE) += spi-dw.o
obj-$(CONFIG_SPI_DW_MMIO) += spi-dw-mmio.o
obj-$(CONFIG_SPI_DW_PCI) += spi-dw-midpci.o
spi-dw-midpci-objs := spi-dw-pci.o spi-dw-mid.o
@@ -43,10 +46,10 @@ index 3920dcf..da1243e 100644
obj-$(CONFIG_SPI_FSL_LIB) += spi-fsl-lib.o
diff --git a/drivers/spi/spi-efm32.c b/drivers/spi/spi-efm32.c
new file mode 100644
-index 0000000..85b252a
+index 0000000..96b2db4
--- /dev/null
+++ b/drivers/spi/spi-efm32.c
-@@ -0,0 +1,456 @@
+@@ -0,0 +1,458 @@
+/*
+ * Copyright (C) 2012 Uwe Kleine-Koenig for Pengutronix
+ *
@@ -358,7 +361,7 @@ index 0000000..85b252a
+ return IRQ_HANDLED;
+}
+
-+static int __devinit efm32_spi_probe(struct platform_device *pdev)
++static int efm32_spi_probe(struct platform_device *pdev)
+{
+ struct efm32_spi_ddata *ddata;
+ struct resource *res;
@@ -474,7 +477,7 @@ index 0000000..85b252a
+ return ret;
+}
+
-+static void __devexit efm32_spi_remove(struct platform_device *pdev)
++static int efm32_spi_remove(struct platform_device *pdev)
+{
+ struct spi_master *master = platform_get_drvdata(pdev);
+ struct efm32_spi_ddata *ddata = spi_master_get_devdata(master);
@@ -486,11 +489,13 @@ index 0000000..85b252a
+ platform_set_drvdata(pdev, NULL);
+ spi_master_put(master);
+ kfree(master);
++
++ return 0;
+}
+
+static struct platform_driver efm32_spi_driver = {
+ .probe = efm32_spi_probe,
-+ .remove = __devexit_p(efm32_spi_remove),
++ .remove = efm32_spi_remove,
+
+ .driver = {
+ .name = DRIVER_NAME,
diff --git a/patches/linux-3.6/0006-Cortex-M3-Add-NVIC-support.patch b/patches/linux-3.8-rc5/0013-Cortex-M3-Add-NVIC-support.patch
index d4f0912..ffefcd2 100644
--- a/patches/linux-3.6/0006-Cortex-M3-Add-NVIC-support.patch
+++ b/patches/linux-3.8-rc5/0013-Cortex-M3-Add-NVIC-support.patch
@@ -8,28 +8,30 @@ Content-Transfer-Encoding: 8bit
This patch implements the NVIC (interrupt controller) support for
Cortex-M3.
-[ukleinek: use a raw spinlock]
+[ukleinek: drop locking, switch to fasteoi handler, add irqdomain
+support]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
- arch/arm/common/Kconfig | 3 ++
+ arch/arm/common/Kconfig | 4 +
arch/arm/common/Makefile | 1 +
- arch/arm/common/nvic.c | 98 ++++++++++++++++++++++++++++++++++
- arch/arm/include/asm/hardware/nvic.h | 34 ++++++++++++
- 4 files changed, 136 insertions(+)
+ arch/arm/common/nvic.c | 140 ++++++++++++++++++++++++++++++++++
+ arch/arm/include/asm/hardware/nvic.h | 20 +++++
+ 4 files changed, 165 insertions(+)
create mode 100644 arch/arm/common/nvic.c
create mode 100644 arch/arm/include/asm/hardware/nvic.h
diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig
-index 283fa1d..58a142f 100644
+index 45ceeb0..e5fd271 100644
--- a/arch/arm/common/Kconfig
+++ b/arch/arm/common/Kconfig
-@@ -21,6 +21,9 @@ config ARM_VIC_NR
+@@ -21,6 +21,10 @@ config ARM_VIC_NR
The maximum number of VICs available in the system, for
power management.
+config ARM_NVIC
+ bool
++ select IRQ_DOMAIN
+
config ICST
bool
@@ -48,10 +50,10 @@ index e8a4e58..68031d0 100644
obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o
diff --git a/arch/arm/common/nvic.c b/arch/arm/common/nvic.c
new file mode 100644
-index 0000000..a0d76f4
+index 0000000..beffbef
--- /dev/null
+++ b/arch/arm/common/nvic.c
-@@ -0,0 +1,98 @@
+@@ -0,0 +1,140 @@
+/*
+ * linux/arch/arm/common/nvic.c
+ *
@@ -66,96 +68,138 @@ index 0000000..a0d76f4
+ */
+#include <linux/init.h>
+#include <linux/kernel.h>
++#include <linux/compiler.h>
+#include <linux/smp.h>
++#include <linux/export.h>
++#include <linux/err.h>
++#include <linux/of.h>
++#include <linux/irqdomain.h>
+
+#include <asm/irq.h>
+#include <asm/io.h>
+#include <asm/mach/irq.h>
+#include <asm/hardware/nvic.h>
+
-+static DEFINE_RAW_SPINLOCK(irq_controller_lock);
++#define NVIC_INTR_CTRL (0x004)
++#define NVIC_ISER (0x100)
++#define NVIC_ICER (0x180)
++#define NVIC_IPRI (0x400)
+
-+/*
-+ * Routines to acknowledge, disable and enable interrupts
-+ *
-+ * Linux assumes that when we're done with an interrupt we need to
-+ * unmask it, in the same way we need to unmask an interrupt when
-+ * we first enable it.
-+ *
-+ * The NVIC has a separate notion of "end of interrupt" to re-enable
-+ * an interrupt after handling, in order to support hardware
-+ * prioritisation.
-+ *
-+ * We can make the NVIC behave in the way that Linux expects by making
-+ * our "acknowledge" routine disable the interrupt, then mark it as
-+ * complete.
-+ */
-+static void nvic_ack_irq(struct irq_data *d)
-+{
-+ u32 mask = 1 << (d->irq % 32);
++struct nvic_chip_data {
++ void __iomem *dist_base;
++ struct irq_domain *domain;
++};
+
-+ raw_spin_lock(&irq_controller_lock);
-+ writel(mask, NVIC_CLEAR_ENABLE + d->irq / 32 * 4);
-+ raw_spin_unlock(&irq_controller_lock);
++static struct nvic_chip_data nvic_data __read_mostly;
++
++static inline void __iomem *nvic_dist_base(struct irq_data *d)
++{
++ struct nvic_chip_data *nvic_data = irq_data_get_irq_chip_data(d);
++ return nvic_data->dist_base;
+}
+
+static void nvic_mask_irq(struct irq_data *d)
+{
-+ u32 mask = 1 << (d->irq % 32);
++ u32 mask = 1 << (d->hwirq % 32);
+
-+ raw_spin_lock(&irq_controller_lock);
-+ writel(mask, NVIC_CLEAR_ENABLE + d->irq / 32 * 4);
-+ raw_spin_unlock(&irq_controller_lock);
++ writel_relaxed(mask, nvic_dist_base(d) + NVIC_ICER + d->irq / 32 * 4);
+}
+
+static void nvic_unmask_irq(struct irq_data *d)
+{
-+ u32 mask = 1 << (d->irq % 32);
++ u32 mask = 1 << (d->hwirq % 32);
+
-+ raw_spin_lock(&irq_controller_lock);
-+ writel(mask, NVIC_SET_ENABLE + d->irq / 32 * 4);
-+ raw_spin_unlock(&irq_controller_lock);
++ writel_relaxed(mask, nvic_dist_base(d) + NVIC_ISER + d->hwirq / 32 * 4);
++}
++
++void nvic_eoi(struct irq_data *d)
++{
++ /*
++ * This is a no-op as end of interrupt is signaled by the exception
++ * return sequence.
++ */
+}
+
+static struct irq_chip nvic_chip = {
+ .name = "NVIC",
-+ .irq_ack = nvic_ack_irq,
+ .irq_mask = nvic_mask_irq,
+ .irq_unmask = nvic_unmask_irq,
++ .irq_eoi = nvic_eoi,
+};
+
-+void __init nvic_init(void)
++static void __init nvic_init_bases(struct device_node *node,
++ void __iomem *dist_base)
+{
-+ unsigned int max_irq, i;
++ unsigned int irqs, i, irq_base;
++
++ nvic_data.dist_base = dist_base;
+
-+ max_irq = ((readl(NVIC_INTR_CTRL) & 0x1f) + 1) * 32;
++ irqs = ((readl_relaxed(dist_base + NVIC_INTR_CTRL) & 0x0f) + 1) * 32;
++ if (irqs > 496)
++ irqs = 496;
++
++ irq_base = irq_alloc_descs(-1, 16, irqs - 16, numa_node_id());
++ if (IS_ERR_VALUE(irq_base)) {
++ WARN(1, "Cannot allocate irq_descs\n");
++ irq_base = 16;
++ } else
++ printk("%s: irq_base = %u\n", __func__, irq_base);
++ nvic_data.domain = irq_domain_add_legacy(node, irqs - 16, irq_base, 0,
++ &irq_domain_simple_ops, NULL);
++ if (WARN_ON(!nvic_data.domain))
++ return;
+
+ /*
-+ * Disable all interrupts
++ * Set priority on all interrupts.
+ */
-+ for (i = 0; i < max_irq / 32; i++)
-+ writel(~0, NVIC_CLEAR_ENABLE + i * 4);
++ for (i = 0; i < irqs; i += 4)
++ writel_relaxed(0, dist_base + NVIC_IPRI + i);
+
+ /*
-+ * Set priority on all interrupts.
++ * Disable all interrupts
+ */
-+ for (i = 0; i < max_irq; i += 4)
-+ writel(0, NVIC_PRIORITY + i);
++ for (i = 0; i < irqs; i += 32)
++ writel_relaxed(~0, dist_base + NVIC_ICER + i * 4 / 32);
+
+ /*
+ * Setup the Linux IRQ subsystem.
+ */
-+ for (i = 0; i < NR_IRQS; i++) {
-+ irq_set_chip_and_handler(i, &nvic_chip, handle_level_irq);
-+ set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
++ for (i = 0; i < irqs; i++) {
++ irq_set_chip_and_handler(irq_base + i, &nvic_chip, handle_fasteoi_irq);
++ irq_set_chip_data(irq_base + i, &nvic_data);
++ set_irq_flags(irq_base + i, IRQF_VALID | IRQF_PROBE);
+ }
+}
++
++#define V7M_SCS ((void __iomem *)0xe000e000)
++void __init nvic_init(void)
++{
++ nvic_init_bases(NULL, V7M_SCS);
++
++}
++
++#ifdef CONFIG_USE_OF
++int __init nvic_of_init(struct device_node *node, struct device_node *parent)
++{
++ void __iomem *dist_base;
++
++ if (WARN_ON(!node))
++ return -ENODEV;
++
++ dist_base = of_iomap(node, 0);
++ WARN(!dist_base, "unable to map nvic dist registers\n");
++
++ nvic_init_bases(node, dist_base);
++
++ return 0;
++}
++#endif
diff --git a/arch/arm/include/asm/hardware/nvic.h b/arch/arm/include/asm/hardware/nvic.h
new file mode 100644
-index 0000000..b7f8026
+index 0000000..d072dbc
--- /dev/null
+++ b/arch/arm/include/asm/hardware/nvic.h
-@@ -0,0 +1,34 @@
+@@ -0,0 +1,20 @@
+/*
+ * linux/include/asm-arm/hardware/nvic.h
+ *
@@ -168,25 +212,11 @@ index 0000000..b7f8026
+#ifndef __ASM_ARM_HARDWARE_NVIC_H
+#define __ASM_ARM_HARDWARE_NVIC_H
+
-+#include <linux/compiler.h>
++#define NVIC_IRQ(x) ((x) + 16)
+
-+#define V7M_SCS 0xe000e000
-+#define NVIC_INTR_CTRL (V7M_SCS + 0x004)
-+#define NVIC_SYSTICK_CTRL (V7M_SCS + 0x010)
-+#define NVIC_SYSTICK_RELOAD (V7M_SCS + 0x014)
-+#define NVIC_SYSTICK_CURRENT (V7M_SCS + 0x018)
-+#define NVIC_SYSTICK_CALIBRATION (V7M_SCS + 0x01c)
-+#define NVIC_SET_ENABLE (V7M_SCS + 0x100)
-+#define NVIC_CLEAR_ENABLE (V7M_SCS + 0x180)
-+#define NVIC_SET_PENDING (V7M_SCS + 0x200)
-+#define NVIC_CLEAR_PENDING (V7M_SCS + 0x280)
-+#define NVIC_ACTIVE_BIT (V7M_SCS + 0x300)
-+#define NVIC_PRIORITY (V7M_SCS + 0x400)
-+#define NVIC_INTR_CTRL_STATE (V7M_SCS + 0xd04)
-+#define NVIC_SOFTWARE_INTR (V7M_SCS + 0xf00)
-+
-+#ifndef __ASSEMBLY__
+void nvic_init(void);
-+#endif
++
++struct device_node;
++void nvic_of_init(struct device_node *node, struct device_node *parent);
+
+#endif
diff --git a/patches/linux-3.6/0007-Cortex-M3-Allow-the-building-of-Cortex-M3-kernel-por.patch b/patches/linux-3.8-rc5/0014-Cortex-M3-Allow-the-building-of-Cortex-M3-kernel-por.patch
index c5aadf4..77faa45 100644
--- a/patches/linux-3.6/0007-Cortex-M3-Allow-the-building-of-Cortex-M3-kernel-por.patch
+++ b/patches/linux-3.8-rc5/0014-Cortex-M3-Allow-the-building-of-Cortex-M3-kernel-por.patch
@@ -13,27 +13,36 @@ building of kernel for Cortex-M3.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
- arch/arm/Kconfig | 2 +-
+ arch/arm/Kconfig | 4 ++--
arch/arm/Kconfig-nommu | 2 +-
arch/arm/Makefile | 1 +
arch/arm/kernel/Makefile | 8 +++++++-
- arch/arm/mm/Kconfig | 24 +++++++++++++++++++++++-
+ arch/arm/mm/Kconfig | 22 +++++++++++++++++++++-
arch/arm/mm/Makefile | 1 +
- 6 files changed, 34 insertions(+), 4 deletions(-)
+ 6 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
-index 2f88d8d..84a8e47 100644
+index e04c779..9d09a41 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -1642,7 +1642,7 @@ config HZ
+@@ -8,7 +8,7 @@ config ARM
+ select BUILDTIME_EXTABLE_SORT if MMU
+ select CPU_PM if (SUSPEND || CPU_IDLE)
+ select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN && MMU
+- select GENERIC_ATOMIC64 if (CPU_V6 || !CPU_32v6K || !AEABI)
++ select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI)
+ select GENERIC_CLOCKEVENTS_BROADCAST if SMP
+ select GENERIC_IRQ_PROBE
+ select GENERIC_IRQ_SHOW
+@@ -1657,7 +1657,7 @@ config HZ
config THUMB2_KERNEL
- bool "Compile the kernel in Thumb-2 mode (EXPERIMENTAL)"
-- depends on CPU_V7 && !CPU_V6 && !CPU_V6K && EXPERIMENTAL
-+ depends on (CPU_V7 || CPU_V7M) && !CPU_V6 && !CPU_V6K && EXPERIMENTAL
+ bool "Compile the kernel in Thumb-2 mode" if !CPU_THUMBONLY
+- depends on CPU_V7 && !CPU_V6 && !CPU_V6K
++ depends on (CPU_V7 || CPU_V7M) && !CPU_V6 && !CPU_V6K
+ default y if CPU_THUMBONLY
select AEABI
select ARM_ASM_UNIFIED
- select ARM_UNWIND
diff --git a/arch/arm/Kconfig-nommu b/arch/arm/Kconfig-nommu
index 2cef8e1..c859495 100644
--- a/arch/arm/Kconfig-nommu
@@ -48,10 +57,10 @@ index 2cef8e1..c859495 100644
If processor has no CP15 register, this processor ID is
used instead of the auto-probing which utilizes the register.
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
-index a051dfb..a86ca69 100644
+index 30c443c..69a5955 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
-@@ -60,6 +60,7 @@ comma = ,
+@@ -59,6 +59,7 @@ comma = ,
# Note that GCC does not numerically define an architecture version
# macro, but instead defines a whole series of macros which makes
# testing for a specific architecture or later rather impossible.
@@ -60,10 +69,10 @@ index a051dfb..a86ca69 100644
arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
# Only override the compiler option if ARMv6. The ARMv6K extensions are
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
-index 7ad2d5c..f9b7231 100644
+index 5bbec7b..ee85e79 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
-@@ -15,10 +15,16 @@ CFLAGS_REMOVE_return_address.o = -pg
+@@ -15,7 +15,7 @@ CFLAGS_REMOVE_return_address.o = -pg
# Object file lists.
@@ -72,39 +81,41 @@ index 7ad2d5c..f9b7231 100644
process.o ptrace.o return_address.o sched_clock.o \
setup.o signal.o stacktrace.o sys_arm.o time.o traps.o
+@@ -23,6 +23,12 @@ obj-$(CONFIG_ATAGS) += atags_parse.o
+ obj-$(CONFIG_ATAGS_PROC) += atags_proc.o
+ obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += atags_compat.o
+
+ifeq ($(CONFIG_CPU_V7M),y)
+obj-y += entry-v7m.o
+else
+obj-y += entry-armv.o
+endif
+
- obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += compat.o
-
- obj-$(CONFIG_LEDS) += leds.o
+ obj-$(CONFIG_OC_ETM) += etm.o
+ obj-$(CONFIG_CPU_IDLE) += cpuidle.o
+ obj-$(CONFIG_ISA_DMA_API) += dma.o
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
-index 101b968..66e76fb 100644
+index 8defd63..033397c 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
-@@ -393,6 +393,18 @@ config CPU_V7
- select CPU_COPY_V6 if MMU
+@@ -397,6 +397,16 @@ config CPU_V7
+ select CPU_PABRT_V7
select CPU_TLB_V7 if MMU
-+# ARMv7
++# ARMv7M
+config CPU_V7M
+ bool
-+ select THUMB2_KERNEL
-+ select ARM_THUMB
+ select CPU_32v7M
-+ select CPU_32v6K
+ select CPU_ABRT_NOMMU
-+ select CPU_PABRT_LEGACY
+ select CPU_CACHE_V7M
+ select CPU_CACHE_VIPT
++ select CPU_PABRT_LEGACY
++ select CPU_THUMBONLY
+
- # Figure out what processor architecture version we should be using.
- # This defines the compiler instruction set which depends on the machine type.
- config CPU_32v3
-@@ -430,6 +442,9 @@ config CPU_32v6K
+ config CPU_THUMBONLY
+ bool
+ # There are no CPUs available with MMU that don't implement an ARM ISA:
+@@ -441,6 +451,9 @@ config CPU_32v6K
config CPU_32v7
bool
@@ -114,7 +125,7 @@ index 101b968..66e76fb 100644
# The abort model
config CPU_ABRT_NOMMU
bool
-@@ -483,6 +498,9 @@ config CPU_CACHE_V6
+@@ -494,6 +507,9 @@ config CPU_CACHE_V6
config CPU_CACHE_V7
bool
@@ -124,16 +135,16 @@ index 101b968..66e76fb 100644
config CPU_CACHE_VIVT
bool
-@@ -605,7 +623,11 @@ config ARCH_DMA_ADDR_T_64BIT
+@@ -616,7 +632,11 @@ config ARCH_DMA_ADDR_T_64BIT
config ARM_THUMB
- bool "Support Thumb user binaries"
+ bool "Support Thumb user binaries" if !CPU_THUMBONLY
- depends on CPU_ARM720T || CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_V6 || CPU_V6K || CPU_V7 || CPU_FEROCEON
+ depends on CPU_ARM720T || CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || \
+ CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || \
+ CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || \
-+ CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_V6 || CPU_V6K || CPU_V7 || \
-+ CPU_FEROCEON || CPU_V7M
++ CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_V6 || CPU_V6K || \
++ CPU_V7 || CPU_FEROCEON || CPU_V7M
default y
help
Say Y if you want to include kernel support for running user space
diff --git a/patches/linux-3.6/0011-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch b/patches/linux-3.8-rc5/0015-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch
index 4f1ad9f..7755360 100644
--- a/patches/linux-3.6/0011-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch
+++ b/patches/linux-3.8-rc5/0015-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch
@@ -7,17 +7,6 @@ Content-Transfer-Encoding: 8bit
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
-changes since
-id:1324480428-13344-1-git-send-email-u.kleine-koenig@pengutronix.de:
-
- - select NO_IOPORT + don't provide __io()
- - fix debug-macro stuff to do proper fifo handling, fix register
- names and enable TX as the driver disables it occasionally
- - add DEBUG_EFM32_UART1
- - $SUBJECT ~= s/architecture/platform/
- - a timekeeping fix
- - #include "common.h" instead of <common.h> in time.c
----
arch/arm/Kconfig | 13 +-
arch/arm/Kconfig.debug | 16 +++
arch/arm/Makefile | 1 +
@@ -52,10 +41,10 @@ id:1324480428-13344-1-git-send-email-u.kleine-koenig@pengutronix.de:
create mode 100644 arch/arm/mach-efm32/time.c
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
-index 84a8e47..4831437 100644
+index 9d09a41..029f074 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -437,6 +437,17 @@ config ARCH_EBSA110
+@@ -418,6 +418,17 @@ config ARCH_EBSA110
Ethernet interface, two PCMCIA sockets, two serial ports and a
parallel port.
@@ -72,21 +61,21 @@ index 84a8e47..4831437 100644
+
config ARCH_EP93XX
bool "EP93xx-based"
- select CPU_ARM920T
-@@ -1768,7 +1779,7 @@ source "mm/Kconfig"
- config FORCE_MAX_ZONEORDER
+ select ARCH_HAS_HOLES_MEMORYMODEL
+@@ -1785,7 +1796,7 @@ config FORCE_MAX_ZONEORDER
int "Maximum zone order" if ARCH_SHMOBILE
range 11 64 if ARCH_SHMOBILE
+ default "12" if SOC_AM33XX
- default "9" if SA1111
+ default "9" if SA1111 || ARCH_EFM32
default "11"
help
The kernel memory allocator divides physically contiguous memory
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
-index e968a52..93aaae2 100644
+index 661030d..e0f675a 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
-@@ -139,6 +139,22 @@ choice
+@@ -156,6 +156,22 @@ choice
Say Y here if you want the debug print routines to direct
their output to the serial port in the DC21285 (Footbridge).
@@ -110,20 +99,20 @@ index e968a52..93aaae2 100644
bool "Kernel low-level debugging messages via footbridge 8250 at PCI COM1"
depends on FOOTBRIDGE
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
-index a86ca69..f4e4d42 100644
+index 69a5955..374e25a 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
-@@ -143,6 +143,7 @@ machine-$(CONFIG_ARCH_CNS3XXX) := cns3xxx
- machine-$(CONFIG_ARCH_DAVINCI) := davinci
- machine-$(CONFIG_ARCH_DOVE) := dove
- machine-$(CONFIG_ARCH_EBSA110) := ebsa110
-+machine-$(CONFIG_ARCH_EFM32) := efm32
- machine-$(CONFIG_ARCH_EP93XX) := ep93xx
- machine-$(CONFIG_ARCH_GEMINI) := gemini
- machine-$(CONFIG_ARCH_H720X) := h720x
+@@ -146,6 +146,7 @@ machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx
+ machine-$(CONFIG_ARCH_DAVINCI) += davinci
+ machine-$(CONFIG_ARCH_DOVE) += dove
+ machine-$(CONFIG_ARCH_EBSA110) += ebsa110
++machine-$(CONFIG_ARCH_EFM32) += efm32
+ machine-$(CONFIG_ARCH_EP93XX) += ep93xx
+ machine-$(CONFIG_ARCH_GEMINI) += gemini
+ machine-$(CONFIG_ARCH_H720X) += h720x
diff --git a/arch/arm/boot/dts/efm32gg-dk3750.dts b/arch/arm/boot/dts/efm32gg-dk3750.dts
new file mode 100644
-index 0000000..2a28b0f
+index 0000000..13fcc0c
--- /dev/null
+++ b/arch/arm/boot/dts/efm32gg-dk3750.dts
@@ -0,0 +1,41 @@
@@ -142,7 +131,7 @@ index 0000000..2a28b0f
+ compatible = "arm,cortex-m3-nvic";
+ interrupt-controller;
+ #interrupt-cells = <1>;
-+ reg = <0xe0000000 0x4000>;
++ reg = <0xe000e000 0x4000>;
+ };
+
+ chosen {
@@ -307,7 +296,7 @@ index 0000000..42d091c
+MACHINE_END
diff --git a/arch/arm/mach-efm32/include/mach/debug-macro.S b/arch/arm/mach-efm32/include/mach/debug-macro.S
new file mode 100644
-index 0000000..268d648
+index 0000000..c58915c
--- /dev/null
+++ b/arch/arm/mach-efm32/include/mach/debug-macro.S
@@ -0,0 +1,48 @@
@@ -326,7 +315,7 @@ index 0000000..268d648
+
+#define UARTn_TXDATA 0x0034
+
-+ .macro addruart,rx,tmp
++ .macro addruart, rx, tmp
+#if defined(CONFIG_DEBUG_EFM32_USART1)
+ ldr \rx, =(0x4000c400) /* USART1 */
+#elif defined(CONFIG_DEBUG_EFM32_UART1)
@@ -336,8 +325,8 @@ index 0000000..268d648
+#endif
+ /*
+ * enable TX. The driver might disable that to save energy. We
-+ * don't care about disabling at the end as during debug power consumption isn't
-+ * that important.
++ * don't care about disabling at the end as during debug power
++ * consumption isn't that important.
+ */
+ ldr \tmp, =(UARTn_CMD_TXEN)
+ str \tmp, [\rx, #UARTn_CMD]
@@ -391,14 +380,14 @@ index 0000000..bc3519b
+#endif /* __MACH_IO_H__ */
diff --git a/arch/arm/mach-efm32/include/mach/irqs.h b/arch/arm/mach-efm32/include/mach/irqs.h
new file mode 100644
-index 0000000..5fa84db
+index 0000000..e33ed12
--- /dev/null
+++ b/arch/arm/mach-efm32/include/mach/irqs.h
@@ -0,0 +1,6 @@
+#ifndef __MACH_IRQS_H__
+#define __MACH_IRQS_H__
+
-+#define NR_IRQS 37
++#define NR_IRQS 82
+
+#endif /* __MACH_IRQS_H__ */
diff --git a/arch/arm/mach-efm32/include/mach/system.h b/arch/arm/mach-efm32/include/mach/system.h
diff --git a/patches/linux-3.6/0012-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch b/patches/linux-3.8-rc5/0016-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch
index a496e26..3d8ca1e 100644
--- a/patches/linux-3.6/0012-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch
+++ b/patches/linux-3.8-rc5/0016-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch
@@ -17,19 +17,19 @@ Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
arch/arm/mach-efm32/Kconfig | 5 +
arch/arm/mach-efm32/Makefile | 4 +-
arch/arm/mach-efm32/common.c | 207 +++++++++++++++++++++
- arch/arm/mach-efm32/common.h | 7 +
+ arch/arm/mach-efm32/common.h | 9 +
arch/arm/mach-efm32/devices.h | 20 ++
arch/arm/mach-efm32/devices/Makefile | 3 +
arch/arm/mach-efm32/devices/pdev-efm32-adc.c | 18 ++
arch/arm/mach-efm32/devices/pdev-efm32-pinctrl.c | 24 +++
- arch/arm/mach-efm32/devices/pdev-efm32-uart.c | 102 ++++++++++
+ arch/arm/mach-efm32/devices/pdev-efm32-uart.c | 103 +++++++++++
arch/arm/mach-efm32/dtmachine.c | 18 ++
arch/arm/mach-efm32/include/mach/gpio.h | 1 +
- arch/arm/mach-efm32/include/mach/irqs.h | 2 +-
arch/arm/mach-efm32/machines/Kconfig | 11 ++
arch/arm/mach-efm32/machines/Makefile | 1 +
arch/arm/mach-efm32/machines/efm32gg_dk3750.c | 216 ++++++++++++++++++++++
- 17 files changed, 648 insertions(+), 2 deletions(-)
+ arch/arm/mach-efm32/time.c | 2 +-
+ 17 files changed, 651 insertions(+), 2 deletions(-)
create mode 100644 arch/arm/mach-efm32/Kconfig
create mode 100644 arch/arm/mach-efm32/common.c
create mode 100644 arch/arm/mach-efm32/devices.h
@@ -43,10 +43,10 @@ Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
create mode 100644 arch/arm/mach-efm32/machines/efm32gg_dk3750.c
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
-index 4831437..dffb4d9 100644
+index 029f074..814886d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -444,9 +444,12 @@ config ARCH_EFM32
+@@ -425,9 +425,12 @@ config ARCH_EFM32
select CLKSRC_MMIO
select CPU_V7M
select GENERIC_CLOCKEVENTS
@@ -59,7 +59,7 @@ index 4831437..dffb4d9 100644
config ARCH_EP93XX
bool "EP93xx-based"
-@@ -1052,6 +1055,8 @@ source "arch/arm/mach-davinci/Kconfig"
+@@ -1041,6 +1044,8 @@ source "arch/arm/mach-davinci/Kconfig"
source "arch/arm/mach-dove/Kconfig"
@@ -333,10 +333,12 @@ index 0000000..cb073ba
+ __raw_writel(0, (void __iomem *)0x400c6024);
+}
diff --git a/arch/arm/mach-efm32/common.h b/arch/arm/mach-efm32/common.h
-index d2ff797..237b412 100644
+index d2ff797..2a52d17 100644
--- a/arch/arm/mach-efm32/common.h
+++ b/arch/arm/mach-efm32/common.h
-@@ -1 +1,8 @@
+@@ -1 +1,10 @@
++#include <asm/hardware/nvic.h>
++
extern struct sys_timer efm32_timer;
+
+/* XXX: find a better place for that */
@@ -436,40 +438,41 @@ index 0000000..4a878f1
+}
diff --git a/arch/arm/mach-efm32/devices/pdev-efm32-uart.c b/arch/arm/mach-efm32/devices/pdev-efm32-uart.c
new file mode 100644
-index 0000000..1a96772
+index 0000000..8527aeb
--- /dev/null
+++ b/arch/arm/mach-efm32/devices/pdev-efm32-uart.c
-@@ -0,0 +1,102 @@
+@@ -0,0 +1,103 @@
+#include <linux/ioport.h>
+#include <linux/platform_device.h>
+
+#include <linux/platform_data/efm32-uart.h>
+
+#include "../devices.h"
++#include "../common.h"
+
+static const struct resource efm32_usart0_resources[] __initconst = {
+ DEFINE_RES_MEM(0x4000c000, 0x400),
-+ DEFINE_RES_IRQ(3),
++ DEFINE_RES_IRQ(NVIC_IRQ(3)),
+};
+
+static const struct resource efm32_usart1_resources[] __initconst = {
+ DEFINE_RES_MEM(0x4000c400, 0x400),
-+ DEFINE_RES_IRQ(15),
++ DEFINE_RES_IRQ(NVIC_IRQ(15)),
+};
+
+static const struct resource efm32_usart2_resources[] __initconst = {
+ DEFINE_RES_MEM(0x4000c800, 0x400),
-+ DEFINE_RES_IRQ(18),
++ DEFINE_RES_IRQ(NVIC_IRQ(18)),
+};
+
+static const struct resource efm32_uart0_resources[] __initconst = {
+ DEFINE_RES_MEM(0x4000e000, 0x400),
-+ DEFINE_RES_IRQ(20),
++ DEFINE_RES_IRQ(NVIC_IRQ(20)),
+};
+
+static const struct resource efm32_uart1_resources[] __initconst = {
+ DEFINE_RES_MEM(0x4000e400, 0x400),
-+ DEFINE_RES_IRQ(22),
++ DEFINE_RES_IRQ(NVIC_IRQ(22)),
+};
+
+const struct platform_device_info efm32_uart_devinfo[] __initconst = {
@@ -585,18 +588,6 @@ index 0000000..40a8c17
+++ b/arch/arm/mach-efm32/include/mach/gpio.h
@@ -0,0 +1 @@
+/* empty */
-diff --git a/arch/arm/mach-efm32/include/mach/irqs.h b/arch/arm/mach-efm32/include/mach/irqs.h
-index 5fa84db..f4c4b57 100644
---- a/arch/arm/mach-efm32/include/mach/irqs.h
-+++ b/arch/arm/mach-efm32/include/mach/irqs.h
-@@ -1,6 +1,6 @@
- #ifndef __MACH_IRQS_H__
- #define __MACH_IRQS_H__
-
--#define NR_IRQS 37
-+#define NR_IRQS 66
-
- #endif /* __MACH_IRQS_H__ */
diff --git a/arch/arm/mach-efm32/machines/Kconfig b/arch/arm/mach-efm32/machines/Kconfig
new file mode 100644
index 0000000..f060c08
@@ -843,3 +834,16 @@ index 0000000..cdc7506
+ .init_machine = efm32gg_dk3750_init,
+ .restart = cm3_restart,
+MACHINE_END
+diff --git a/arch/arm/mach-efm32/time.c b/arch/arm/mach-efm32/time.c
+index c8038b1..f91a3ef 100644
+--- a/arch/arm/mach-efm32/time.c
++++ b/arch/arm/mach-efm32/time.c
+@@ -37,7 +37,7 @@
+
+ #define TIMER_CLOCKSOURCE 1
+ #define TIMER_CLOCKEVENT 2
+-#define IRQ_CLOCKEVENT 13
++#define IRQ_CLOCKEVENT NVIC_IRQ(13)
+
+ static void efm32_timer_write(unsigned timerno, u32 val, unsigned offset)
+ {
diff --git a/patches/linux-3.6/0013-pinctrl-add-a-driver-for-Energy-Micro-s-efm32-SoCs.patch b/patches/linux-3.8-rc5/0017-pinctrl-add-a-driver-for-Energy-Micro-s-efm32-SoCs.patch
index b071525..f92145f 100644
--- a/patches/linux-3.6/0013-pinctrl-add-a-driver-for-Energy-Micro-s-efm32-SoCs.patch
+++ b/patches/linux-3.8-rc5/0017-pinctrl-add-a-driver-for-Energy-Micro-s-efm32-SoCs.patch
@@ -9,19 +9,19 @@ Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/pinctrl/Kconfig | 6 +
drivers/pinctrl/Makefile | 1 +
- drivers/pinctrl/pinctrl-efm32.c | 411 +++++++++++++++++++++++++++
+ drivers/pinctrl/pinctrl-efm32.c | 415 +++++++++++++++++++++++++++
include/linux/platform_data/efm32-pinctrl.h | 47 +++
- 4 files changed, 465 insertions(+)
+ 4 files changed, 469 insertions(+)
create mode 100644 drivers/pinctrl/pinctrl-efm32.c
create mode 100644 include/linux/platform_data/efm32-pinctrl.h
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
-index 54e3588..12c0807 100644
+index c31aeb0..ac75540 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
-@@ -26,6 +26,12 @@ config DEBUG_PINCTRL
- help
- Say Y here to add some extra checks and diagnostics to PINCTRL calls.
+@@ -40,6 +40,12 @@ config PINCTRL_BCM2835
+ select PINMUX
+ select PINCONF
+config PINCTRL_EFM32
+ bool "EFM32 pin controller driver"
@@ -33,23 +33,23 @@ index 54e3588..12c0807 100644
bool
select PINMUX
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
-index f40b1f8..a871d0f 100644
+index fc4606f..a235af0 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
-@@ -9,6 +9,7 @@ ifeq ($(CONFIG_OF),y)
- obj-$(CONFIG_PINCTRL) += devicetree.o
- endif
+@@ -11,6 +11,7 @@ endif
obj-$(CONFIG_GENERIC_PINCONF) += pinconf-generic.o
+ obj-$(CONFIG_PINCTRL_AT91) += pinctrl-at91.o
+ obj-$(CONFIG_PINCTRL_BCM2835) += pinctrl-bcm2835.o
+obj-$(CONFIG_PINCTRL_EFM32) += pinctrl-efm32.o
obj-$(CONFIG_PINCTRL_IMX) += pinctrl-imx.o
+ obj-$(CONFIG_PINCTRL_IMX35) += pinctrl-imx35.o
obj-$(CONFIG_PINCTRL_IMX51) += pinctrl-imx51.o
- obj-$(CONFIG_PINCTRL_IMX53) += pinctrl-imx53.o
diff --git a/drivers/pinctrl/pinctrl-efm32.c b/drivers/pinctrl/pinctrl-efm32.c
new file mode 100644
-index 0000000..39d2fd3
+index 0000000..160774b
--- /dev/null
+++ b/drivers/pinctrl/pinctrl-efm32.c
-@@ -0,0 +1,411 @@
+@@ -0,0 +1,415 @@
+#include <linux/module.h>
+#include <linux/gpio.h>
+#include <linux/slab.h>
@@ -77,6 +77,8 @@ index 0000000..39d2fd3
+#define EFM32_REG_IFS 0x118
+#define EFM32_REG_IFC 0x11c
+
++#define NVIC_IRQ(x) ((x) + 16)
++
+struct efm32_pinctrl_ddata {
+ struct platform_device *pdev;
+ spinlock_t lock;
@@ -356,7 +358,7 @@ index 0000000..39d2fd3
+ efm32_pinctrl_gpio_handler(irq, desc, 0xaaaa);
+}
+
-+static int __devinit efm32_pinctrl_probe(struct platform_device *pdev)
++static int efm32_pinctrl_probe(struct platform_device *pdev)
+{
+ struct efm32_pinctrl_ddata *ddata;
+ struct efm32_pinctrl_pdata *pdata;
@@ -405,11 +407,13 @@ index 0000000..39d2fd3
+ goto err_ioremap;
+ }
+
-+ irq_set_chained_handler(1 /* IRQ_GPIO_EVEN */, efm32_pinctrl_gpio_handler_even);
-+ irq_set_handler_data(1, ddata);
++ irq_set_chained_handler(NVIC_IRQ(1) /* IRQ_GPIO_EVEN */,
++ efm32_pinctrl_gpio_handler_even);
++ irq_set_handler_data(NVIC_IRQ(1), ddata);
+
-+ irq_set_chained_handler(11 /* IRQ_GPIO_ODD */, efm32_pinctrl_gpio_handler_odd);
-+ irq_set_handler_data(11, ddata);
++ irq_set_chained_handler(NVIC_IRQ(11) /* IRQ_GPIO_ODD */,
++ efm32_pinctrl_gpio_handler_odd);
++ irq_set_handler_data(NVIC_IRQ(11), ddata);
+
+ for (i = 0; i < 16; ++i) {
+ irq_set_chip_and_handler(EFM32_GPIO_IRQ_OFFSET + i, &ddata->ic,
diff --git a/patches/linux-3.6/0014-HACK-ARM-allow-a-bootloader-to-be-embedded-and-do-it.patch b/patches/linux-3.8-rc5/0018-HACK-ARM-allow-a-bootloader-to-be-embedded-and-do-it.patch
index 9375af4..9bbbf28 100644
--- a/patches/linux-3.6/0014-HACK-ARM-allow-a-bootloader-to-be-embedded-and-do-it.patch
+++ b/patches/linux-3.8-rc5/0018-HACK-ARM-allow-a-bootloader-to-be-embedded-and-do-it.patch
@@ -15,7 +15,7 @@ Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
create mode 100644 arch/arm/mach-efm32/bootloader.S
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
-index 36ff15b..cda2ca6 100644
+index 11c1785..d573600 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -86,6 +86,11 @@ SECTIONS
@@ -42,7 +42,7 @@ index f3a6932..c882ed0 100644
obj-$(CONFIG_OF) += dtmachine.o
diff --git a/arch/arm/mach-efm32/bootloader.S b/arch/arm/mach-efm32/bootloader.S
new file mode 100644
-index 0000000..2158feb
+index 0000000..af727b2
--- /dev/null
+++ b/arch/arm/mach-efm32/bootloader.S
@@ -0,0 +1,274 @@
@@ -276,7 +276,7 @@ index 0000000..2158feb
+#ifdef EFM32_USE_OF
+ .type dtb, %object
+dtb:
-+ .incbin "arch/arm/boot/efm32gg-dk3750.dtb"
++ .incbin "arch/arm/boot/dts/efm32gg-dk3750.dtb"
+dtbend:
+ .size dtb, . - dtb
+ .align 3
@@ -311,7 +311,7 @@ index 0000000..2158feb
+#else
+ .ascii "4"
+#endif
-+ .asciz ",115200 ignore_loglevel ihash_entries=64 dhash_entries=64 rootfstype=romfs init=/linuxrc"
++ .asciz ",115200 ignore_loglevel ihash_entries=64 dhash_entries=64 rootfstype=romfs init=/linuxrc uclinux.physaddr=0x8c000000 root=/dev/mtdblock0 earlyprintk"
+ .align 2, 0
+cmdline_end:
+ /* ATAG_NONE */
diff --git a/patches/linux-3.6/0015-HACK-don-t-reserve-memory-for-device-tree-if-it-s-be.patch b/patches/linux-3.8-rc5/0019-HACK-don-t-reserve-memory-for-device-tree-if-it-s-be.patch
index 80c1d6b..b7f5680 100644
--- a/patches/linux-3.6/0015-HACK-don-t-reserve-memory-for-device-tree-if-it-s-be.patch
+++ b/patches/linux-3.8-rc5/0019-HACK-don-t-reserve-memory-for-device-tree-if-it-s-be.patch
@@ -15,10 +15,10 @@ Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
1 file changed, 4 insertions(+)
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
-index bee7f9d..4fc2acf 100644
+index 70f1bde..808801d 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
-@@ -41,6 +41,10 @@ void __init arm_dt_memblock_reserve(void)
+@@ -43,6 +43,10 @@ void __init arm_dt_memblock_reserve(void)
if (!initial_boot_params)
return;
diff --git a/patches/linux-3.6/0016-HACK-make-stack-dumps-provoked-by-BUG-a-bit-more-hel.patch b/patches/linux-3.8-rc5/0020-HACK-make-stack-dumps-provoked-by-BUG-a-bit-more-hel.patch
index 542f128..b99bcec 100644
--- a/patches/linux-3.6/0016-HACK-make-stack-dumps-provoked-by-BUG-a-bit-more-hel.patch
+++ b/patches/linux-3.8-rc5/0020-HACK-make-stack-dumps-provoked-by-BUG-a-bit-more-hel.patch
@@ -14,7 +14,7 @@ Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
-index c45099a..1776977 100644
+index f79dd1e..3a358f9 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -334,12 +334,14 @@ void __show_regs(struct pt_regs *regs)
diff --git a/patches/linux-3.6/0017-ARM-v7m-add-trivial-suspend-support.patch b/patches/linux-3.8-rc5/0021-ARM-v7m-add-trivial-suspend-support.patch
index 7390ebc..8950e0b 100644
--- a/patches/linux-3.6/0017-ARM-v7m-add-trivial-suspend-support.patch
+++ b/patches/linux-3.8-rc5/0021-ARM-v7m-add-trivial-suspend-support.patch
@@ -13,12 +13,12 @@ Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
-index dffb4d9..d3ec936 100644
+index 814886d..0962c33 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -2331,7 +2331,7 @@ source "kernel/power/Kconfig"
+@@ -2318,7 +2318,7 @@ source "kernel/power/Kconfig"
config ARCH_SUSPEND_POSSIBLE
- depends on !ARCH_S5PC100 && !ARCH_TEGRA
+ depends on !ARCH_S5PC100
depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \
- CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE || CPU_MOHAWK
+ CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE || CPU_MOHAWK || CPU_V7M
@@ -26,10 +26,10 @@ index dffb4d9..d3ec936 100644
config ARM_CPU_SUSPEND
diff --git a/arch/arm/kernel/suspend.c b/arch/arm/kernel/suspend.c
-index 1794cc3..c674832 100644
+index 358bca3..bc451f6 100644
--- a/arch/arm/kernel/suspend.c
+++ b/arch/arm/kernel/suspend.c
-@@ -20,7 +20,11 @@ void __cpu_suspend_save(u32 *ptr, u32 ptrsz, u32 sp, u32 *save_ptr)
+@@ -22,7 +22,11 @@ void __cpu_suspend_save(u32 *ptr, u32 ptrsz, u32 sp, u32 *save_ptr)
*save_ptr = virt_to_phys(ptr);
/* This must correspond to the LDM in cpu_resume() assembly */
@@ -41,7 +41,7 @@ index 1794cc3..c674832 100644
*ptr++ = sp;
*ptr++ = virt_to_phys(cpu_do_resume);
-@@ -38,11 +42,13 @@ void __cpu_suspend_save(u32 *ptr, u32 ptrsz, u32 sp, u32 *save_ptr)
+@@ -53,11 +57,13 @@ void __cpu_suspend_save(u32 *ptr, u32 ptrsz, u32 sp, u32 *save_ptr)
*/
int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
{
@@ -56,7 +56,7 @@ index 1794cc3..c674832 100644
/*
* Provide a temporary page table with an identity mapping for
-@@ -51,10 +57,12 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
+@@ -66,10 +72,12 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
* back to the correct page tables.
*/
ret = __cpu_suspend(arg, fn);
@@ -70,10 +70,10 @@ index 1794cc3..c674832 100644
return ret;
}
diff --git a/arch/arm/mm/proc-v7m.S b/arch/arm/mm/proc-v7m.S
-index 2b8eb97..42a0ed2 100644
+index 72ba7c3..48303fd 100644
--- a/arch/arm/mm/proc-v7m.S
+++ b/arch/arm/mm/proc-v7m.S
-@@ -58,6 +58,19 @@ ENTRY(cpu_v7m_switch_mm)
+@@ -59,6 +59,19 @@ ENTRY(cpu_v7m_switch_mm)
mov pc, lr
ENDPROC(cpu_v7m_switch_mm)
diff --git a/patches/linux-3.6/0018-ARM-efm32-add-trivial-suspend-support.patch b/patches/linux-3.8-rc5/0022-ARM-efm32-add-trivial-suspend-support.patch
index c096f67..c096f67 100644
--- a/patches/linux-3.6/0018-ARM-efm32-add-trivial-suspend-support.patch
+++ b/patches/linux-3.8-rc5/0022-ARM-efm32-add-trivial-suspend-support.patch
diff --git a/patches/linux-3.6/0019-HACK-ARM-increase-TASK_SIZE-for-MMU.patch b/patches/linux-3.8-rc5/0023-HACK-ARM-increase-TASK_SIZE-for-MMU.patch
index 5ec33f8..cdd8d29 100644
--- a/patches/linux-3.6/0019-HACK-ARM-increase-TASK_SIZE-for-MMU.patch
+++ b/patches/linux-3.8-rc5/0023-HACK-ARM-increase-TASK_SIZE-for-MMU.patch
@@ -15,7 +15,7 @@ Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
-index 5f6ddcc..6f36cf5 100644
+index 73cf03a..ab023e6 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -89,9 +89,12 @@
diff --git a/patches/linux-3.8-rc5/series b/patches/linux-3.8-rc5/series
new file mode 100644
index 0000000..e84ac64
--- /dev/null
+++ b/patches/linux-3.8-rc5/series
@@ -0,0 +1,26 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-ARM-make-cr_alignment-read-only-ifndef-CONFIG_CPU_CP.patch
+0002-ARM-let-CPUs-not-being-able-to-run-in-ARM-mode-enter.patch
+0003-ARM-sync-comments-about-available-data-abort-models-.patch
+0004-ARM-use-read_cpuid_id-instead-of-read_cpuid-CPUID_ID.patch
+0005-ARM-stub-out-read_cpuid-and-read_cpuid_ext-for-CPU_C.patch
+0006-mtd-uclinux-support-ROM-and-allow-passing-the-base-a.patch
+0007-mtd-uclinux-add-a-comment-about-why-uclinux_ram_map-.patch
+0008-serial-efm32-parse-location-property.patch
+0009-Cortex-M3-Add-base-support-for-Cortex-M3.patch
+0010-Cortex-M3-Add-support-for-exception-handling.patch
+0011-hwmon-efm32-adc-new-driver.patch
+0012-spi-new-controller-driver-for-efm32-SoCs.patch
+0013-Cortex-M3-Add-NVIC-support.patch
+0014-Cortex-M3-Allow-the-building-of-Cortex-M3-kernel-por.patch
+0015-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch
+0016-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch
+0017-pinctrl-add-a-driver-for-Energy-Micro-s-efm32-SoCs.patch
+0018-HACK-ARM-allow-a-bootloader-to-be-embedded-and-do-it.patch
+0019-HACK-don-t-reserve-memory-for-device-tree-if-it-s-be.patch
+0020-HACK-make-stack-dumps-provoked-by-BUG-a-bit-more-hel.patch
+0021-ARM-v7m-add-trivial-suspend-support.patch
+0022-ARM-efm32-add-trivial-suspend-support.patch
+0023-HACK-ARM-increase-TASK_SIZE-for-MMU.patch
+# 83f4722f8d8b5527b250fca17c57308a - git-ptx-patches magic
diff --git a/platformconfig b/platformconfig
index bbfc127..9a3ad9e 100644
--- a/platformconfig
+++ b/platformconfig
@@ -95,8 +95,8 @@ PTXCONF_TARGET_EXTRA_LDFLAGS="-march=armv7-m -mthumb"
PTXCONF_KERNEL=y
# PTXCONF_KERNEL_INSTALL is not set
# PTXCONF_KERNEL_MODULES is not set
-PTXCONF_KERNEL_VERSION="3.6"
-PTXCONF_KERNEL_MD5="1a1760420eac802c541a20ab51a093d1"
+PTXCONF_KERNEL_VERSION="3.8-rc5"
+PTXCONF_KERNEL_MD5="89f6b41e5a4fbffb9a1004460154ec5a"
PTXCONF_KERNEL_ARCH_STRING="arm"
# PTXCONF_KERNEL_IMAGE_BZ is not set
# PTXCONF_KERNEL_IMAGE_Z is not set