summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Kleine-König <uwe@kleine-koenig.org>2013-02-07 16:19:33 +0100
committerUwe Kleine-König <uwe@kleine-koenig.org>2013-02-07 16:19:33 +0100
commit582d37def535a3d19b3a260167a8fb89217e8b7d (patch)
treea1ed92f865bf81e41b8816216345f1f56149311e
parent7de09f733f36f38aa2cfdfec246b96ab0ff6da87 (diff)
parent4c7fd84c45806feaaf77ff6167380edb55449649 (diff)
downloadOSELAS.BSP-EnergyMicro-Gecko-582d37def535a3d19b3a260167a8fb89217e8b7d.tar.gz
OSELAS.BSP-EnergyMicro-Gecko-582d37def535a3d19b3a260167a8fb89217e8b7d.tar.xz
Merge branch 'platform-efm32gg-dk3750/master' of git-public.pengutronix.de:/OSELAS.BSP-EnergyMicro-Gecko.git
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/kernelconfig-3.8-rc5 (renamed from configs/platform-energymicro-efm32gg-dk3750/kernelconfig-3.6)348
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0008-HACK-ARM-no-we-don-t-enter-in-ARM.patch39
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0009-mtd-maps-uclinux-fix-sparse-warnings-and-codingstyle.patch162
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0010-mtd-maps-uclinux-add-support-for-romfs-in-RAM-or-ROM.patch175
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0013-pinctrl-add-a-driver-for-Energy-Micro-s-efm32-SoCs.patch516
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/series22
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0001-ARM-make-cr_alignment-read-only-ifndef-CONFIG_CPU_CP.patch (renamed from configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0003-ARM-make-cr_alignment-read-only-ifndef-CONFIG_CPU_CP.patch)33
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0002-ARM-let-CPUs-not-being-able-to-run-in-ARM-mode-enter.patch90
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0003-ARM-sync-comments-about-available-data-abort-models-.patch83
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0004-ARM-use-read_cpuid_id-instead-of-read_cpuid-CPUID_ID.patch86
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0005-ARM-stub-out-read_cpuid-and-read_cpuid_ext-for-CPU_C.patch79
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0006-mtd-uclinux-support-ROM-and-allow-passing-the-base-a.patch99
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0007-mtd-uclinux-add-a-comment-about-why-uclinux_ram_map-.patch38
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0008-serial-efm32-parse-location-property.patch119
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0009-Cortex-M3-Add-base-support-for-Cortex-M3.patch (renamed from configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0004-Cortex-M3-Add-base-support-for-Cortex-M3.patch)255
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0010-Cortex-M3-Add-support-for-exception-handling.patch (renamed from configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0005-Cortex-M3-Add-support-for-exception-handling.patch)59
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0011-hwmon-efm32-adc-new-driver.patch (renamed from configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0001-hwmon-efm32-adc-new-driver.patch)26
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0012-spi-new-controller-driver-for-efm32-SoCs.patch (renamed from configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0002-spi-new-controller-driver-for-efm32-SoCs.patch)65
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0013-Cortex-M3-Add-NVIC-support.patch (renamed from configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0006-Cortex-M3-Add-NVIC-support.patch)174
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0014-Cortex-M3-Allow-the-building-of-Cortex-M3-kernel-por.patch (renamed from configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0007-Cortex-M3-Allow-the-building-of-Cortex-M3-kernel-por.patch)77
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0015-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch (renamed from configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0011-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch)131
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0016-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch (renamed from configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0012-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch)342
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0017-efm-board-controller-driver.patch208
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0018-ARM-v7m-add-trivial-suspend-support.patch (renamed from configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0017-ARM-v7m-add-trivial-suspend-support.patch)18
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0019-ARM-efm32-add-trivial-suspend-support.patch (renamed from configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0018-ARM-efm32-add-trivial-suspend-support.patch)6
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0020-HACK-ARM-allow-a-bootloader-to-be-embedded-and-do-it.patch (renamed from configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0014-HACK-ARM-allow-a-bootloader-to-be-embedded-and-do-it.patch)114
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0021-HACK-don-t-reserve-memory-for-device-tree-if-it-s-be.patch (renamed from configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0015-HACK-don-t-reserve-memory-for-device-tree-if-it-s-be.patch)4
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0022-HACK-make-stack-dumps-provoked-by-BUG-a-bit-more-hel.patch (renamed from configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0016-HACK-make-stack-dumps-provoked-by-BUG-a-bit-more-hel.patch)2
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0023-HACK-ARM-increase-TASK_SIZE-for-MMU.patch (renamed from configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0019-HACK-ARM-increase-TASK_SIZE-for-MMU.patch)2
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0024-HACK-work-around-for-big-images.patch20
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/series27
-rw-r--r--configs/platform-energymicro-efm32gg-dk3750/platformconfig4
32 files changed, 1650 insertions, 1773 deletions
diff --git a/configs/platform-energymicro-efm32gg-dk3750/kernelconfig-3.6 b/configs/platform-energymicro-efm32gg-dk3750/kernelconfig-3.8-rc5
index 8dd8102..60c1854 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/kernelconfig-3.6
+++ b/configs/platform-energymicro-efm32gg-dk3750/kernelconfig-3.8-rc5
@@ -1,10 +1,9 @@
#
# 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
-CONFIG_GENERIC_GPIO=y
CONFIG_NO_IOPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
@@ -39,8 +38,9 @@ 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_POSIX_MQUEUE is not set
# CONFIG_FHANDLE is not set
+# CONFIG_AUDIT is not set
CONFIG_HAVE_GENERIC_HARDIRQS=y
#
@@ -50,6 +50,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 +63,13 @@ 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
+# CONFIG_TASKSTATS is not set
+
+#
# RCU Subsystem
#
CONFIG_TINY_RCU=y
@@ -71,19 +79,24 @@ 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
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=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_SYSCTL_SYSCALL 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 +128,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 +150,7 @@ CONFIG_BLOCK=y
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
+CONFIG_EFI_PARTITION=y
#
# IO Schedulers
@@ -142,69 +160,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
+# CONFIG_FREEZER is not set
#
# 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 +206,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_EFM32_NONDT=y
CONFIG_MACH_EFM32GG_DK3750=y
-# CONFIG_EFM32GG_DK3750_FPGA is not set
+# CONFIG_ARCH_VT8500 is not set
#
# Processor Type
@@ -230,7 +219,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 +245,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,14 +281,16 @@ 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_USE_OF=y
+CONFIG_ATAGS=y
+# CONFIG_DEPRECATED_PARAM_STRUCT is not set
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
+# CONFIG_ARM_APPENDED_DTB is not set
CONFIG_CMDLINE=""
CONFIG_XIP_KERNEL=y
CONFIG_XIP_PHYS_ADDR=0x00000000
@@ -331,24 +322,60 @@ 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
#
-CONFIG_SUSPEND=y
-CONFIG_SUSPEND_FREEZER=y
-CONFIG_PM_SLEEP=y
-# CONFIG_PM_AUTOSLEEP is not set
-# CONFIG_PM_WAKELOCKS is not set
+# CONFIG_SUSPEND is not set
# CONFIG_PM_RUNTIME is not set
-CONFIG_PM=y
-# CONFIG_PM_DEBUG is not set
-# CONFIG_APM_EMULATION is not set
-CONFIG_PM_CLK=y
-CONFIG_CPU_PM=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARM_CPU_SUSPEND=y
-# CONFIG_NET is not set
+# CONFIG_ARM_CPU_SUSPEND is not set
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_PACKET is not set
+# CONFIG_UNIX is not set
+# CONFIG_NET_KEY is not set
+# CONFIG_INET is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+CONFIG_HAVE_NET_DSA=y
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_PHONET is not set
+# CONFIG_IEEE802154 is not set
+# CONFIG_NET_SCHED is not set
+# CONFIG_DCB is not set
+# CONFIG_BATMAN_ADV is not set
+# CONFIG_OPENVSWITCH is not set
+CONFIG_BQL=y
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_WIRELESS is not set
+# CONFIG_WIMAX is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+# CONFIG_CAIF is not set
+# CONFIG_NFC is not set
CONFIG_HAVE_BPF_JIT=y
#
@@ -358,6 +385,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,10 +395,16 @@ 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_CONNECTOR is not set
CONFIG_MTD=y
# CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
# CONFIG_MTD_AFS_PARTS is not set
+CONFIG_MTD_OF_PARTS=y
# CONFIG_MTD_AR7_PARTS is not set
#
@@ -411,10 +446,8 @@ CONFIG_MTD_ROM=y
#
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_PHYSMAP_OF 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
#
@@ -440,6 +473,21 @@ CONFIG_MTD_UCLINUX_ROM=y
#
# CONFIG_MTD_LPDDR is not set
# CONFIG_MTD_UBI is not set
+CONFIG_DTC=y
+CONFIG_OF=y
+
+#
+# Device Tree and Open Firmware support
+#
+# CONFIG_PROC_DEVICETREE is not set
+# CONFIG_OF_SELFTEST is not set
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_DEVICE=y
+CONFIG_OF_NET=y
+CONFIG_OF_MTD=y
# CONFIG_PARPORT is not set
# CONFIG_BLK_DEV is not set
@@ -478,6 +526,61 @@ CONFIG_SCSI_MOD=y
# CONFIG_SCSI_NETLINK is not set
# CONFIG_ATA is not set
# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+CONFIG_NET_CORE=y
+# CONFIG_DUMMY is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_MII=y
+# CONFIG_NET_TEAM is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+
+#
+# CAIF transport drivers
+#
+
+#
+# Distributed Switch Architecture drivers
+#
+# CONFIG_NET_DSA_MV88E6XXX is not set
+# CONFIG_NET_DSA_MV88E6060 is not set
+# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set
+# CONFIG_NET_DSA_MV88E6131 is not set
+# CONFIG_NET_DSA_MV88E6123_61_65 is not set
+CONFIG_ETHERNET=y
+# CONFIG_NET_CADENCE is not set
+# CONFIG_NET_VENDOR_BROADCOM is not set
+# CONFIG_NET_CALXEDA_XGMAC is not set
+# CONFIG_NET_VENDOR_CIRRUS is not set
+# CONFIG_DM9000 is not set
+# CONFIG_DNET is not set
+# CONFIG_NET_VENDOR_FARADAY is not set
+# CONFIG_NET_VENDOR_INTEL is not set
+CONFIG_NET_VENDOR_MICREL=y
+CONFIG_KS8851=y
+# CONFIG_KS8851_MLL is not set
+# CONFIG_NET_VENDOR_MICROCHIP is not set
+# CONFIG_NET_VENDOR_NATSEMI is not set
+# CONFIG_ETHOC is not set
+# CONFIG_NET_VENDOR_SEEQ is not set
+# CONFIG_NET_VENDOR_SMSC is not set
+# CONFIG_NET_VENDOR_STMICRO is not set
+# CONFIG_NET_VENDOR_WIZNET is not set
+# CONFIG_PHYLIB is not set
+# CONFIG_MICREL_KS8995MA is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_WLAN is not set
+
+#
+# Enable WiMAX (Networking options) to see the WiMAX drivers
+#
+# CONFIG_WAN is not set
+# CONFIG_ISDN is not set
#
# Input device support
@@ -498,6 +601,7 @@ CONFIG_SCSI_MOD=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_N_HDLC is not set
+# CONFIG_N_GSM is not set
# CONFIG_TRACE_SINK is not set
# CONFIG_DEVKMEM is not set
# CONFIG_STALDRV is not set
@@ -511,16 +615,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
@@ -539,8 +644,6 @@ CONFIG_SPI_MASTER=y
# CONFIG_SPI_ALTERA is not set
CONFIG_SPI_BITBANG=y
CONFIG_SPI_EFM32=y
-# CONFIG_SPI_GPIO is not set
-# CONFIG_SPI_OC_TINY is not set
# CONFIG_SPI_PXA2XX_PCI is not set
# CONFIG_SPI_XILINX is not set
# CONFIG_SPI_DESIGNWARE is not set
@@ -564,84 +667,17 @@ 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_PINCTRL=y
-
-#
-# Pin controllers
-#
-CONFIG_PINMUX=y
-CONFIG_PINCONF=y
-# CONFIG_DEBUG_PINCTRL is not set
-CONFIG_PINCTRL_EFM32=y
+# CONFIG_PTP_1588_CLOCK_PCH is not set
CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
-CONFIG_ARCH_REQUIRE_GPIOLIB=y
-CONFIG_GPIOLIB=y
-# CONFIG_DEBUG_GPIO is not set
-CONFIG_GPIO_SYSFS=y
-
-#
-# Memory mapped GPIO drivers:
-#
-# CONFIG_GPIO_GENERIC_PLATFORM is not set
-# CONFIG_GPIO_EM is not set
-
-#
-# I2C GPIO expanders:
-#
-
-#
-# PCI GPIO expanders:
-#
-
-#
-# SPI GPIO expanders:
-#
-# CONFIG_GPIO_MAX7301 is not set
-# CONFIG_GPIO_MCP23S08 is not set
-# CONFIG_GPIO_MC33880 is not set
-# CONFIG_GPIO_74X164 is not set
-
-#
-# AC97 GPIO expanders:
-#
-
-#
-# MODULbus GPIO expanders:
-#
# CONFIG_W1 is not set
# CONFIG_POWER_SUPPLY is not set
# CONFIG_POWER_AVS is not set
-CONFIG_HWMON=y
-# CONFIG_HWMON_VID is not set
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Native drivers
-#
-# CONFIG_SENSORS_AD7314 is not set
-# CONFIG_SENSORS_ADCXX is not set
-CONFIG_SENSORS_EFM32_ADC=y
-# CONFIG_SENSORS_F71805F is not set
-# CONFIG_SENSORS_F71882FG is not set
-# CONFIG_SENSORS_GPIO_FAN is not set
-# CONFIG_SENSORS_IT87 is not set
-# CONFIG_SENSORS_LM70 is not set
-# CONFIG_SENSORS_MAX1111 is not set
-# CONFIG_SENSORS_NTC_THERMISTOR is not set
-# CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_PC87427 is not set
-# CONFIG_SENSORS_SHT15 is not set
-# CONFIG_SENSORS_SMSC47M1 is not set
-# CONFIG_SENSORS_SMSC47B397 is not set
-# CONFIG_SENSORS_SCH56XX_COMMON is not set
-# CONFIG_SENSORS_ADS7871 is not set
-# CONFIG_SENSORS_VT1211 is not set
-# CONFIG_SENSORS_W83627HF is not set
-# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON is not set
# CONFIG_THERMAL is not set
# CONFIG_WATCHDOG is not set
CONFIG_SSB_POSSIBLE=y
@@ -660,12 +696,10 @@ CONFIG_BCMA_POSSIBLE=y
#
# Multifunction device drivers
#
-# CONFIG_MFD_CORE is not set
+CONFIG_MFD_CORE=y
# CONFIG_MFD_SM501 is not set
-# CONFIG_MFD_ASIC3 is not set
-# CONFIG_HTC_EGPIO is not set
+# CONFIG_MFD_TI_AM335X_TSCADC is not set
# CONFIG_HTC_PASIC3 is not set
-# CONFIG_MFD_TPS65912_SPI is not set
# CONFIG_MFD_STMPE is not set
# CONFIG_MFD_TMIO is not set
# CONFIG_MFD_T7L66XB is not set
@@ -677,6 +711,8 @@ CONFIG_BCMA_POSSIBLE=y
# CONFIG_MFD_MC13XXX_SPI is not set
# CONFIG_ABX500_CORE is not set
# CONFIG_EZX_PCAP is not set
+# CONFIG_MFD_SYSCON is not set
+CONFIG_MFD_EFM32BOARD=y
# CONFIG_REGULATOR is not set
# CONFIG_MEDIA_SUPPORT is not set
@@ -707,7 +743,6 @@ CONFIG_RTC_LIB=y
#
# Virtio drivers
#
-# CONFIG_VIRTIO_BALLOON is not set
# CONFIG_VIRTIO_MMIO is not set
#
@@ -724,6 +759,7 @@ CONFIG_CLKSRC_MMIO=y
#
# Remoteproc drivers (EXPERIMENTAL)
#
+# CONFIG_STE_MODEM_RPROC is not set
#
# Rpmsg drivers (EXPERIMENTAL)
@@ -734,6 +770,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
@@ -778,7 +815,8 @@ CONFIG_CLKSRC_MMIO=y
#
# Pseudo filesystems
#
-# CONFIG_PROC_FS is not set
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
CONFIG_SYSFS=y
# CONFIG_HUGETLB_PAGE is not set
# CONFIG_CONFIGFS_FS is not set
@@ -808,6 +846,8 @@ 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_NETWORK_FILESYSTEMS is not set
# CONFIG_NLS is not set
#
@@ -828,12 +868,15 @@ 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_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS 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
@@ -846,8 +889,7 @@ CONFIG_PANIC_ON_OOPS_VALUE=0
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_BUGVERBOSE is not set
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_INFO_REDUCED is not set
+# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_NOMMU_REGIONS is not set
# CONFIG_DEBUG_WRITECOUNT is not set
@@ -865,7 +907,9 @@ CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP 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 +922,12 @@ CONFIG_HAVE_ARCH_KGDB=y
CONFIG_ARM_UNWIND=y
# CONFIG_DEBUG_USER is not set
# CONFIG_DEBUG_LL is not set
+# CONFIG_DEBUG_EFM32_USART1 is not set
+# CONFIG_DEBUG_EFM32_UART1 is not set
+# CONFIG_DEBUG_LL_UART_NONE is not set
+# CONFIG_DEBUG_ICEDCC is not set
+# CONFIG_DEBUG_SEMIHOSTING is not set
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
#
# Security options
@@ -899,6 +949,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 +967,9 @@ CONFIG_CRC32_SLICEBY8=y
# CONFIG_XZ_DEC_BCJ is not set
CONFIG_HAS_IOMEM=y
CONFIG_HAS_DMA=y
+CONFIG_DQL=y
+CONFIG_NLATTR=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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0008-HACK-ARM-no-we-don-t-enter-in-ARM.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0008-HACK-ARM-no-we-don-t-enter-in-ARM.patch
deleted file mode 100644
index 428dc04..0000000
--- a/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0009-mtd-maps-uclinux-fix-sparse-warnings-and-codingstyle.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0009-mtd-maps-uclinux-fix-sparse-warnings-and-codingstyle.patch
deleted file mode 100644
index 1728d74..0000000
--- a/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0010-mtd-maps-uclinux-add-support-for-romfs-in-RAM-or-ROM.patch b/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0013-pinctrl-add-a-driver-for-Energy-Micro-s-efm32-SoCs.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0013-pinctrl-add-a-driver-for-Energy-Micro-s-efm32-SoCs.patch
deleted file mode 100644
index b071525..0000000
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0013-pinctrl-add-a-driver-for-Energy-Micro-s-efm32-SoCs.patch
+++ /dev/null
@@ -1,516 +0,0 @@
-From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
-Date: Thu, 8 Dec 2011 23:37:41 +0100
-Subject: [PATCH] pinctrl: add a driver for Energy Micro's efm32 SoCs
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-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 +++++++++++++++++++++++++++
- include/linux/platform_data/efm32-pinctrl.h | 47 +++
- 4 files changed, 465 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
---- 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.
-
-+config PINCTRL_EFM32
-+ bool "EFM32 pin controller driver"
-+ depends on ARCH_EFM32
-+ default y
-+ select PINMUX
-+
- config PINCTRL_IMX
- bool
- select PINMUX
-diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
-index f40b1f8..a871d0f 100644
---- a/drivers/pinctrl/Makefile
-+++ b/drivers/pinctrl/Makefile
-@@ -9,6 +9,7 @@ ifeq ($(CONFIG_OF),y)
- obj-$(CONFIG_PINCTRL) += devicetree.o
- endif
- obj-$(CONFIG_GENERIC_PINCONF) += pinconf-generic.o
-+obj-$(CONFIG_PINCTRL_EFM32) += pinctrl-efm32.o
- obj-$(CONFIG_PINCTRL_IMX) += pinctrl-imx.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
---- /dev/null
-+++ b/drivers/pinctrl/pinctrl-efm32.c
-@@ -0,0 +1,411 @@
-+#include <linux/module.h>
-+#include <linux/gpio.h>
-+#include <linux/slab.h>
-+#include <linux/platform_device.h>
-+#include <linux/irq.h>
-+#include <asm/io.h>
-+#include <asm/mach/irq.h>
-+#include <linux/platform_data/efm32-pinctrl.h>
-+
-+#define DRIVER_NAME "efm32-pinctrl"
-+
-+#define EFM32_REG_Px_CTRL 0x000
-+#define EFM32_REG_Px_MODEL 0x004
-+#define EFM32_REG_Px_MODEH 0x008
-+#define EFM32_REG_Px_DOUTSET 0x010
-+#define EFM32_REG_Px_DOUTCLR 0x014
-+#define EFM32_REG_Px_DIN 0x01c
-+
-+#define EFM32_REG_EXTIPSELL 0x100
-+#define EFM32_REG_EXTIPSELH 0x104
-+#define EFM32_REG_EXTIRISE 0x108
-+#define EFM32_REG_EXTIFALL 0x10c
-+#define EFM32_REG_IEN 0x110
-+#define EFM32_REG_IF 0x114
-+#define EFM32_REG_IFS 0x118
-+#define EFM32_REG_IFC 0x11c
-+
-+struct efm32_pinctrl_ddata {
-+ struct platform_device *pdev;
-+ spinlock_t lock;
-+ struct irq_chip ic;
-+ struct gpio_chip gc;
-+ void __iomem *base;
-+
-+ /* -1 = unused, 0 -> irq triggers on port A, ... */
-+ s8 irqport[16];
-+
-+ /* shadow values */
-+ u32 ien;
-+ u32 extirise, extifall;
-+
-+ /* track level sensitivity which is emulated using edge triggering */
-+ u32 extilow, extihigh;
-+};
-+
-+#define from_gpio_chip(chip) container_of((chip), struct efm32_pinctrl_ddata, gc)
-+
-+static void __efm32_pinctrl_set_mode(struct efm32_pinctrl_ddata *ddata,
-+ unsigned pin, unsigned mode, unsigned dout)
-+{
-+ unsigned bank = pin / 16;
-+ unsigned bankpin = pin % 16;
-+ unsigned bank_regoff = bank * 0x24;
-+ unsigned mode_regoff = bankpin < 8 ? EFM32_REG_Px_MODEL : EFM32_REG_Px_MODEH;
-+ unsigned dout_regoff = dout ? EFM32_REG_Px_DOUTSET : EFM32_REG_Px_DOUTCLR;
-+ u32 regmode;
-+
-+ if (mode & 0xf)
-+ writel(1 << bankpin, ddata->base + bank_regoff + dout_regoff);
-+
-+ regmode = readl(ddata->base + bank_regoff + mode_regoff);
-+
-+ regmode &= ~(0xf << (4 * (bankpin % 8)));
-+ regmode |= (mode & 0xf) << (4 * (bankpin % 8));
-+
-+ writel(regmode, ddata->base + bank_regoff + mode_regoff);
-+
-+ if (!(mode & 0xf))
-+ writel(1 << bankpin, ddata->base + bank_regoff + dout_regoff);
-+
-+}
-+static void efm32_pinctrl_set_mode(struct efm32_pinctrl_ddata *ddata,
-+ unsigned pin, unsigned mode, unsigned dout)
-+{
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&ddata->lock, flags);
-+ __efm32_pinctrl_set_mode(ddata, pin, mode, dout);
-+ spin_unlock_irqrestore(&ddata->lock, flags);
-+}
-+
-+static int efm32_pinctrl_gpio_direction_input(struct gpio_chip *chip,
-+ unsigned offset)
-+{
-+ struct efm32_pinctrl_ddata *ddata = from_gpio_chip(chip);
-+ struct efm32_pinctrl_pdata *pdata = dev_get_platdata(&ddata->pdev->dev);
-+
-+ dev_dbg(&ddata->pdev->dev, "%s(%u)\n", __func__, offset);
-+
-+ if (!pdata || !(pdata->pindef[offset].flags &
-+ EFM32_PINCTRL_FLAG_GPIOIN)) {
-+ dev_dbg(&ddata->pdev->dev, "%s(%u) -> EINVAL\n", __func__, offset);
-+ return -EINVAL;
-+ }
-+
-+ efm32_pinctrl_set_mode(ddata, offset,
-+ pdata->pindef[offset].mode_gpio_in & 0xf,
-+ pdata->pindef[offset].mode_gpio_in & 0x10);
-+
-+ return 0;
-+}
-+
-+static int efm32_pinctrl_gpio_get(struct gpio_chip *chip, unsigned offset)
-+{
-+ struct efm32_pinctrl_ddata *ddata = from_gpio_chip(chip);
-+ unsigned bank = offset / 16;
-+ unsigned bankpin = offset % 16;
-+ unsigned bank_regoff = bank * 0x24;
-+ u32 regdin;
-+
-+ regdin = readl(ddata->base + bank_regoff + EFM32_REG_Px_DIN);
-+ dev_dbg(&ddata->pdev->dev, "%s(%u) -> %x\n", __func__,
-+ offset, regdin & (1 << bankpin));
-+
-+ return regdin & (1 << bankpin);
-+}
-+
-+static int efm32_pinctrl_gpio_direction_output(struct gpio_chip *chip,
-+ unsigned offset, int value)
-+{
-+ struct efm32_pinctrl_ddata *ddata = from_gpio_chip(chip);
-+ struct efm32_pinctrl_pdata *pdata = dev_get_platdata(&ddata->pdev->dev);
-+
-+ dev_dbg(&ddata->pdev->dev, "%s(%u, %d)\n", __func__, offset, value);
-+
-+ if (!pdata || !(pdata->pindef[offset].flags &
-+ EFM32_PINCTRL_FLAG_GPIOOUT)) {
-+ dev_dbg(&ddata->pdev->dev, "%s(%u) -> EINVAL\n", __func__, offset);
-+ return -EINVAL;
-+ }
-+
-+ efm32_pinctrl_set_mode(ddata, offset,
-+ pdata->pindef[offset].mode_gpio_out & 0xf, value);
-+ return 0;
-+}
-+
-+static void efm32_pinctrl_gpio_set(struct gpio_chip *chip,
-+ unsigned offset, int value)
-+{
-+ struct efm32_pinctrl_ddata *ddata = from_gpio_chip(chip);
-+ unsigned bank = offset / 16;
-+ unsigned bankpin = offset % 16;
-+ unsigned bank_regoff = bank * 0x24;
-+ unsigned dout_regoff = value ?
-+ EFM32_REG_Px_DOUTSET : EFM32_REG_Px_DOUTCLR;
-+
-+ dev_dbg(&ddata->pdev->dev, "%s(%u, %d)\n", __func__, offset, value);
-+
-+ writel(1 << bankpin, ddata->base + bank_regoff + dout_regoff);
-+}
-+
-+/* XXX */
-+#define EFM32_GPIO_IRQ_OFFSET 50
-+
-+static int efm32_pinctrl_gpio_to_irq(struct gpio_chip *chip,
-+ unsigned offset)
-+{
-+ struct efm32_pinctrl_ddata *ddata = from_gpio_chip(chip);
-+
-+ unsigned bank = offset / 16;
-+ unsigned bankpin = offset % 16;
-+ unsigned extipsel_refoff = bankpin < 8 ? EFM32_REG_EXTIPSELL : EFM32_REG_EXTIPSELH;
-+ u32 extipsel;
-+ unsigned long flags;
-+
-+ int ret = bankpin + EFM32_GPIO_IRQ_OFFSET;
-+
-+ spin_lock_irqsave(&ddata->lock, flags);
-+ if (ddata->irqport[bankpin] >= 0 && ddata->irqport[bankpin] != bank) {
-+ ret = -EINVAL;
-+ goto out_unlock;
-+ }
-+
-+ ddata->irqport[bankpin] = bank;
-+
-+ extipsel = readl(ddata->base + extipsel_refoff);
-+ extipsel &= ~(0x7 << 4 * (bankpin % 8));
-+ extipsel |= bank << 4 * (bankpin % 8);
-+
-+ writel(extipsel, ddata->base + extipsel_refoff);
-+
-+out_unlock:
-+ spin_unlock_irqrestore(&ddata->lock, flags);
-+
-+ return ret;
-+}
-+
-+#define from_irq_chip(chip) container_of((chip), struct efm32_pinctrl_ddata, ic)
-+#define from_irq_data(data) from_irq_chip(irq_data_get_irq_chip((data)))
-+#define efm32irq(data) (((data)->irq - EFM32_GPIO_IRQ_OFFSET) & 0xf)
-+
-+static void efm32_pinctrl_irq_ack(struct irq_data *data)
-+{
-+ struct efm32_pinctrl_ddata *ddata = from_irq_data(data);
-+
-+ writel(1 << efm32irq(data), ddata->base + EFM32_REG_IFC);
-+}
-+
-+static void efm32_pinctrl_irq_mask(struct irq_data *data)
-+{
-+ struct efm32_pinctrl_ddata *ddata = from_irq_data(data);
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&ddata->lock, flags);
-+
-+ ddata->ien &= ~(1 << efm32irq(data));
-+ writel(ddata->ien, ddata->base + EFM32_REG_IEN);
-+
-+ spin_unlock_irqrestore(&ddata->lock, flags);
-+}
-+
-+static void efm32_pinctrl_irq_unmask(struct irq_data *data)
-+{
-+ struct efm32_pinctrl_ddata *ddata = from_irq_data(data);
-+ unsigned long flags;
-+ u32 bitmask = 1 << efm32irq(data);
-+
-+ spin_lock_irqsave(&ddata->lock, flags);
-+
-+ ddata->ien |= bitmask;
-+ writel(ddata->ien, ddata->base + EFM32_REG_IEN);
-+
-+ BUG_ON(ddata->irqport[efm32irq(data)] < 0);
-+
-+ /* retrigger irq on level sensitivity */
-+ if ((ddata->extilow | ddata->extihigh) & bitmask) {
-+ u32 din = readl(ddata->base + 0x24 * ddata->irqport[efm32irq(data)] + EFM32_REG_Px_DIN);
-+ if ((din ^ ddata->extilow) & bitmask)
-+ writel(bitmask, ddata->base + EFM32_REG_IFS);
-+ }
-+
-+ spin_unlock_irqrestore(&ddata->lock, flags);
-+}
-+
-+static int efm32_pinctrl_irq_set_type(struct irq_data *data,
-+ unsigned int flow_type)
-+{
-+ struct efm32_pinctrl_ddata *ddata = from_irq_data(data);
-+ unsigned long flags;
-+
-+ if ((flow_type & IRQ_TYPE_LEVEL_MASK) == IRQ_TYPE_LEVEL_MASK)
-+ return -EINVAL;
-+
-+ spin_lock_irqsave(&ddata->lock, flags);
-+
-+ ddata->extirise &= ~(1 << efm32irq(data));
-+ if (flow_type & IRQ_TYPE_EDGE_RISING)
-+ ddata->extirise |= 1 << efm32irq(data);
-+
-+ ddata->extifall &= ~(1 << efm32irq(data));
-+ if (flow_type & IRQ_TYPE_EDGE_FALLING)
-+ ddata->extifall |= 1 << efm32irq(data);
-+
-+ /*
-+ * There is no explict way to trigger on level sensitive irqs, so
-+ * trigger on the corresponding edge and set the irq pending in the
-+ * unmask irq callback if the level matches the corresponding level.
-+ */
-+ ddata->extilow &= ~(1 << efm32irq(data));
-+ ddata->extihigh &= ~(1 << efm32irq(data));
-+ if (flow_type & IRQ_TYPE_LEVEL_LOW) {
-+ ddata->extilow |= 1 << efm32irq(data);
-+ ddata->extifall |= 1 << efm32irq(data);
-+ } else if (flow_type & IRQ_TYPE_LEVEL_HIGH) {
-+ ddata->extihigh |= 1 << efm32irq(data);
-+ ddata->extirise |= 1 << efm32irq(data);
-+ }
-+
-+ writel(ddata->extirise, ddata->base + EFM32_REG_EXTIRISE);
-+ writel(ddata->extifall, ddata->base + EFM32_REG_EXTIFALL);
-+
-+ spin_unlock_irqrestore(&ddata->lock, flags);
-+
-+ return 0;
-+}
-+
-+static void efm32_pinctrl_gpio_handler(unsigned int irq, struct irq_desc *desc, u32 mask)
-+{
-+ struct irq_chip *parent_chip = irq_get_chip(irq);
-+ struct efm32_pinctrl_ddata *ddata = irq_get_handler_data(irq);
-+ u32 iflag;
-+
-+ chained_irq_enter(parent_chip, desc);
-+
-+ iflag = readl(ddata->base + EFM32_REG_IF);
-+ iflag &= mask;
-+ while (iflag) {
-+ int bit = __ffs(iflag);
-+
-+ generic_handle_irq(EFM32_GPIO_IRQ_OFFSET + bit);
-+ iflag &= ~BIT(bit);
-+ }
-+
-+ chained_irq_exit(parent_chip, desc);
-+}
-+
-+static void efm32_pinctrl_gpio_handler_even(unsigned int irq, struct irq_desc *desc)
-+{
-+ efm32_pinctrl_gpio_handler(irq, desc, 0x5555);
-+}
-+
-+static void efm32_pinctrl_gpio_handler_odd(unsigned int irq, struct irq_desc *desc)
-+{
-+ efm32_pinctrl_gpio_handler(irq, desc, 0xaaaa);
-+}
-+
-+static int __devinit efm32_pinctrl_probe(struct platform_device *pdev)
-+{
-+ struct efm32_pinctrl_ddata *ddata;
-+ struct efm32_pinctrl_pdata *pdata;
-+ struct resource *res;
-+ int ret, i;
-+
-+ ddata = kzalloc(sizeof(*ddata), GFP_KERNEL);
-+ if (!ddata)
-+ return -ENOMEM;
-+
-+ ddata->pdev = pdev;
-+
-+ spin_lock_init(&ddata->lock);
-+
-+ for (i = 0; i < ARRAY_SIZE(ddata->irqport); ++i)
-+ ddata->irqport[i] = -1;
-+
-+ ddata->ic.name = "efm32 gpio";
-+ ddata->ic.irq_ack = efm32_pinctrl_irq_ack;
-+ ddata->ic.irq_mask = efm32_pinctrl_irq_mask;
-+ ddata->ic.irq_unmask = efm32_pinctrl_irq_unmask;
-+ ddata->ic.irq_set_type = efm32_pinctrl_irq_set_type;
-+
-+ ddata->gc.label = "efm32 gpio";
-+ ddata->gc.dev = &pdev->dev;
-+ ddata->gc.owner = THIS_MODULE;
-+ ddata->gc.direction_input = efm32_pinctrl_gpio_direction_input;
-+ ddata->gc.get = efm32_pinctrl_gpio_get;
-+ ddata->gc.direction_output = efm32_pinctrl_gpio_direction_output;
-+ ddata->gc.set = efm32_pinctrl_gpio_set;
-+ ddata->gc.to_irq = efm32_pinctrl_gpio_to_irq;
-+ ddata->gc.ngpio = 6 * 16;
-+ ddata->gc.base = 0;
-+
-+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-+ if (!res) {
-+ ret = -ENODEV;
-+ dev_dbg(&pdev->dev, "getting base address failed\n");
-+ goto err_get_base;
-+ }
-+
-+ ddata->base = ioremap(res->start, 0x140);
-+ if (!ddata->base) {
-+ ret = -ENOMEM;
-+ dev_dbg(&pdev->dev, "failed to remap\n");
-+ 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(11 /* IRQ_GPIO_ODD */, efm32_pinctrl_gpio_handler_odd);
-+ irq_set_handler_data(11, ddata);
-+
-+ for (i = 0; i < 16; ++i) {
-+ irq_set_chip_and_handler(EFM32_GPIO_IRQ_OFFSET + i, &ddata->ic,
-+ handle_level_irq);
-+ set_irq_flags(EFM32_GPIO_IRQ_OFFSET + i, IRQF_VALID);
-+ }
-+
-+ pdata = dev_get_platdata(&pdev->dev);
-+ if (pdata) {
-+ for (i = 0; i < ARRAY_SIZE(pdata->pindef); ++i)
-+ if (pdata->pindef[i].mode_initial > 0) {
-+ unsigned mode =
-+ pdata->pindef[i].mode_initial & 0xf;
-+ unsigned dout =
-+ pdata->pindef[i].mode_initial & 0x10;
-+
-+ __efm32_pinctrl_set_mode(ddata, i, mode, dout);
-+ }
-+ }
-+
-+ ret = gpiochip_add(&ddata->gc);
-+ if (ret) {
-+ dev_dbg(&pdev->dev, "failed to add gpio chip");
-+
-+ iounmap(ddata->base);
-+err_ioremap:
-+err_get_base:
-+
-+ kfree(ddata);
-+ }
-+
-+ dev_dbg(&pdev->dev, "%s returns %d\n", __func__, ret);
-+ return ret;
-+}
-+
-+static struct platform_driver efm32_pinctrl_driver = {
-+ .driver = {
-+ .name = DRIVER_NAME,
-+ .owner = THIS_MODULE,
-+ },
-+ .probe = efm32_pinctrl_probe,
-+};
-+
-+static int __init efm32_pinctrl_init(void)
-+{
-+ return platform_driver_register(&efm32_pinctrl_driver);
-+}
-+postcore_initcall(efm32_pinctrl_init);
-+
-+MODULE_AUTHOR("Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>");
-+MODULE_LICENSE("GPL v2");
-diff --git a/include/linux/platform_data/efm32-pinctrl.h b/include/linux/platform_data/efm32-pinctrl.h
-new file mode 100644
-index 0000000..3602f67
---- /dev/null
-+++ b/include/linux/platform_data/efm32-pinctrl.h
-@@ -0,0 +1,47 @@
-+#ifndef __LINUX_PLATFORM_DATA_EFM32_PINCTRL_H__
-+#define __LINUX_PLATFORM_DATA_EFM32_PINCTRL_H__
-+
-+#define EFM32_MODE_DISABLED 0x00
-+#define EFM32_MODE_INPUT 0x01
-+#define EFM32_MODE_INPUTFILTER 0x11
-+#define EFM32_MODE_INPUTPULLDOWN 0x02
-+#define EFM32_MODE_INPUTPULLUP 0x12
-+#define EFM32_MODE_INPUTPULLDOWNFILTER 0x03
-+#define EFM32_MODE_INPUTPULLUPFILTER 0x13
-+#define EFM32_MODE_PUSHPULL 0x04
-+#define EFM32_MODE_PUSHPULLDRIVE 0x05
-+#define EFM32_MODE_WIREDOR 0x06
-+#define EFM32_MODE_WIREDORPULLDOWN 0x07
-+#define EFM32_MODE_WIREDAND 0x08
-+#define EFM32_MODE_WIREDANDFILTER 0x09
-+#define EFM32_MODE_WIREDANDPULLUP 0x0a
-+#define EFM32_MODE_WIREDANDPULLUPFILTER 0x0b
-+#define EFM32_MODE_WIREDANDDRIVE 0x0c
-+#define EFM32_MODE_WIREDANDDRIVEFILTER 0x0d
-+#define EFM32_MODE_WIREDANDDRIVEPULLUP 0x0e
-+#define EFM32_MODE_WIREDANDDRIVEPULLUPFILTER 0x0f
-+
-+struct efm32_pinctrl_pindef {
-+#define EFM32_PINCTRL_FLAG_INITIAL 1
-+#define EFM32_PINCTRL_FLAG_GPIOIN 2
-+#define EFM32_PINCTRL_FLAG_GPIOOUT 4
-+
-+ unsigned short flags;
-+
-+ /*
-+ * These either take a value of the form
-+ * ,-4-+-3-----0-.
-+ * |DAT| MODE |
-+ * `---+---------'
-+ * with MODE being one of the EFM32_MODE_... above and DAT being the
-+ * value written to DOUT (which matters also for the input modes).
-+ */
-+ unsigned short mode_initial;
-+ unsigned short mode_gpio_in, mode_gpio_out;
-+};
-+
-+struct efm32_pinctrl_pdata {
-+ struct efm32_pinctrl_pindef pindef[96];
-+};
-+
-+#endif /* ifndef __LINUX_PLATFORM_DATA_EFM32_PINCTRL_H__ */
diff --git a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/series b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/series
deleted file mode 100644
index 4e1cd15..0000000
--- a/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0003-ARM-make-cr_alignment-read-only-ifndef-CONFIG_CPU_CP.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0001-ARM-make-cr_alignment-read-only-ifndef-CONFIG_CPU_CP.patch
index 33f3731..a6d86ce 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0003-ARM-make-cr_alignment-read-only-ifndef-CONFIG_CPU_CP.patch
+++ b/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0002-ARM-let-CPUs-not-being-able-to-run-in-ARM-mode-enter.patch b/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0003-ARM-sync-comments-about-available-data-abort-models-.patch b/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0004-ARM-use-read_cpuid_id-instead-of-read_cpuid-CPUID_ID.patch b/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0005-ARM-stub-out-read_cpuid-and-read_cpuid_ext-for-CPU_C.patch b/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0006-mtd-uclinux-support-ROM-and-allow-passing-the-base-a.patch b/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0007-mtd-uclinux-add-a-comment-about-why-uclinux_ram_map-.patch b/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0008-serial-efm32-parse-location-property.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0008-serial-efm32-parse-location-property.patch
new file mode 100644
index 0000000..76bf1c1
--- /dev/null
+++ b/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0004-Cortex-M3-Add-base-support-for-Cortex-M3.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0009-Cortex-M3-Add-base-support-for-Cortex-M3.patch
index 0dbb461..edd02e3 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0004-Cortex-M3-Add-base-support-for-Cortex-M3.patch
+++ b/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0005-Cortex-M3-Add-support-for-exception-handling.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0010-Cortex-M3-Add-support-for-exception-handling.patch
index 1394799..64c1b3e 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0005-Cortex-M3-Add-support-for-exception-handling.patch
+++ b/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0001-hwmon-efm32-adc-new-driver.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0011-hwmon-efm32-adc-new-driver.patch
index 56e38db..b8258c9 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0001-hwmon-efm32-adc-new-driver.patch
+++ b/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0002-spi-new-controller-driver-for-efm32-SoCs.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0012-spi-new-controller-driver-for-efm32-SoCs.patch
index bf85cf7..9b11e21 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0002-spi-new-controller-driver-for-efm32-SoCs.patch
+++ b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0012-spi-new-controller-driver-for-efm32-SoCs.patch
@@ -5,6 +5,9 @@ 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 +
@@ -14,10 +17,10 @@ Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
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,7 +46,7 @@ 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..5964d01
--- /dev/null
+++ b/drivers/spi/spi-efm32.c
@@ -0,0 +1,456 @@
@@ -145,31 +148,11 @@ index 0000000..85b252a
+ return readl_relaxed(ddata->base + offset);
+}
+
-+static const struct gpio usart1_gpios[] = {
-+ {
-+ .gpio = 48,
-+ .flags = GPIOF_OUT_INIT_LOW,
-+ .label = DRIVER_NAME,
-+ }, {
-+ .gpio = 49,
-+ .flags = GPIOF_IN,
-+ .label = DRIVER_NAME,
-+ }, {
-+ .gpio = 50,
-+ .flags = GPIOF_OUT_INIT_LOW,
-+ .label = DRIVER_NAME,
-+ }, {
-+ .gpio = 51,
-+ .flags = GPIOF_OUT_INIT_HIGH,
-+ .label = DRIVER_NAME,
-+ },
-+};
-+
+static int efm32_spi_setup(struct spi_device *spi)
+{
+ pr_debug("%s\n", __func__);
+
-+ return gpio_request_array(usart1_gpios, ARRAY_SIZE(usart1_gpios));
++ return 0;
+
+}
+
@@ -180,10 +163,16 @@ index 0000000..85b252a
+
+static void efm32_spi_chipselect(struct spi_device *spi, int is_on)
+{
-+ int gpio = /* XXX */51;
+ int value = !(spi->mode & SPI_CS_HIGH) == !(is_on == BITBANG_CS_ACTIVE);
++ void __iomem *addr;
++
++ /* XXX */
++ if (!value)
++ addr = (void *)0x40006080;
++ else
++ addr = (void *)0x4000607c;
+
-+ gpio_set_value(gpio, value);
++ writel(0x8, addr);
+}
+
+static int efm32_spi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
@@ -358,7 +347,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;
@@ -375,6 +364,8 @@ index 0000000..85b252a
+ }
+ platform_set_drvdata(pdev, master);
+
++ master->dev.of_node = pdev->dev.of_node;
++
+ master->bus_num = pdev->id;
+ master->num_chipselect = 1;
+ master->setup = efm32_spi_setup;
@@ -474,7 +465,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,15 +477,27 @@ index 0000000..85b252a
+ platform_set_drvdata(pdev, NULL);
+ spi_master_put(master);
+ kfree(master);
++
++ return 0;
+}
+
++static const struct of_device_id efm32_spi_dt_ids[] = {
++ {
++ .compatible = "efm32,spi",
++ }, {
++ /* sentinel */
++ }
++};
++MODULE_DEVICE_TABLE(of, efm32_uart_dt_ids);
++
+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,
+ .owner = THIS_MODULE,
++ .of_match_table = efm32_spi_dt_ids,
+ },
+};
+module_platform_driver(efm32_spi_driver);
diff --git a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0006-Cortex-M3-Add-NVIC-support.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0013-Cortex-M3-Add-NVIC-support.patch
index d4f0912..afbb98d 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0006-Cortex-M3-Add-NVIC-support.patch
+++ b/configs/platform-energymicro-efm32gg-dk3750/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..bac0207
--- /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/of_address.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;
++ }
++ 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..dc9ec11
--- /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;
++int nvic_of_init(struct device_node *node, struct device_node *parent);
+
+#endif
diff --git a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0007-Cortex-M3-Allow-the-building-of-Cortex-M3-kernel-por.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0014-Cortex-M3-Allow-the-building-of-Cortex-M3-kernel-por.patch
index c5aadf4..77faa45 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0007-Cortex-M3-Allow-the-building-of-Cortex-M3-kernel-por.patch
+++ b/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0011-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0015-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch
index 4f1ad9f..304e80a 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0011-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch
+++ b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0015-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch
@@ -7,27 +7,16 @@ 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 +
- arch/arm/boot/dts/efm32gg-dk3750.dts | 41 ++++++
+ arch/arm/boot/dts/efm32gg-dk3750.dts | 69 ++++++++++
arch/arm/mach-efm32/Makefile | 3 +
arch/arm/mach-efm32/Makefile.boot | 1 +
arch/arm/mach-efm32/clk.c | 38 ++++++
arch/arm/mach-efm32/cmu.h | 11 ++
arch/arm/mach-efm32/common.h | 1 +
- arch/arm/mach-efm32/dtmachine.c | 47 +++++++
+ arch/arm/mach-efm32/dtmachine.c | 43 ++++++
arch/arm/mach-efm32/include/mach/debug-macro.S | 48 +++++++
arch/arm/mach-efm32/include/mach/entry-macro.S | 12 ++
arch/arm/mach-efm32/include/mach/io.h | 6 +
@@ -35,7 +24,7 @@ id:1324480428-13344-1-git-send-email-u.kleine-koenig@pengutronix.de:
arch/arm/mach-efm32/include/mach/system.h | 18 +++
arch/arm/mach-efm32/include/mach/timex.h | 7 +
arch/arm/mach-efm32/time.c | 170 ++++++++++++++++++++++++
- 17 files changed, 438 insertions(+), 1 deletion(-)
+ 17 files changed, 462 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/boot/dts/efm32gg-dk3750.dts
create mode 100644 arch/arm/mach-efm32/Makefile
create mode 100644 arch/arm/mach-efm32/Makefile.boot
@@ -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,23 +99,23 @@ 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..3fc2369
--- /dev/null
+++ b/arch/arm/boot/dts/efm32gg-dk3750.dts
-@@ -0,0 +1,41 @@
+@@ -0,0 +1,69 @@
+/dts-v1/;
+/include/ "skeleton.dtsi"
+
@@ -135,22 +124,22 @@ index 0000000..2a28b0f
+ compatible = "efm32,dk3750";
+
+ aliases {
-+ serial1 = &uart1;
++ serial4 = &uart4;
+ };
+
+ nvic: nv-interrupt-controller@0xe0000000 {
+ compatible = "arm,cortex-m3-nvic";
+ interrupt-controller;
+ #interrupt-cells = <1>;
-+ reg = <0xe0000000 0x4000>;
++ reg = <0xe000e000 0x4000>;
+ };
+
+ chosen {
-+ bootargs = "console=ttyefm1,115200 init=/linuxrc ignore_loglevel ihash_entries=64 dhash_entries=64";
++ bootargs = "console=ttyefm4,115200 init=/linuxrc ignore_loglevel ihash_entries=64 dhash_entries=64 earlyprintk uclinux.physaddr=0x8c000000 root=/dev/mtdblock0";
+ };
+
+ memory {
-+ reg = <0x80000000 0x100000>;
++ reg = <0x88000000 0x400000>;
+ };
+
+ soc {
@@ -160,11 +149,39 @@ index 0000000..2a28b0f
+ interrupt-parent = <&nvic>;
+ ranges;
+
-+ uart1: uart@0x4000c400 { /* USART1 */
-+ compatible = "efm32,uart";
++ spi@0x4000c400 { /* USART1 */
++ #address-cells = <1>;
++ #size-cells = <0>;
++ compatible = "efm32,spi";
+ reg = <0x4000c400 0x400>;
+ interrupts = <15>;
+ status = "ok";
++
++ ks8851@0 {
++ compatible = "ks8851";
++ spi-max-frequency = <6000000>;
++ reg = <0>;
++ interrupt-parent = <&boardfpga>;
++ interrupts = <4>;
++ status = "ok";
++ };
++ };
++
++ uart4: uart@0x4000e400 { /* UART1 */
++ compatible = "efm32,uart";
++ reg = <0x4000e400 0x400>;
++ interrupts = <22>;
++ location = <2>;
++ status = "ok";
++ };
++
++ boardfpga: boardfpga@0x80000000 {
++ compatible = "efm32board";
++ reg = <0x80000000 0x400>;
++ /* this is a lie, gpio_even = 1 */
++ interrupts = <1>;
++ interrupt-controller;
++ #interrupt-cells = <1>;
+ };
+ };
+};
@@ -254,10 +271,10 @@ index 0000000..d2ff797
+extern struct sys_timer efm32_timer;
diff --git a/arch/arm/mach-efm32/dtmachine.c b/arch/arm/mach-efm32/dtmachine.c
new file mode 100644
-index 0000000..42d091c
+index 0000000..a64c4a4
--- /dev/null
+++ b/arch/arm/mach-efm32/dtmachine.c
-@@ -0,0 +1,47 @@
+@@ -0,0 +1,43 @@
+#include <linux/kernel.h>
+#include <linux/pinctrl/machine.h>
+#include <linux/irqdomain.h>
@@ -269,28 +286,24 @@ index 0000000..42d091c
+#include <asm/mach/time.h>
+
+#include "common.h"
-+
-+static void __init efm32_nvic_add_irq_domain(struct device_node *np,
-+ struct device_node *interrupt_parent)
-+{
-+ irq_domain_add_simple(np, 0);
-+}
++#include "devices.h"
+
+static const struct of_device_id efm32_irq_match[] __initconst = {
+ {
+ .compatible = "arm,cortex-m3-nvic",
-+ .data = efm32_nvic_add_irq_domain,
++ .data = nvic_of_init,
+ }, {
+ /* sentinel */
+ }
+};
+
-+static void __init efm32_init(void)
++static void __init efm32_init_irq(void)
+{
-+ int ret;
-+
+ of_irq_init(efm32_irq_match);
++}
+
++static void __init efm32_init(void)
++{
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+}
+
@@ -300,14 +313,14 @@ index 0000000..42d091c
+};
+
+DT_MACHINE_START(EFM32DT, "EFM32 (Device Tree Support)")
-+ .init_irq = nvic_init,
++ .init_irq = efm32_init_irq,
+ .timer = &efm32_timer,
+ .init_machine = efm32_init,
+ .dt_compat = efm32gg_compat,
+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 +339,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 +349,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 +404,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
@@ -440,7 +453,7 @@ index 0000000..b408dce
+#endif /* __MACH_TIMEX_H__ */
diff --git a/arch/arm/mach-efm32/time.c b/arch/arm/mach-efm32/time.c
new file mode 100644
-index 0000000..c8038b1
+index 0000000..f91a3ef
--- /dev/null
+++ b/arch/arm/mach-efm32/time.c
@@ -0,0 +1,170 @@
@@ -483,7 +496,7 @@ index 0000000..c8038b1
+
+#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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0012-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0016-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch
index a496e26..6d9420b 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0012-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch
+++ b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0016-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch
@@ -12,30 +12,27 @@ ready for mainline.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
- arch/arm/Kconfig | 5 +
- arch/arm/Kconfig-nommu | 6 +
- 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/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/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/Kconfig | 2 +
+ arch/arm/Kconfig-nommu | 4 +
+ arch/arm/mach-efm32/Kconfig | 8 +
+ arch/arm/mach-efm32/Makefile | 4 +-
+ arch/arm/mach-efm32/common.c | 207 +++++++++++++++++++++++++
+ arch/arm/mach-efm32/common.h | 9 ++
+ arch/arm/mach-efm32/devices.h | 17 ++
+ arch/arm/mach-efm32/devices/Makefile | 2 +
+ arch/arm/mach-efm32/devices/pdev-efm32-adc.c | 18 +++
+ arch/arm/mach-efm32/devices/pdev-efm32-uart.c | 103 ++++++++++++
+ arch/arm/mach-efm32/dtmachine.c | 7 +
+ arch/arm/mach-efm32/include/mach/gpio.h | 1 +
+ arch/arm/mach-efm32/machines/Kconfig | 4 +
+ arch/arm/mach-efm32/machines/Makefile | 1 +
+ arch/arm/mach-efm32/machines/efm32gg_dk3750.c | 95 ++++++++++++
+ 15 files changed, 481 insertions(+), 1 deletion(-)
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
create mode 100644 arch/arm/mach-efm32/devices/Makefile
create mode 100644 arch/arm/mach-efm32/devices/pdev-efm32-adc.c
- create mode 100644 arch/arm/mach-efm32/devices/pdev-efm32-pinctrl.c
create mode 100644 arch/arm/mach-efm32/devices/pdev-efm32-uart.c
create mode 100644 arch/arm/mach-efm32/include/mach/gpio.h
create mode 100644 arch/arm/mach-efm32/machines/Kconfig
@@ -43,23 +40,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..46a8762 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -444,9 +444,12 @@ config ARCH_EFM32
- select CLKSRC_MMIO
- select CPU_V7M
- select GENERIC_CLOCKEVENTS
-+ select GENERIC_GPIO
-+ select ARCH_REQUIRE_GPIOLIB
- select HAVE_CLK
- select NO_DMA
- select NO_IOPORT
-+ select PINCTRL
-
- config ARCH_EP93XX
- bool "EP93xx-based"
-@@ -1052,6 +1055,8 @@ source "arch/arm/mach-davinci/Kconfig"
+@@ -1041,6 +1041,8 @@ source "arch/arm/mach-davinci/Kconfig"
source "arch/arm/mach-dove/Kconfig"
@@ -69,20 +53,18 @@ index 4831437..dffb4d9 100644
source "arch/arm/mach-footbridge/Kconfig"
diff --git a/arch/arm/Kconfig-nommu b/arch/arm/Kconfig-nommu
-index c859495..4340f4f 100644
+index c859495..fcbb5c4 100644
--- a/arch/arm/Kconfig-nommu
+++ b/arch/arm/Kconfig-nommu
-@@ -11,18 +11,24 @@ config SET_MEM_PARAM
+@@ -11,18 +11,22 @@ config SET_MEM_PARAM
config DRAM_BASE
hex '(S)DRAM Base Address' if SET_MEM_PARAM
-+ default 0x80000000 if EFM32GG_DK3750_FPGA
+ default 0x88000000 if MACH_EFM32GG_DK3750
default 0x00800000
config DRAM_SIZE
hex '(S)DRAM SIZE' if SET_MEM_PARAM
-+ default 0x00100000 if EFM32GG_DK3750_FPGA
+ default 0x00400000 if MACH_EFM32GG_DK3750
default 0x00800000
@@ -99,17 +81,20 @@ index c859495..4340f4f 100644
config PROCESSOR_ID
diff --git a/arch/arm/mach-efm32/Kconfig b/arch/arm/mach-efm32/Kconfig
new file mode 100644
-index 0000000..e82747f
+index 0000000..61a7231
--- /dev/null
+++ b/arch/arm/mach-efm32/Kconfig
-@@ -0,0 +1,5 @@
+@@ -0,0 +1,8 @@
+if ARCH_EFM32
+
++config EFM32_NONDT
++ bool
++
+source "arch/arm/mach-efm32/machines/Kconfig"
+
+endif
diff --git a/arch/arm/mach-efm32/Makefile b/arch/arm/mach-efm32/Makefile
-index 10a3426..f3a6932 100644
+index 10a3426..ba4d6ee 100644
--- a/arch/arm/mach-efm32/Makefile
+++ b/arch/arm/mach-efm32/Makefile
@@ -1,3 +1,5 @@
@@ -118,7 +103,7 @@ index 10a3426..f3a6932 100644
obj-$(CONFIG_OF) += dtmachine.o
+
-+obj-y += machines/ devices/
++obj-$(CONFIG_EFM32_NONDT) += machines/ devices/
diff --git a/arch/arm/mach-efm32/common.c b/arch/arm/mach-efm32/common.c
new file mode 100644
index 0000000..cb073ba
@@ -333,10 +318,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 */
@@ -347,19 +334,16 @@ index d2ff797..237b412 100644
+void efm32_print_reset_cause(void);
diff --git a/arch/arm/mach-efm32/devices.h b/arch/arm/mach-efm32/devices.h
new file mode 100644
-index 0000000..6459921
+index 0000000..785f070
--- /dev/null
+++ b/arch/arm/mach-efm32/devices.h
-@@ -0,0 +1,20 @@
+@@ -0,0 +1,17 @@
+#include <linux/platform_device.h>
+
+extern const struct platform_device_info efm32_adc_devinfo[];
+#define efm32_add_efm32_adc() \
+ platform_device_register_full(&efm32_adc_devinfo[0])
+
-+#include <linux/platform_data/efm32-pinctrl.h>
-+void efm32_add_efm32_pinctrl(const struct efm32_pinctrl_pdata *);
-+
+extern const struct platform_device_info efm32_spi_devinfo[];
+#define efm32_add_efm32_spi(id) \
+ platform_device_register_full(&efm32_spi_devinfo[id])
@@ -373,12 +357,11 @@ index 0000000..6459921
+ _efm32gg_add_efm32_uart(&efm32_uart_devinfo[id + 3], loc)
diff --git a/arch/arm/mach-efm32/devices/Makefile b/arch/arm/mach-efm32/devices/Makefile
new file mode 100644
-index 0000000..1492b3f
+index 0000000..d3a4495
--- /dev/null
+++ b/arch/arm/mach-efm32/devices/Makefile
-@@ -0,0 +1,3 @@
+@@ -0,0 +1,2 @@
+obj-y += pdev-efm32-adc.o
-+obj-y += pdev-efm32-pinctrl.o
+obj-y += pdev-efm32-uart.o
diff --git a/arch/arm/mach-efm32/devices/pdev-efm32-adc.c b/arch/arm/mach-efm32/devices/pdev-efm32-adc.c
new file mode 100644
@@ -404,72 +387,43 @@ index 0000000..be8154b
+ .num_res = ARRAY_SIZE(efm32_adc0_resources),
+ },
+};
-diff --git a/arch/arm/mach-efm32/devices/pdev-efm32-pinctrl.c b/arch/arm/mach-efm32/devices/pdev-efm32-pinctrl.c
-new file mode 100644
-index 0000000..4a878f1
---- /dev/null
-+++ b/arch/arm/mach-efm32/devices/pdev-efm32-pinctrl.c
-@@ -0,0 +1,24 @@
-+#include <linux/ioport.h>
-+#include <linux/platform_device.h>
-+#include <linux/platform_data/efm32-pinctrl.h>
-+#include <linux/pinctrl/pinctrl.h>
-+
-+#include "../devices.h"
-+
-+static const struct resource efm32_pinctrl_resources[] __initconst = {
-+ DEFINE_RES_MEM(0x40006000, 0x1000),
-+};
-+
-+static struct platform_device_info efm32_pinctrl_devinfo __initdata = {
-+ .name = "efm32-pinctrl",
-+ .id = -1,
-+ .res = efm32_pinctrl_resources,
-+ .num_res = ARRAY_SIZE(efm32_pinctrl_resources),
-+ .size_data = sizeof(struct efm32_pinctrl_pdata),
-+};
-+
-+void __init efm32_add_efm32_pinctrl(const struct efm32_pinctrl_pdata *pdata)
-+{
-+ efm32_pinctrl_devinfo.data = pdata;
-+ platform_device_register_full(&efm32_pinctrl_devinfo);
-+}
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 = {
@@ -543,38 +497,20 @@ index 0000000..1a96772
+ return platform_device_register_full(&_devinfo);
+}
diff --git a/arch/arm/mach-efm32/dtmachine.c b/arch/arm/mach-efm32/dtmachine.c
-index 42d091c..ca6585e 100644
+index a64c4a4..d416abe 100644
--- a/arch/arm/mach-efm32/dtmachine.c
+++ b/arch/arm/mach-efm32/dtmachine.c
-@@ -9,6 +9,17 @@
- #include <asm/mach/time.h>
-
- #include "common.h"
-+#include "devices.h"
-+
-+static const struct pinmux_map efm32_pinmux[] = {
-+ {
-+ .name = "us1@0",
-+ .ctrl_dev_name = "pinctrl.0",
-+ .function = "us1",
-+ .group = "us1_loc0",
-+ .hog_on_boot = 1,
-+ },
-+};
-
- static void __init efm32_nvic_add_irq_domain(struct device_node *np,
- struct device_node *interrupt_parent)
-@@ -32,6 +43,13 @@ static void __init efm32_init(void)
- of_irq_init(efm32_irq_match);
-
+@@ -28,6 +28,13 @@ static void __init efm32_init_irq(void)
+ static void __init efm32_init(void)
+ {
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+ /*
+ * Pinmuxing isn't specified in the device tree. Probably it's too heavy
+ * considering that there is only 4 MiB of RAM
+ */
-+ efm32gg990_add_efm32_pinctrl();
-+ pinmux_register_mappings(efm32_pinmux, ARRAY_SIZE(efm32_pinmux));
++ //efm32gg990_add_efm32_pinctrl();
++ //pinmux_register_mappings(efm32_pinmux, ARRAY_SIZE(efm32_pinmux));
}
static const char *const efm32gg_compat[] __initconst = {
@@ -585,35 +521,16 @@ 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
+index 0000000..c8095cc
--- /dev/null
+++ b/arch/arm/mach-efm32/machines/Kconfig
-@@ -0,0 +1,11 @@
+@@ -0,0 +1,4 @@
+config MACH_EFM32GG_DK3750
+ bool "EFM32GG_DK3750"
++ select EFM32_NONDT
+ default y
-+
-+config EFM32GG_DK3750_FPGA
-+ bool "pre-silicon Gecko"
-+ depends on MACH_EFM32GG_DK3750
-+ help
-+ This option enables handling for the FPGA version of the Giant Gecko.
-+ Namely:
-+ - only one MiB of external DRAM
diff --git a/arch/arm/mach-efm32/machines/Makefile b/arch/arm/mach-efm32/machines/Makefile
new file mode 100644
index 0000000..d76f15d
@@ -623,10 +540,10 @@ index 0000000..d76f15d
+obj-$(CONFIG_MACH_EFM32GG_DK3750) += efm32gg_dk3750.o
diff --git a/arch/arm/mach-efm32/machines/efm32gg_dk3750.c b/arch/arm/mach-efm32/machines/efm32gg_dk3750.c
new file mode 100644
-index 0000000..cdc7506
+index 0000000..631d04a
--- /dev/null
+++ b/arch/arm/mach-efm32/machines/efm32gg_dk3750.c
-@@ -0,0 +1,216 @@
+@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2012 Uwe Kleine-Koenig for Pengutronix
+ *
@@ -636,12 +553,10 @@ index 0000000..cdc7506
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
-+#include <linux/pinctrl/machine.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/spi_gpio.h>
+#include <linux/spi/mmc_spi.h>
+#include <linux/gpio.h>
-+#include <linux/platform_data/efm32-pinctrl.h>
+
+#include <asm/hardware/nvic.h>
+#include <asm/mach/arch.h>
@@ -668,35 +583,6 @@ index 0000000..cdc7506
+ .size_data = sizeof(efm32gg_dk3750_spi_gpio_us0_pdata),
+};
+
-+static struct mmc_spi_platform_data efm32gg_dk3750_mmc_spi_pdata = {
-+};
-+
-+static const struct spi_board_info
-+ efm32gg_dk3750_spi_us0_board_info[] __initconst = {
-+ {
-+ .modalias = "mmc_spi",
-+ .bus_num = 0,
-+ .chip_select = 0,
-+ .platform_data = &efm32gg_dk3750_mmc_spi_pdata,
-+ .controller_data = (void *)68, /* PE4 */
-+ .mode = SPI_MODE_0,
-+ },
-+};
-+
-+static void __init efm32gg_dk3750_prepare_microsd(void)
-+{
-+ /* enable microSD mux, XXX: pretty please */
-+ {
-+ u16 perfControl = readw((void __iomem *)0x80000018);
-+ perfControl |= 1; /* Micro-SD SPI enable */
-+ writew(perfControl, (void __iomem *)0x80000018);
-+ }
-+
-+ spi_register_board_info(efm32gg_dk3750_spi_us0_board_info,
-+ ARRAY_SIZE(efm32gg_dk3750_spi_us0_board_info));
-+ platform_device_register_full(&efm32gg_dk3750_spi_gpio_us0_devinfo);
-+}
-+
+static struct spi_board_info
+ efm32gg_dk3750_spi_us1_board_info[] __initdata = {
+ {
@@ -711,111 +597,28 @@ index 0000000..cdc7506
+
+static void __init efm32gg_dk3750_prepare_ethernet(void)
+{
-+ /* enable ethernet mux, XXX: pretty please */
-+ {
-+ u16 perfControl = readw((void __iomem *)0x80000018);
-+
-+ writew(1 /* BC_SPI_DEMUX_SLAVE_ETHERNET */, (void __iomem *)0x8000001a);
-+ perfControl |= 3 << 8; /* I2S/ETH/TFT SPI enable + I2S/ETH mux select */
-+ writew(perfControl, (void __iomem *)0x80000018);
-+ }
-+
++#if 0
++ /* this depends on a hardware modification */
+ gpio_request_one(7, GPIOF_DIR_IN, "eth-irq");
-+ efm32gg_dk3750_spi_us1_board_info[0].irq = gpio_to_irq(7);
++ efm32gg_dk3750_spi_us1_board_info[0].irq = 7; //gpio_to_irq(7);
++#else
++ efm32gg_dk3750_spi_us1_board_info[0].irq = 4;
++#endif
+
+ spi_register_board_info(efm32gg_dk3750_spi_us1_board_info,
+ ARRAY_SIZE(efm32gg_dk3750_spi_us1_board_info));
+ efm32_add_efm32_spi(1);
+}
+
-+static irqreturn_t c9wakeup_handler(int irq, void *null)
-+{
-+ pr_info("tralala\n");
-+ return IRQ_HANDLED;
-+}
-+
-+static int __init efm32gg_dk3750_prepare_c9wakeup(void)
-+{
-+ int ret;
-+ ret = gpio_request(41, "c9wakeup");
-+ if (ret) {
-+ pr_warn("failed to request gpio41 (%d)\n", ret);
-+ goto err_gpio_request;
-+ }
-+
-+ /* XXX: filter */
-+ ret = gpio_direction_input(41);
-+ if (ret) {
-+ pr_warn("failed to set gpio41 to input\n");
-+ goto err_direction_input;
-+ }
++static const struct resource efm32gg_dk3750_board_res[] __initconst = {
++ { .start = 0x80000000, .end = 0x80000400, .flags = IORESOURCE_MEM, },
++ { .start = 1, .flags = IORESOURCE_IRQ, },
++};
+
-+ ret = gpio_to_irq(41);
-+ if (ret < 0) {
-+ pr_warn("gpio41 doesn't map to an irq (%d)\n", ret);
-+ goto err_to_irq;
-+ }
-+ pr_info("using irq %d\n", ret);
-+
-+ ret = request_irq(ret, c9wakeup_handler, IRQF_TRIGGER_FALLING, "c9wakup", NULL);
-+ if (ret) {
-+ pr_warn("failed to request irq for gpio41 (%d)", ret);
-+err_gpio_request:
-+err_direction_input:
-+err_to_irq:
-+ gpio_free(41);
-+ }
-+ return ret;
-+}
-+module_init(efm32gg_dk3750_prepare_c9wakeup);
-+
-+const static struct efm32_pinctrl_pdata efm32gg_dk3750_pinctrl_pdata __initconst = {
-+ .pindef = {
-+ [7] = { /* PA7, eth irq */
-+ .flags = EFM32_PINCTRL_FLAG_GPIOIN,
-+ .mode_gpio_in = EFM32_MODE_INPUT,
-+ },
-+ [14] = { /* GPIO for EM demo */
-+ .flags = EFM32_PINCTRL_FLAG_GPIOOUT,
-+ .mode_gpio_out = EFM32_MODE_PUSHPULL,
-+ },
-+ [41] = { /* PC9, wakeup */
-+ .flags = EFM32_PINCTRL_FLAG_GPIOIN,
-+ .mode_gpio_in = EFM32_MODE_INPUTPULLUPFILTER,
-+ },
-+ [48] = { /* PD0, ETH_MOSI */
-+ .flags = EFM32_PINCTRL_FLAG_GPIOOUT,
-+ .mode_gpio_out = EFM32_MODE_PUSHPULL,
-+ },
-+ [49] = { /* PD1, ETH_MISO */
-+ .flags = EFM32_PINCTRL_FLAG_GPIOIN,
-+ .mode_gpio_in = EFM32_MODE_INPUT,
-+ },
-+ [50] = { /* PD2, ETH_SCLK */
-+ .flags = EFM32_PINCTRL_FLAG_GPIOOUT,
-+ .mode_gpio_out = EFM32_MODE_PUSHPULL,
-+ },
-+ [51] = { /* PD3, ETH_#CS */
-+ .flags = EFM32_PINCTRL_FLAG_GPIOOUT,
-+ .mode_gpio_out = EFM32_MODE_PUSHPULL,
-+ },
-+ [68] = { /* PE4, spi cs */
-+ .flags = EFM32_PINCTRL_FLAG_GPIOOUT,
-+ .mode_gpio_out = EFM32_MODE_PUSHPULL,
-+ },
-+ [69] = { /* PE5, spi sck */
-+ .flags = EFM32_PINCTRL_FLAG_GPIOOUT,
-+ .mode_gpio_out = EFM32_MODE_PUSHPULL,
-+ },
-+ [70] = { /* PE6, spi miso */
-+ .flags = EFM32_PINCTRL_FLAG_GPIOIN,
-+ .mode_gpio_in = EFM32_MODE_INPUT,
-+ },
-+ [71] = { /* PE7, spi mosi */
-+ .flags = EFM32_PINCTRL_FLAG_GPIOOUT,
-+ .mode_gpio_out = EFM32_MODE_PUSHPULL,
-+ }
-+ },
++static const struct platform_device_info efm32gg_dk3750_board_pdevinfo __initconst = {
++ .name = "efm32board",
++ .res = &efm32gg_dk3750_board_res,
++ .num_res = ARRAY_SIZE(efm32gg_dk3750_board_res),
+};
+
+static void __init efm32gg_dk3750_init(void)
@@ -823,18 +626,11 @@ index 0000000..cdc7506
+ efm32_print_cpuinfo();
+ efm32_print_reset_cause();
+
-+#ifdef CONFIG_EFM32GG_DK3750_FPGA
-+ efm32gg_add_efm32_usart(1, 0);
-+#else
+ efm32gg_add_efm32_uart(1, 2);
-+#endif
+
-+ efm32_add_efm32_pinctrl(&efm32gg_dk3750_pinctrl_pdata);
-+
-+ efm32gg_dk3750_prepare_microsd();
+ efm32gg_dk3750_prepare_ethernet();
+ efm32_add_efm32_adc();
-+
++ platform_device_register_full(&efm32gg_dk3750_board_pdevinfo);
+}
+
+MACHINE_START(EFM32GG_DK3750, "EFM32 Giant Gecko Development Kit")
diff --git a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0017-efm-board-controller-driver.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0017-efm-board-controller-driver.patch
new file mode 100644
index 0000000..4801e63
--- /dev/null
+++ b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0017-efm-board-controller-driver.patch
@@ -0,0 +1,208 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Thu, 7 Feb 2013 09:45:30 +0100
+Subject: [PATCH] efm board controller driver
+
+---
+ drivers/mfd/Kconfig | 4 ++
+ drivers/mfd/Makefile | 1 +
+ drivers/mfd/efm32board.c | 167 ++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 172 insertions(+)
+ create mode 100644 drivers/mfd/efm32board.c
+
+diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
+index 47ad4e2..42c37b5 100644
+--- a/drivers/mfd/Kconfig
++++ b/drivers/mfd/Kconfig
+@@ -1113,6 +1113,10 @@ config MFD_AS3711
+ help
+ Support for the AS3711 PMIC from AMS
+
++config MFD_EFM32BOARD
++ tristate "efm32 board"
++ select MFD_CORE
++
+ endmenu
+ endif
+
+diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
+index 8b977f8..cb0556f 100644
+--- a/drivers/mfd/Makefile
++++ b/drivers/mfd/Makefile
+@@ -148,3 +148,4 @@ obj-$(CONFIG_MFD_LM3533) += lm3533-core.o lm3533-ctrlbank.o
+ obj-$(CONFIG_VEXPRESS_CONFIG) += vexpress-config.o vexpress-sysreg.o
+ obj-$(CONFIG_MFD_RETU) += retu-mfd.o
+ obj-$(CONFIG_MFD_AS3711) += as3711.o
++obj-$(CONFIG_MFD_EFM32BOARD) += efm32board.o
+diff --git a/drivers/mfd/efm32board.c b/drivers/mfd/efm32board.c
+new file mode 100644
+index 0000000..7cfd64e
+--- /dev/null
++++ b/drivers/mfd/efm32board.c
+@@ -0,0 +1,167 @@
++#include <linux/platform_device.h>
++#include <linux/irq.h>
++#include <linux/irqdomain.h>
++#include <linux/export.h>
++#include <asm/io.h>
++
++#define DRIVER_NAME "efm32board"
++
++#define MAGIC 0x04
++#define INTFLAG 0x40
++#define INTEN 0x42
++
++struct efm32board_ddata {
++ void __iomem *base;
++ unsigned int irq;
++ struct irq_chip chip;
++ struct irq_domain *domain;
++};
++
++static void efm32board_irq_ack(struct irq_data *data)
++{
++ struct efm32board_ddata *ddata = irq_get_chip_data(data->irq);
++ unsigned short val;
++
++ /* XXX: lock */
++ val = readw(ddata->base + INTFLAG);
++ val &= ~(1 << data->hwirq);
++ writew(val, ddata->base + INTFLAG);
++}
++
++static void efm32board_irq_mask(struct irq_data *data)
++{
++ struct efm32board_ddata *ddata = irq_get_chip_data(data->irq);
++ unsigned short val;
++
++ /* XXX: lock */
++ val = readw(ddata->base + INTEN);
++ val &= ~(1 << data->hwirq);
++ writew(val, ddata->base + INTEN);
++}
++
++static void efm32board_irq_unmask(struct irq_data *data)
++{
++ struct efm32board_ddata *ddata = irq_get_chip_data(data->irq);
++ unsigned short val;
++
++ /* XXX: lock */
++ val = readw(ddata->base + INTEN);
++ val |= 1 << data->hwirq;
++ writew(val, ddata->base + INTEN);
++}
++
++static void efm32board_handler(unsigned int irq, struct irq_desc *desc)
++{
++ unsigned short val;
++ struct efm32board_ddata *ddata = irq_get_handler_data(irq);
++
++ /* ack gpio irq. XXX: this should go into a gpio driver */
++ writel(1, (void __iomem *)0x4000611c);
++
++ val = readw(ddata->base + INTFLAG);
++ /* ack BC irq */
++ writew(0, ddata->base + INTFLAG);
++
++ while (val) {
++ int line = __fls(val);
++ pr_info("val = %hx, line = %d\n", val, line);
++ generic_handle_irq(irq_create_mapping(ddata->domain, line));
++ val &= ~(1 << line);
++ }
++ pr_info("/%s\n", __func__);
++}
++
++int efm32board_irqdomain_map(struct irq_domain *d, unsigned int virq,
++ irq_hw_number_t hw)
++{
++ struct efm32board_ddata *ddata = d->host_data;
++
++ irq_set_chip_data(virq, ddata);
++ irq_set_chip_and_handler(virq, &ddata->chip, handle_edge_irq);
++
++ set_irq_flags(virq, IRQF_VALID);
++
++ return 0;
++}
++
++const struct irq_domain_ops efm32board_irqdomain_ops = {
++ .map = efm32board_irqdomain_map,
++ .xlate = irq_domain_xlate_onecell,
++};
++
++static int efm32board_probe(struct platform_device *pdev)
++{
++ struct resource *res;
++ int irq;
++ struct efm32board_ddata *ddata;
++ unsigned short val;
++
++ ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
++ if (!ddata) {
++ dev_err(&pdev->dev, "cannot allocate driver data");
++ return -ENOMEM;
++ }
++
++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++ if (!res) {
++ dev_err(&pdev->dev, "can't get device resources\n");
++ return -ENOENT;
++ }
++
++ irq = platform_get_irq(pdev, 0);
++ if (irq <= 0) {
++ dev_err(&pdev->dev, "can't get irq number\n");
++ return -ENOENT;
++ }
++ ddata->irq = irq;
++
++ ddata->base = devm_request_and_ioremap(&pdev->dev, res);
++ if (!ddata->base) {
++ dev_err(&pdev->dev, "cannot request and ioremap register set\n");
++ return -EADDRNOTAVAIL;
++ }
++
++ val = readw(ddata->base + MAGIC);
++ if (val != 0xef32) {
++ dev_err(&pdev->dev, "Magic not found (0x%hx)\n", val);
++ return -ENODEV;
++ }
++
++ /* disable and clear all irqs */
++ writew(0, ddata->base + INTEN);
++ writew(0, ddata->base + INTFLAG);
++
++ /* XXX: enable joystick irq */
++ writew(4, ddata->base + INTEN);
++
++ ddata->chip.name = DRIVER_NAME;
++ ddata->chip.irq_ack = efm32board_irq_ack;
++ ddata->chip.irq_mask = efm32board_irq_mask;
++ ddata->chip.irq_unmask = efm32board_irq_unmask;
++
++ irq_set_handler_data(irq, ddata);
++ irq_set_chained_handler(irq, efm32board_handler);
++
++ ddata->domain = irq_domain_add_simple(pdev->dev.of_node, 5, 0,
++ &efm32board_irqdomain_ops, ddata);
++ if (!ddata->domain) {
++ dev_err(&pdev->dev, "cannot create irq domain\n");
++ return -ENOMEM;
++ }
++ return 0;
++}
++
++static const struct of_device_id efm32board_dt_ids[] = {
++ { .compatible = "efm32board", },
++ { /* sentinel */ }
++};
++
++static struct platform_driver efm32board_driver = {
++ .probe = efm32board_probe,
++ .driver = {
++ .name = DRIVER_NAME,
++ .owner = THIS_MODULE,
++ .of_match_table = efm32board_dt_ids,
++ },
++};
++module_platform_driver(efm32board_driver);
diff --git a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0017-ARM-v7m-add-trivial-suspend-support.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0018-ARM-v7m-add-trivial-suspend-support.patch
index 7390ebc..deb16a9 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0017-ARM-v7m-add-trivial-suspend-support.patch
+++ b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0018-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 46a8762..09eb7f5 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -2331,7 +2331,7 @@ source "kernel/power/Kconfig"
+@@ -2315,7 +2315,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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0018-ARM-efm32-add-trivial-suspend-support.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0019-ARM-efm32-add-trivial-suspend-support.patch
index c096f67..7f2ba23 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0018-ARM-efm32-add-trivial-suspend-support.patch
+++ b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0019-ARM-efm32-add-trivial-suspend-support.patch
@@ -13,16 +13,16 @@ Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
create mode 100644 arch/arm/mach-efm32/pm.c
diff --git a/arch/arm/mach-efm32/Makefile b/arch/arm/mach-efm32/Makefile
-index c882ed0..420780e 100644
+index ba4d6ee..0f593e7 100644
--- a/arch/arm/mach-efm32/Makefile
+++ b/arch/arm/mach-efm32/Makefile
-@@ -3,5 +3,6 @@ obj-y += bootloader.o
+@@ -1,5 +1,6 @@
obj-y += clk.o common.o time.o
obj-$(CONFIG_OF) += dtmachine.o
+obj-$(CONFIG_PM) += pm.o
- obj-y += machines/ devices/
+ obj-$(CONFIG_EFM32_NONDT) += machines/ devices/
diff --git a/arch/arm/mach-efm32/pm.c b/arch/arm/mach-efm32/pm.c
new file mode 100644
index 0000000..de03941
diff --git a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0014-HACK-ARM-allow-a-bootloader-to-be-embedded-and-do-it.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0020-HACK-ARM-allow-a-bootloader-to-be-embedded-and-do-it.patch
index 9375af4..2ff70a4 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0014-HACK-ARM-allow-a-bootloader-to-be-embedded-and-do-it.patch
+++ b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0020-HACK-ARM-allow-a-bootloader-to-be-embedded-and-do-it.patch
@@ -9,13 +9,13 @@ Content-Transfer-Encoding: 8bit
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
arch/arm/kernel/vmlinux.lds.S | 5 +
- arch/arm/mach-efm32/Makefile | 2 +
- arch/arm/mach-efm32/bootloader.S | 274 ++++++++++++++++++++++++++++++++++++++
- 3 files changed, 281 insertions(+)
+ arch/arm/mach-efm32/Makefile | 6 +
+ arch/arm/mach-efm32/bootloader.S | 252 ++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 263 insertions(+)
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
@@ -31,35 +31,33 @@ index 36ff15b..cda2ca6 100644
_text = .;
HEAD_TEXT
diff --git a/arch/arm/mach-efm32/Makefile b/arch/arm/mach-efm32/Makefile
-index f3a6932..c882ed0 100644
+index 0f593e7..878dc84 100644
--- a/arch/arm/mach-efm32/Makefile
+++ b/arch/arm/mach-efm32/Makefile
-@@ -1,3 +1,5 @@
+@@ -1,3 +1,9 @@
+obj-y += bootloader.o
+
++ifeq ($(CONFIG_USE_OF),y)
++$(obj)/bootloader.o: $(obj)/../boot/dts/efm32gg-dk3750.dtb
++endif
++
obj-y += clk.o common.o time.o
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..d4dbf0b
--- /dev/null
+++ b/arch/arm/mach-efm32/bootloader.S
-@@ -0,0 +1,274 @@
-+#if defined(CONFIG_OF) && !defined(CONFIG_EFM32GG_DK3750_FPGA)
+@@ -0,0 +1,252 @@
++#if defined(CONFIG_OF)
+#define EFM32_USE_OF
+#endif
+#define EFM32_DT_IN_SRAM
+
-+#ifdef CONFIG_EFM32GG_DK3750_FPGA
-+/* USART1 */
-+#define UARTBASE 0x4000c400
-+#define UARTLOCATION 0
-+#else
+/* UART1 */
+#define UARTBASE 0x4000e400
+#define UARTLOCATION 2
-+#endif
+
+ .thumb
+
@@ -70,7 +68,7 @@ index 0000000..2158feb
+ .int reset + 1 @ Reset
+
+reset:
-+ /* init external RAM and serial port */
++ /* init external RAM, serial port, EBI and stuff */
+ adr r0, reginit
+1:
+ ldr r1, [r0]
@@ -80,26 +78,27 @@ index 0000000..2158feb
+ cmp r0, #(reginit_end)
+ blo 1b
+
-+#ifndef CONFIG_EFM32GG_DK3750_FPGA
-+ /* enable UART mux */
-+ ldr r0, =(0x80000018)
-+ mov r1, #0x1000
-+ strh r1, [r0]
+
-+ mov r1, #0x0001
-+ strh r1, [r0, #-4]
++ /* init some BC registers */
++ adr r0, bcinit
++1:
++ ldrh r1, [r0]
++ ldrh r2, [r0, #2]
++ add r1, r1, #0x80000000
++ strh r2, [r1]
++ add r0, #4
++ cmp r0, #(bcinit_end)
++ blo 1b
+
+ /* give mux some time to enable the level shifter */
+ ldr r0, =0x4000
+1: subs r0, r0, #1
+ bne 1b
-+#endif
+
+ ldr r0, =(UARTBASE + 0x34)
+ mov r1, 0x55
+ str r1, [r0]
+
-+#ifndef CONFIG_EFM32GG_DK3750_FPGA
+ /* Zero PSRAM */
+ ldr r0, =(0x88000000)
+ ldr r1, =(0x88400000)
@@ -128,7 +127,6 @@ index 0000000..2158feb
+ bcc 1b
+ mov r7, #'>'
+ str r7, [r6]
-+#endif
+
+#if defined(EFM32_USE_OF) && defined(EFM32_DT_IN_SRAM)
+#define dtbaddr 0x10000000
@@ -182,9 +180,7 @@ index 0000000..2158feb
+ .int 0x43900814, 0x00000001 @ CMU_HFCORECLKEN0 |= EBI via bitband
+ .int 0x439008b4, 0x00000001 @ CMU_HFPERCLKEN0 |= GPIO via bitband
+ .int 0x43900884, 0x00000001 @ CMU_HFPERCLKEN0 |= USART1 via bitband
-+#ifndef CONFIG_EFM32GG_DK3750_FPGA
+ .int 0x43900890, 0x00000001 @ CMU_HFPERCLKEN0 |= UART1 via bitband
-+#endif
+
+ /* XXX */
+ .int 0x439008c0, 0x00000001 @ CMU_HFPERCLKEN0 |= ADC via bitband
@@ -195,50 +191,37 @@ index 0000000..2158feb
+ .int 0x40006004, 0x04444444 @ GPIO_PA_MODEL; EBI AD9..15 set mode=pushpull
+ .int 0x40006008, 0x40000000 @ GPIO_PA_MODEH; EBI AD8 set mode=pushpull
+ .int 0x40006024, 0x00000000 @ GPIO_PB_CTRL, reset default
-+#ifdef CONFIG_EFM32GG_DK3750_FPGA
-+ .int 0x40006034, 0x00008000 @ GPIO_PB_DOUTSET; EBI mode on PB15 MCU_EBI_CONNECT (1)
-+#else
+ .int 0x40006038, 0x00008000 @ GPIO_PB_DOUTCLR; EBI mode on PB15 MCU_EBI_CONNECT (0)
-+#endif
+ .int 0x40006038, 0x0000007f @ GPIO_PB_DOUTCLR; EBI A16-22
+ .int 0x40006028, 0x04444444 @ GPIO_PB_MODEL; EBI A16-22
-+#ifdef CONFIG_EFM32GG_DK3750_FPGA
-+ .int 0x4000602c, 0x40000000 @ GPIO_PB_MODEH; MCU_EBI_CONNECT -> output
-+#else
+ .int 0x40006034, 0x00000200 @ GPIO_PB_DOUTSET; set UART_TX to avoid false start
+ .int 0x4000602c, 0x40000140 @ GPIO_PB_MODEH; MCU_EBI_CONNECT -> output, UART_TX, UART_RX
-+#endif
+
+ .int 0x40006048, 0x00000000 @ GPIO_PC_CTRL, reset default
-+#ifdef CONFIG_EFM32GG_DK3750_FPGA
-+ .int 0x40006058, 0x00000001 @ GPIO_PC_DOUTSET; set PC0 (USART1_TX) high to avoid false start
-+#endif
+ .int 0x4000605c, 0x00000001 @ GPIO_PC_DOUTCLR; PC11 (EBI_ALE)
-+#ifdef CONFIG_EFM32GG_DK3750_FPGA
-+ .int 0x4000604c, 0x00000014 @ GPIO_PC_MODEL; PC0: Push-pull output, PC1 (USART1_RX): input
-+#endif
+ .int 0x40006050, 0x00004000 @ GPIO_PC_MODEH; PC11: Push-pull output
+ .int 0x4000606c, 0x00000000 @ GPIO_PD_CTRL, reset default
-+ .int 0x4000607c, 0x00003e00 @ GPIO_PD_DOUTSET, EBI CS0-3, spiconnect set dataout to 1
++ .int 0x4000607c, 0x00003e08 @ GPIO_PD_DOUTSET, EBI CS0-3, spiconnect set dataout to 1; ETH_SPI_#CS (D3)
++ .int 0x40006080, 0x00000007 @ GPIO_PD_DOUTCLR, ETH_SPI_{TX, RX, CLK}
++ .int 0x40006070, 0x00004414 @ GPIO_PD_MODEL; ETH_SPI_
+ .int 0x40006074, 0x00444440 @ GPIO_PD_MODEH; EBI CS0-3, spiconnect set mode=pushpull
+ .int 0x40006090, 0x00000000 @ GPIO_PE_CTRL, reset default
++ .int 0x400060a0, 0x00000001 @ GPIO_PE_DOUTSET; FPGA irq line
+ .int 0x400060a4, 0x0000ff00 @ GPIO_PE_DOUTCLR; EBI AD0..7 set dataout to 0
++ .int 0x40006094, 0x00000002 @ GPIO_PE_MODEL; FPGA irq line set mode=inputpull
+ .int 0x40006098, 0x44444444 @ GPIO_PE_MODEH; EBI AD0..7 set mode=pushpull
++
+ .int 0x400060b4, 0x00000000 @ GPIO_PF_CTRL, reset default
+ .int 0x400060c8, 0x000003c0 @ GPIO_PF_DOUTCLR; EBI Wen+Ren set dataout to 0
+ .int 0x400060b8, 0x44000000 @ GPIO_PF_MODEL; EBI Byte Lane 0 support BL0/BL1
+ .int 0x400060bc, 0x00000044 @ GPIO_PF_MODEH; EBI WEN, REN
+
++ .int 0x40006100, 0x00000004 @ GPIO_EXTIPSELL: select port E for irq 0
++ .int 0x4000610c, 0x00000001 @ GPIO_EXTIFALL: trigger for falling FPGA irq line
++ .int 0x4000611c, 0x0000ffff @ ? GPIO_IFC: clear all irqs
++ .int 0x40006110, 0x00000001 @ GPIO_IEN: enable irq 0
++
+ /* EBI */
-+#ifdef CONFIG_EFM32GG_DK3750_FPGA
-+ .int 0x40008010, 0x00000000 @ EBI_POLARITY, ardy, ale, we, re, cs and bl active low
-+ .int 0x40008000, 0x41000003 @ EBI_CTRL, enable ITS, D16, BL
-+ .int 0x40008008, 0x00010101 @ EBI_RDTIMING, setup = strobe = hold = 1
-+ .int 0x4000800c, 0x00020202 @ EBI_WRTIMING, setup = strobe = hold = 2
-+ .int 0x40008004, 0x00000303 @ EBI_ADDRTIMING, setup = hold = 3
-+ .int 0x40008014, 0x00540083 @ EBI_ROUTE
-+ .int 0x40008000, 0x41000103 @ EBI_CTRL, bank0en
-+#else
+ .int 0x40008000, 0x4f00d051 @ EBI_CTRL, enable ITS, mode0=mode2=mode3=D16A16ALE, bl0-3, noidle[023]
+ /* EBI PSRAM */
+ .int 0x40008028, 0x10000000 @ EBI_ADDRTIMING2; HALFALE
@@ -260,7 +243,6 @@ index 0000000..2158feb
+
+ .int 0x40008014, 0x105e00bb @ EBI_ROUTE
+ .int 0x40008000, 0x4f00dd51 @ EBI_CTRL, enable ITS, mode0=mode2=mode3=D16A16ALE, bl0-3, noidle[023], bank[023]en
-+#endif
+
+ .int UARTBASE + 0x00, 0x00000000 @ UART1_CTRL
+ .int UARTBASE + 0x04, 0x00001005 @ UART1_FRAME
@@ -272,11 +254,22 @@ index 0000000..2158feb
+reginit_end:
+ .size reginit, . - reginit
+
++ .align 3
++ /* register value pairs to initialize the board controller */
++ .type bcinit, %object
++bcinit:
++ .short 0x0018, 0x1300 @ enable UART mux and ETH
++ .short 0x0014, 0x0001 @ /
++ .short 0x001a, 0x0001 @ ETH
++
++bcinit_end:
++ .size bcinit, . - bcinit
++
+ .align 3
+#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
@@ -294,24 +287,13 @@ index 0000000..2158feb
+ /* ATAG_MEM */
+ .int 0x00000004 /* .size */
+ .int 0x54410002 /* .tag = ATAG_MEM */
-+#ifdef CONFIG_EFM32GG_DK3750_FPGA
-+ .int 0x00100000 /* .size = 1 MiB */
-+ .int 0x80000000 /* .start = SRAM_BASE */
-+#else
+ .int 0x00400000 /* .size = 4 MiB */
+ .int 0x88000000 /* .start = SRAM_BASE */
-+#endif
+ /* ATAG_CMDLINE */
+cmdline:
+ .int (cmdline_end - cmdline) >> 2 /* .size */
+ .int 0x54410009 /* .tag = ATAG_CMDLINE */
-+ .ascii "console=ttyefm"
-+#ifdef CONFIG_EFM32GG_DK3750_FPGA
-+ .ascii "1"
-+#else
-+ .ascii "4"
-+#endif
-+ .asciz ",115200 ignore_loglevel ihash_entries=64 dhash_entries=64 rootfstype=romfs init=/linuxrc"
++ .asciz "console=ttyefm4,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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0015-HACK-don-t-reserve-memory-for-device-tree-if-it-s-be.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0021-HACK-don-t-reserve-memory-for-device-tree-if-it-s-be.patch
index 80c1d6b..b7f5680 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0015-HACK-don-t-reserve-memory-for-device-tree-if-it-s-be.patch
+++ b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0021-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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0016-HACK-make-stack-dumps-provoked-by-BUG-a-bit-more-hel.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0022-HACK-make-stack-dumps-provoked-by-BUG-a-bit-more-hel.patch
index 542f128..b99bcec 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0016-HACK-make-stack-dumps-provoked-by-BUG-a-bit-more-hel.patch
+++ b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0022-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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0019-HACK-ARM-increase-TASK_SIZE-for-MMU.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0023-HACK-ARM-increase-TASK_SIZE-for-MMU.patch
index 5ec33f8..cdd8d29 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.6/0019-HACK-ARM-increase-TASK_SIZE-for-MMU.patch
+++ b/configs/platform-energymicro-efm32gg-dk3750/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/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0024-HACK-work-around-for-big-images.patch b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0024-HACK-work-around-for-big-images.patch
new file mode 100644
index 0000000..06691a1
--- /dev/null
+++ b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/0024-HACK-work-around-for-big-images.patch
@@ -0,0 +1,20 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Thu, 7 Feb 2013 09:43:24 +0100
+Subject: [PATCH] HACK! work around for big images
+
+---
+ arch/arm/kernel/head-nommu.S | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
+index e2988bb..a6f510f 100644
+--- a/arch/arm/kernel/head-nommu.S
++++ b/arch/arm/kernel/head-nommu.S
+@@ -61,6 +61,7 @@ ENTRY(stext)
+ #endif
+ bl __lookup_processor_type @ r5=procinfo r9=cpuid
+ movs r10, r5 @ invalid processor (r5=0)?
++ it eq
+ beq __error_p @ yes, error 'p'
+
+ adr lr, BSYM(__after_proc_init) @ return (PIC) address
diff --git a/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/series b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/series
new file mode 100644
index 0000000..ba6a57b
--- /dev/null
+++ b/configs/platform-energymicro-efm32gg-dk3750/patches/linux-3.8-rc5/series
@@ -0,0 +1,27 @@
+# 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-efm-board-controller-driver.patch
+0018-ARM-v7m-add-trivial-suspend-support.patch
+0019-ARM-efm32-add-trivial-suspend-support.patch
+0020-HACK-ARM-allow-a-bootloader-to-be-embedded-and-do-it.patch
+0021-HACK-don-t-reserve-memory-for-device-tree-if-it-s-be.patch
+0022-HACK-make-stack-dumps-provoked-by-BUG-a-bit-more-hel.patch
+0023-HACK-ARM-increase-TASK_SIZE-for-MMU.patch
+0024-HACK-work-around-for-big-images.patch
+# 1659ab9769424059b871ff1ae1310d18 - git-ptx-patches magic
diff --git a/configs/platform-energymicro-efm32gg-dk3750/platformconfig b/configs/platform-energymicro-efm32gg-dk3750/platformconfig
index bbfc127..9a3ad9e 100644
--- a/configs/platform-energymicro-efm32gg-dk3750/platformconfig
+++ b/configs/platform-energymicro-efm32gg-dk3750/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