diff options
author | Uwe Kleine-König <uwe@kleine-koenig.org> | 2013-02-08 11:32:48 +0100 |
---|---|---|
committer | Uwe Kleine-König <uwe@kleine-koenig.org> | 2013-02-08 11:32:48 +0100 |
commit | b01df9c847571abd1e79c5db81b0109eb6bdeb3b (patch) | |
tree | af3f139fd07ac3897d7ca2013218c12f29e53daa | |
parent | e67527590a194fe1cbaec04e10ba0d003d7c8fa0 (diff) | |
download | OSELAS.BSP-EnergyMicro-Gecko-b01df9c847571abd1e79c5db81b0109eb6bdeb3b.tar.gz OSELAS.BSP-EnergyMicro-Gecko-b01df9c847571abd1e79c5db81b0109eb6bdeb3b.tar.xz |
platform-energymicro-efm32gg-dk3750: kernel updates
- enable PM, network stuff, adc
- add dt support to adc driver
- cosmetic
5 files changed, 204 insertions, 24 deletions
diff --git a/kernelconfig-3.8-rc5 b/kernelconfig-3.8-rc5 index ef96b16..4ff9aa5 100644 --- a/kernelconfig-3.8-rc5 +++ b/kernelconfig-3.8-rc5 @@ -165,7 +165,7 @@ CONFIG_INLINE_READ_UNLOCK=y CONFIG_INLINE_READ_UNLOCK_IRQ=y CONFIG_INLINE_WRITE_UNLOCK=y CONFIG_INLINE_WRITE_UNLOCK_IRQ=y -# CONFIG_FREEZER is not set +CONFIG_FREEZER=y # # System Type @@ -327,23 +327,62 @@ CONFIG_HAVE_AOUT=y # # Power management options # -# CONFIG_SUSPEND is not set +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +CONFIG_PM_SLEEP=y +# CONFIG_PM_AUTOSLEEP is not set +# CONFIG_PM_WAKELOCKS 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 is not set +CONFIG_ARM_CPU_SUSPEND=y CONFIG_NET=y # # Networking options # -# CONFIG_PACKET is not set -# CONFIG_UNIX is not set +CONFIG_PACKET=y +# CONFIG_PACKET_DIAG is not set +CONFIG_UNIX=y +# CONFIG_UNIX_DIAG is not set +# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set -# CONFIG_INET is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set # CONFIG_NETWORK_SECMARK is not set # CONFIG_NETWORK_PHY_TIMESTAMPING is not set # CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set # CONFIG_ATM is not set +# CONFIG_L2TP is not set # CONFIG_BRIDGE is not set CONFIG_HAVE_NET_DSA=y # CONFIG_VLAN_8021Q is not set @@ -370,11 +409,13 @@ CONFIG_BQL=y # CONFIG_CAN is not set # CONFIG_IRDA is not set # CONFIG_BT is not set +# CONFIG_AF_RXRPC 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_CEPH_LIB is not set # CONFIG_NFC is not set CONFIG_HAVE_BPF_JIT=y @@ -528,11 +569,13 @@ CONFIG_SCSI_MOD=y # CONFIG_MD is not set CONFIG_NETDEVICES=y CONFIG_NET_CORE=y +# CONFIG_BONDING is not set # 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_VXLAN is not set # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set @@ -560,6 +603,7 @@ CONFIG_ETHERNET=y # CONFIG_DNET is not set # CONFIG_NET_VENDOR_FARADAY is not set # CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set CONFIG_NET_VENDOR_MICREL=y CONFIG_KS8851=y # CONFIG_KS8851_MLL is not set @@ -677,7 +721,32 @@ CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y # CONFIG_W1 is not set # CONFIG_POWER_SUPPLY is not set # CONFIG_POWER_AVS is not set -# CONFIG_HWMON 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_IT87 is not set +# CONFIG_SENSORS_LM70 is not set +# CONFIG_SENSORS_MAX1111 is not set +# CONFIG_SENSORS_MAX197 is not set +# CONFIG_SENSORS_NTC_THERMISTOR is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# 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_THERMAL is not set # CONFIG_WATCHDOG is not set CONFIG_SSB_POSSIBLE=y @@ -933,7 +1002,102 @@ CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" # CONFIG_SECURITYFS is not set CONFIG_DEFAULT_SECURITY_DAC=y CONFIG_DEFAULT_SECURITY="" -# CONFIG_CRYPTO is not set +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +# CONFIG_CRYPTO_FIPS is not set +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_RNG=y +CONFIG_CRYPTO_RNG2=y +# CONFIG_CRYPTO_MANAGER is not set +# CONFIG_CRYPTO_MANAGER2 is not set +# CONFIG_CRYPTO_USER is not set +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +# CONFIG_CRYPTO_CBC is not set +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +# CONFIG_CRYPTO_ECB is not set +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_GHASH is not set +# CONFIG_CRYPTO_MD4 is not set +# CONFIG_CRYPTO_MD5 is not set +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA1_ARM is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_AES_ARM is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_DES is not set +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_TWOFISH is not set + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +CONFIG_CRYPTO_ANSI_CPRNG=y +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +CONFIG_CRYPTO_HW=y # CONFIG_BINARY_PRINTF is not set # diff --git a/patches/linux-3.8-rc5/0011-hwmon-efm32-adc-new-driver.patch b/patches/linux-3.8-rc5/0011-hwmon-efm32-adc-new-driver.patch index b8258c9..81ef54b 100644 --- a/patches/linux-3.8-rc5/0011-hwmon-efm32-adc-new-driver.patch +++ b/patches/linux-3.8-rc5/0011-hwmon-efm32-adc-new-driver.patch @@ -9,8 +9,8 @@ Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- drivers/hwmon/Kconfig | 10 ++ drivers/hwmon/Makefile | 1 + - drivers/hwmon/efm32-adc.c | 293 +++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 304 insertions(+) + drivers/hwmon/efm32-adc.c | 303 +++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 314 insertions(+) create mode 100644 drivers/hwmon/efm32-adc.c diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig @@ -48,10 +48,10 @@ index 5da2874..7a3a1b8 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..c8abd0f +index 0000000..99d6b45 --- /dev/null +++ b/drivers/hwmon/efm32-adc.c -@@ -0,0 +1,293 @@ +@@ -0,0 +1,303 @@ +/* + * Energy Micro EFM32 adc + * @@ -331,12 +331,22 @@ index 0000000..c8abd0f + return 0; +} + ++static const struct of_device_id efm32_adc_dt_ids[] = { ++ { ++ .compatible = "efm32,adc", ++ }, { ++ /* sentinel */ ++ } ++}; ++MODULE_DEVICE_TABLE(of, efm32_adc_dt_ids); ++ +static struct platform_driver efm32_adc_driver = { + .probe = efm32_adc_probe, + .remove = efm32_adc_remove, + .driver = { + .name = DRIVER_NAME, + .owner = THIS_MODULE, ++ .of_match_table = efm32_adc_dt_ids, + }, +}; +module_platform_driver(efm32_adc_driver); diff --git a/patches/linux-3.8-rc5/0015-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch b/patches/linux-3.8-rc5/0015-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch index 966847d..7cbce6e 100644 --- a/patches/linux-3.8-rc5/0015-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch +++ b/patches/linux-3.8-rc5/0015-ARM-new-platform-for-Energy-Micro-s-EFM32-Cortex-M3-.patch @@ -10,7 +10,7 @@ Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> arch/arm/Kconfig | 13 +- arch/arm/Kconfig.debug | 16 +++ arch/arm/Makefile | 1 + - arch/arm/boot/dts/efm32gg-dk3750.dts | 69 ++++++++++ + arch/arm/boot/dts/efm32gg-dk3750.dts | 76 +++++++++++ arch/arm/mach-efm32/Makefile | 3 + arch/arm/mach-efm32/Makefile.boot | 1 + arch/arm/mach-efm32/clk.c | 38 ++++++ @@ -24,7 +24,7 @@ Signed-off-by: Uwe Kleine-König <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, 462 insertions(+), 1 deletion(-) + 17 files changed, 469 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 @@ -112,10 +112,10 @@ index 69a5955..374e25a 100644 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..aa43fb4 +index 0000000..22e058f --- /dev/null +++ b/arch/arm/boot/dts/efm32gg-dk3750.dts -@@ -0,0 +1,69 @@ +@@ -0,0 +1,76 @@ +/dts-v1/; +/include/ "skeleton.dtsi" + @@ -149,6 +149,13 @@ index 0000000..aa43fb4 + interrupt-parent = <&nvic>; + ranges; + ++ adc@0x40002000 { ++ compatible = "efm32,adc"; ++ reg = <0x40002000 0x400>; ++ interrupts = <7>; ++ status = "ok"; ++ }; ++ + spi@0x4000c400 { /* USART1 */ + #address-cells = <1>; + #size-cells = <0>; diff --git a/patches/linux-3.8-rc5/0016-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch b/patches/linux-3.8-rc5/0016-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch index 6d9420b..a947a64 100644 --- a/patches/linux-3.8-rc5/0016-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch +++ b/patches/linux-3.8-rc5/0016-ARM-efm32-add-support-for-non-dt-builds-and-add-more.patch @@ -540,7 +540,7 @@ 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..631d04a +index 0000000..bafdcdf --- /dev/null +++ b/arch/arm/mach-efm32/machines/efm32gg_dk3750.c @@ -0,0 +1,95 @@ @@ -617,7 +617,7 @@ index 0000000..631d04a + +static const struct platform_device_info efm32gg_dk3750_board_pdevinfo __initconst = { + .name = "efm32board", -+ .res = &efm32gg_dk3750_board_res, ++ .res = efm32gg_dk3750_board_res, + .num_res = ARRAY_SIZE(efm32gg_dk3750_board_res), +}; + diff --git a/patches/linux-3.8-rc5/0017-efm-board-controller-driver.patch b/patches/linux-3.8-rc5/0017-efm-board-controller-driver.patch index 4801e63..b2b784d 100644 --- a/patches/linux-3.8-rc5/0017-efm-board-controller-driver.patch +++ b/patches/linux-3.8-rc5/0017-efm-board-controller-driver.patch @@ -5,8 +5,8 @@ Subject: [PATCH] efm board controller driver --- drivers/mfd/Kconfig | 4 ++ drivers/mfd/Makefile | 1 + - drivers/mfd/efm32board.c | 167 ++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 172 insertions(+) + drivers/mfd/efm32board.c | 166 ++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 171 insertions(+) create mode 100644 drivers/mfd/efm32board.c diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig @@ -35,10 +35,10 @@ index 8b977f8..cb0556f 100644 +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 +index 0000000..1e1cf35 --- /dev/null +++ b/drivers/mfd/efm32board.c -@@ -0,0 +1,167 @@ +@@ -0,0 +1,166 @@ +#include <linux/platform_device.h> +#include <linux/irq.h> +#include <linux/irqdomain.h> @@ -105,11 +105,10 @@ index 0000000..7cfd64e + + 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, |